@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
|
@@ -45,6 +45,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
45
45
|
flex-direction: column;
|
|
46
46
|
flex: 1;
|
|
47
47
|
overflow-y: auto;
|
|
48
|
+
padding: 5px;
|
|
48
49
|
}
|
|
49
50
|
.grist h2 mwc-icon {
|
|
50
51
|
vertical-align: middle;
|
|
@@ -95,6 +96,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
95
96
|
static get properties() {
|
|
96
97
|
return {
|
|
97
98
|
releaseGoodNo: String,
|
|
99
|
+
recall: Boolean,
|
|
98
100
|
bizplace: Object,
|
|
99
101
|
config: Object,
|
|
100
102
|
|
|
@@ -223,6 +225,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
223
225
|
{ name: 'id', hidden: true },
|
|
224
226
|
{ name: 'name', hidden: true },
|
|
225
227
|
{ name: 'palletId', header: i18next.t('field.lot_id') },
|
|
228
|
+
{ name: 'cartonId', header: i18next.t('field.carton_id') },
|
|
226
229
|
{ name: 'product', type: 'object', queryName: 'products' },
|
|
227
230
|
{ name: 'batchId', header: i18next.t('field.batch_id') },
|
|
228
231
|
{
|
|
@@ -240,7 +243,9 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
240
243
|
},
|
|
241
244
|
{ name: 'batchIdRef', header: i18next.t('field.batch_no_ref') }
|
|
242
245
|
],
|
|
243
|
-
list: {
|
|
246
|
+
list: {
|
|
247
|
+
fields: ['palletId', 'cartonId', 'product', 'batchId', 'location', 'remainUomValue', 'batchIdRef']
|
|
248
|
+
}
|
|
244
249
|
}
|
|
245
250
|
},
|
|
246
251
|
width: 250
|
|
@@ -338,7 +343,8 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
338
343
|
basicArgs: {
|
|
339
344
|
filters: [
|
|
340
345
|
{ name: 'status', operator: 'eq', value: INVENTORY_STATUS.STORED.value },
|
|
341
|
-
{ name: 'bizplace', value: [this.bizplace], operator: 'in' }
|
|
346
|
+
{ name: 'bizplace', value: [this.bizplace], operator: 'in' },
|
|
347
|
+
{ name: 'recall', value: this.recall ? this.recall : false, operator: 'eq' }
|
|
342
348
|
],
|
|
343
349
|
locationSortingRules
|
|
344
350
|
},
|
|
@@ -348,6 +354,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
348
354
|
{ name: 'id', hidden: true },
|
|
349
355
|
{ name: 'name', hidden: true },
|
|
350
356
|
{ name: 'palletId', header: i18next.t('field.lot_id') },
|
|
357
|
+
{ name: 'cartonId', header: i18next.t('field.carton_id') },
|
|
351
358
|
{ name: 'product', type: 'object', queryName: 'products' },
|
|
352
359
|
{ name: 'batchId', header: i18next.t('field.batch_id') },
|
|
353
360
|
{
|
|
@@ -365,7 +372,7 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
|
|
|
365
372
|
},
|
|
366
373
|
{ name: 'batchIdRef', header: i18next.t('field.batch_no_ref') }
|
|
367
374
|
],
|
|
368
|
-
list: { fields: ['palletId', 'product', 'batchId', 'location', 'batchIdRef'] }
|
|
375
|
+
list: { fields: ['palletId', 'cartonId', 'product', 'batchId', 'location', 'batchIdRef'] }
|
|
369
376
|
}
|
|
370
377
|
},
|
|
371
378
|
width: 250
|
|
@@ -5,9 +5,9 @@ import '../../components/vas-templates'
|
|
|
5
5
|
import './release-extra-product-popup'
|
|
6
6
|
import '../../components/popup-note'
|
|
7
7
|
import '@things-factory/component-ui'
|
|
8
|
-
|
|
9
8
|
import '@things-factory/import-ui'
|
|
10
9
|
|
|
10
|
+
import { getCodeByName } from '@things-factory/code-base'
|
|
11
11
|
import gql from 'graphql-tag'
|
|
12
12
|
import { css, html } from 'lit-element'
|
|
13
13
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
@@ -23,6 +23,7 @@ import { isMobileDevice } from '@things-factory/utils'
|
|
|
23
23
|
import { fetchSettingRule } from '../../../fetch-setting-value'
|
|
24
24
|
import {
|
|
25
25
|
ORDER_STATUS,
|
|
26
|
+
PICKING_STANDARD,
|
|
26
27
|
VAS_BATCH_AND_PRODUCT_TYPE,
|
|
27
28
|
VAS_BATCH_NO_TYPE,
|
|
28
29
|
VAS_ETC_TYPE,
|
|
@@ -43,11 +44,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
43
44
|
_courierOption: Boolean,
|
|
44
45
|
_packingOption: Boolean,
|
|
45
46
|
roType: String,
|
|
47
|
+
_orderMethod: String,
|
|
46
48
|
customerBizplaceId: String,
|
|
47
49
|
partnerBizplaceId: String,
|
|
48
50
|
inventoryGristConfig: Object,
|
|
49
51
|
vasGristConfig: Object,
|
|
50
52
|
inventoryData: Object,
|
|
53
|
+
orderInventoryData: Object,
|
|
51
54
|
vasData: Object,
|
|
52
55
|
_attachments: Array,
|
|
53
56
|
_status: String,
|
|
@@ -61,6 +64,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
61
64
|
_vasExpanded: Boolean,
|
|
62
65
|
_beforeRemark: String,
|
|
63
66
|
isUserBelongsDomain: Boolean,
|
|
67
|
+
_isInBatchPicking: Boolean,
|
|
64
68
|
/* Shipping Form Field */
|
|
65
69
|
_contactPointId: String,
|
|
66
70
|
_contactPointName: String,
|
|
@@ -82,7 +86,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
82
86
|
_billingFullAddress: String,
|
|
83
87
|
_selectedBillingPostCode: String,
|
|
84
88
|
_deliveryAllCountry: Array,
|
|
85
|
-
|
|
89
|
+
_containerClosureDate: Date,
|
|
90
|
+
_recallOption: Boolean,
|
|
91
|
+
|
|
92
|
+
// Export Form Field
|
|
93
|
+
containerSizes: Array,
|
|
94
|
+
_remindContainerDepature: Boolean,
|
|
86
95
|
|
|
87
96
|
// Refractor
|
|
88
97
|
_shippingInfo: Object,
|
|
@@ -93,6 +102,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
93
102
|
_showReleasedOrderInfo: Boolean,
|
|
94
103
|
_showShippingInfo: Boolean,
|
|
95
104
|
_disableBillingAddress: Boolean,
|
|
105
|
+
_showExportInfo: Boolean,
|
|
96
106
|
currentTab: Object
|
|
97
107
|
}
|
|
98
108
|
}
|
|
@@ -127,6 +137,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
127
137
|
overflow-y: hidden;
|
|
128
138
|
flex: 1;
|
|
129
139
|
}
|
|
140
|
+
|
|
141
|
+
.label-remind-container-departure {
|
|
142
|
+
margin-left: 20px;
|
|
143
|
+
width: 50%;
|
|
144
|
+
}
|
|
145
|
+
|
|
130
146
|
h2 {
|
|
131
147
|
padding: var(--subtitle-padding);
|
|
132
148
|
font: var(--subtitle-font);
|
|
@@ -183,6 +199,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
183
199
|
[attachment-wrap] {
|
|
184
200
|
grid-column: span 9 / auto;
|
|
185
201
|
}
|
|
202
|
+
[remind-wrap] {
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: row;
|
|
205
|
+
grid-column: span 36 / auto;
|
|
206
|
+
}
|
|
207
|
+
[remind-wrap] label {
|
|
208
|
+
width: 8%;
|
|
209
|
+
}
|
|
210
|
+
|
|
186
211
|
[attachment-wrap] a {
|
|
187
212
|
display: block;
|
|
188
213
|
text-overflow: ellipsis;
|
|
@@ -240,12 +265,18 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
240
265
|
render() {
|
|
241
266
|
const RELEASE_ORDER_TABS = {
|
|
242
267
|
RELEASE_ORDER_INFO: i18next.t('label.order'),
|
|
243
|
-
SHIPPING_INFO: i18next.t('label.shipment')
|
|
268
|
+
SHIPPING_INFO: i18next.t('label.shipment'),
|
|
269
|
+
EXPORT_INFO: i18next.t('label.export')
|
|
244
270
|
}
|
|
245
271
|
|
|
246
272
|
const orderSet = {
|
|
247
273
|
[RELEASE_ORDER_TABS.RELEASE_ORDER_INFO]: {},
|
|
248
|
-
[RELEASE_ORDER_TABS.SHIPPING_INFO]: {}
|
|
274
|
+
[RELEASE_ORDER_TABS.SHIPPING_INFO]: {},
|
|
275
|
+
[RELEASE_ORDER_TABS.EXPORT_INFO]: {}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const disabledKey = {
|
|
279
|
+
export: this._exportOption
|
|
249
280
|
}
|
|
250
281
|
|
|
251
282
|
return html`
|
|
@@ -253,6 +284,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
253
284
|
<quick-find-content
|
|
254
285
|
id="order-items-list"
|
|
255
286
|
name="quickFindContent"
|
|
287
|
+
.disabledKey="${disabledKey}"
|
|
256
288
|
.data="${orderSet}"
|
|
257
289
|
@tabChanged="${e => {
|
|
258
290
|
this._tabChange(e.detail.currentTabKey)
|
|
@@ -336,7 +368,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
336
368
|
type="checkbox"
|
|
337
369
|
name="exportOption"
|
|
338
370
|
?checked="${this._exportOption}"
|
|
339
|
-
?disabled="${
|
|
371
|
+
?disabled="${true}"
|
|
340
372
|
@change="${e => {
|
|
341
373
|
this._exportOption = e.currentTarget.checked
|
|
342
374
|
if (this._exportOption == true) {
|
|
@@ -353,6 +385,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
353
385
|
/>
|
|
354
386
|
<label for="exportOption">${i18next.t('label.export')}</label>
|
|
355
387
|
|
|
388
|
+
<input
|
|
389
|
+
id="recall"
|
|
390
|
+
type="checkbox"
|
|
391
|
+
name="recall"
|
|
392
|
+
?checked="${this._recallOption}"
|
|
393
|
+
disabled
|
|
394
|
+
/>
|
|
395
|
+
<label for="recall">${i18next.t('label.recall')}</label>
|
|
396
|
+
|
|
356
397
|
${
|
|
357
398
|
this._crossDocking
|
|
358
399
|
? html`
|
|
@@ -387,15 +428,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
387
428
|
<label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
|
|
388
429
|
<input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
|
|
389
430
|
|
|
390
|
-
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.attention_to')}</label>
|
|
391
|
-
<input name="attentionTo" ?hidden="${this.roType === 'b2b'}" readonly />
|
|
392
|
-
|
|
393
|
-
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.phone_no')}</label>
|
|
394
|
-
<input name="phone1" ?hidden="${this.roType === 'b2b'}" readonly />
|
|
395
|
-
|
|
396
|
-
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.delivery_address')}</label>
|
|
397
|
-
<textarea name="deliveryAddress1" ?hidden="${this.roType === 'b2b'}" rows="5" readonly></textarea>
|
|
398
|
-
|
|
399
431
|
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.order_remark')}</label>
|
|
400
432
|
<textarea name="remark" ?hidden="${this.roType === 'b2b'}" rows="5" ?readonly="${!this
|
|
401
433
|
?._editable}"></textarea>
|
|
@@ -586,48 +618,81 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
586
618
|
|
|
587
619
|
|
|
588
620
|
</form>
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
${
|
|
592
|
-
this._exportOption
|
|
593
|
-
? html`
|
|
594
|
-
<div class="so-form-container">
|
|
595
|
-
<form name="shippingOrder" class="multi-column-form">
|
|
596
|
-
<fieldset>
|
|
597
|
-
<legend>${i18next.t('title.export_order')}</legend>
|
|
598
|
-
<label>${i18next.t('label.container_no')}</label>
|
|
599
|
-
<input name="containerNo" ?readonly="${!this?._editable}" />
|
|
600
|
-
|
|
601
|
-
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
602
|
-
<input
|
|
603
|
-
name="containerArrivalDate"
|
|
604
|
-
type="date"
|
|
605
|
-
?readonly="${!this?._editable}"
|
|
606
|
-
.value="${this._containerArrivalDate}"
|
|
607
|
-
@change="${e => {
|
|
608
|
-
this._containerLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
609
|
-
}}"
|
|
610
|
-
/>
|
|
611
621
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
+
<form name="exportInfo" ?hidden="${this._showExportInfo}" class="multi-column-form" autocomplete="off">
|
|
623
|
+
<legend>${i18next.t('title.export_information')}</legend>
|
|
624
|
+
|
|
625
|
+
<!-- <div remind-wrap>
|
|
626
|
+
<input type="checkbox" id="remindContainerDeparture" name="remindContainerDeparture"
|
|
627
|
+
?checked="${this._containerClosureDate !== '' || this._remindContainerDepature == true ? true : false}"
|
|
628
|
+
/>
|
|
629
|
+
<label style="width:500px" class="label-remind-container-departure" for="remindContainerDeparture">${i18next.t(
|
|
630
|
+
'label.remind_container_departure'
|
|
631
|
+
)}</label>
|
|
632
|
+
</div> -->
|
|
633
|
+
|
|
634
|
+
<label>${i18next.t('label.container_size')}</label>
|
|
635
|
+
<select name="containerSize" required>
|
|
636
|
+
<option value="">--${i18next.t('label.please_select_a_container_size')}--</option>
|
|
637
|
+
${(this.containerSizes || []).map(
|
|
638
|
+
containerSize =>
|
|
639
|
+
html`
|
|
640
|
+
<option
|
|
641
|
+
value="${containerSize && containerSize.name}"
|
|
642
|
+
?selected="${containerSize.name === this._shippingOrder?.containerSize ? true : false}"
|
|
643
|
+
>
|
|
644
|
+
${containerSize && containerSize.name}
|
|
645
|
+
</option>
|
|
646
|
+
`
|
|
647
|
+
)}
|
|
648
|
+
</select>
|
|
622
649
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
650
|
+
<label>${i18next.t('label.container_no')}</label>
|
|
651
|
+
<input name="containerNo" required />
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
655
|
+
<input
|
|
656
|
+
name="containerArrivalDate"
|
|
657
|
+
type="date"
|
|
658
|
+
.value="${this._containerArrivalDate}"
|
|
659
|
+
@change="${e => {
|
|
660
|
+
this._containerClosureDateInput.setAttribute('min', e.currentTarget.value)
|
|
661
|
+
}}"
|
|
662
|
+
required
|
|
663
|
+
/>
|
|
664
|
+
|
|
665
|
+
<label>${i18next.t('label.container_departure_date')}</label>
|
|
666
|
+
<input
|
|
667
|
+
name="containerLeavingDate"
|
|
668
|
+
type="date"
|
|
669
|
+
.value="${this._containerArrivalDate}"
|
|
670
|
+
@change="${e => {
|
|
671
|
+
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
672
|
+
}}"
|
|
673
|
+
required
|
|
674
|
+
/>
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
<label>${i18next.t('label.container_closure_date')}</label>
|
|
678
|
+
<input
|
|
679
|
+
name="containerClosureDate"
|
|
680
|
+
type="date"
|
|
681
|
+
.value="${this._containerClosureDate}"
|
|
682
|
+
@change="${e => {
|
|
683
|
+
this._containerClosureDate = e.currentTarget.value
|
|
684
|
+
this._containerArrivalDateInput.setAttribute('max', e.currentTarget.value)
|
|
685
|
+
}}"
|
|
686
|
+
required
|
|
687
|
+
/>
|
|
688
|
+
|
|
689
|
+
<label>${i18next.t('label.ship_name')}</label>
|
|
690
|
+
<input name="shipName" required/>
|
|
691
|
+
|
|
692
|
+
<label>${i18next.t('label.export_remark')}</label>
|
|
693
|
+
<input name="exportRemark" required />
|
|
694
|
+
|
|
695
|
+
</form>
|
|
631
696
|
|
|
632
697
|
<div class="container">
|
|
633
698
|
<div class="grist">
|
|
@@ -691,6 +756,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
691
756
|
this.currentTab = {
|
|
692
757
|
selected: 'order'
|
|
693
758
|
}
|
|
759
|
+
this.containerSizes = []
|
|
760
|
+
this._containerClosureDate = ''
|
|
761
|
+
this._showExportInfo = true
|
|
694
762
|
}
|
|
695
763
|
|
|
696
764
|
get context() {
|
|
@@ -760,7 +828,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
760
828
|
}
|
|
761
829
|
|
|
762
830
|
let addProductStatus = [ORDER_STATUS.PICKING.value, ORDER_STATUS.LOADING.value]
|
|
763
|
-
if (addProductStatus.indexOf(this._status) >= 0 && this._allowROAddProductSetting) {
|
|
831
|
+
if (addProductStatus.indexOf(this._status) >= 0 && this._allowROAddProductSetting && !this._isInBatchPicking) {
|
|
764
832
|
actions.push({
|
|
765
833
|
title: i18next.t('button.edit'),
|
|
766
834
|
action: this._openExtraProductPopup.bind(this),
|
|
@@ -813,6 +881,14 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
813
881
|
return this.shadowRoot.querySelector('form[name=releaseOrder]')
|
|
814
882
|
}
|
|
815
883
|
|
|
884
|
+
get _containerClosureDateInput() {
|
|
885
|
+
return this.shadowRoot.querySelector('input[name=containerClosureDate]')
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
get exportInfoForm() {
|
|
889
|
+
return this.shadowRoot.querySelector('form[name=exportInfo]')
|
|
890
|
+
}
|
|
891
|
+
|
|
816
892
|
get deliveryOrderForm() {
|
|
817
893
|
return this.shadowRoot.querySelector('form[name=deliveryOrderInfo]')
|
|
818
894
|
}
|
|
@@ -906,6 +982,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
906
982
|
async pageInitialized() {
|
|
907
983
|
await this._getAllPostCode()
|
|
908
984
|
await this.fetchCountry()
|
|
985
|
+
this.containerSizes = await getCodeByName('CONTAINER_SIZES')
|
|
909
986
|
|
|
910
987
|
this.isUserBelongsDomain = await this._checkUserBelongsDomain()
|
|
911
988
|
let [allowROAddProductSetting, userRoles] = [fetchSettingRule('allow-ro-add-product'), this.fetchUserRoleHandler()]
|
|
@@ -1128,6 +1205,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1128
1205
|
id
|
|
1129
1206
|
name
|
|
1130
1207
|
}
|
|
1208
|
+
orderMethod
|
|
1131
1209
|
invStatus
|
|
1132
1210
|
status
|
|
1133
1211
|
refNo
|
|
@@ -1141,6 +1219,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1141
1219
|
exportOption
|
|
1142
1220
|
courierOption
|
|
1143
1221
|
packingOption
|
|
1222
|
+
recall
|
|
1144
1223
|
releaseDate
|
|
1145
1224
|
collectionOrderNo
|
|
1146
1225
|
attachment {
|
|
@@ -1155,6 +1234,25 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1155
1234
|
name
|
|
1156
1235
|
description
|
|
1157
1236
|
}
|
|
1237
|
+
orderProducts {
|
|
1238
|
+
id
|
|
1239
|
+
name
|
|
1240
|
+
batchId
|
|
1241
|
+
batchIdRef
|
|
1242
|
+
packingType
|
|
1243
|
+
packingSize
|
|
1244
|
+
product {
|
|
1245
|
+
id
|
|
1246
|
+
sku
|
|
1247
|
+
brand
|
|
1248
|
+
name
|
|
1249
|
+
description
|
|
1250
|
+
}
|
|
1251
|
+
uom
|
|
1252
|
+
releaseQty
|
|
1253
|
+
releaseUomValue
|
|
1254
|
+
status
|
|
1255
|
+
}
|
|
1158
1256
|
inventoryInfos {
|
|
1159
1257
|
id
|
|
1160
1258
|
name
|
|
@@ -1183,13 +1281,18 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1183
1281
|
name
|
|
1184
1282
|
}
|
|
1185
1283
|
status
|
|
1284
|
+
refWorksheetId
|
|
1186
1285
|
}
|
|
1187
1286
|
shippingOrderInfo {
|
|
1188
1287
|
id
|
|
1189
1288
|
containerNo
|
|
1190
1289
|
containerLeavingDate
|
|
1191
1290
|
containerArrivalDate
|
|
1291
|
+
containerClosureDate
|
|
1292
|
+
containerSize
|
|
1293
|
+
remindContainerDeparture
|
|
1192
1294
|
shipName
|
|
1295
|
+
remark
|
|
1193
1296
|
}
|
|
1194
1297
|
orderVass {
|
|
1195
1298
|
vas {
|
|
@@ -1223,8 +1326,21 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1223
1326
|
if (!response.errors) {
|
|
1224
1327
|
const releaseOrder = response.data.releaseGoodDetail
|
|
1225
1328
|
const shippingOrder = releaseOrder.shippingOrderInfo
|
|
1329
|
+
const orderProducts = releaseOrder.orderProducts.map(op => {
|
|
1330
|
+
let roundedUomValue = parseFloat(op.releaseUomValue.toFixed(2))
|
|
1331
|
+
return {
|
|
1332
|
+
...op,
|
|
1333
|
+
productSKU: op?.product?.sku || '',
|
|
1334
|
+
productName: op?.product?.name || '',
|
|
1335
|
+
productBrand: op?.product?.brand || '',
|
|
1336
|
+
roundedUomValue: `${roundedUomValue} ${op.uom}`,
|
|
1337
|
+
releaseUomValueWithUom: op.releaseUomValue + ' ' + op.uom
|
|
1338
|
+
}
|
|
1339
|
+
})
|
|
1226
1340
|
|
|
1227
1341
|
this.roType = releaseOrder.type
|
|
1342
|
+
this._orderMethod = releaseOrder.orderMethod
|
|
1343
|
+
this._isInBatchPicking = releaseOrder.inventoryInfos.some(inventoryInfo => inventoryInfo.refWorksheetId)
|
|
1228
1344
|
const orderInventories = releaseOrder.inventoryInfos.map(inventoryInfo => {
|
|
1229
1345
|
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(2))
|
|
1230
1346
|
return {
|
|
@@ -1272,6 +1388,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1272
1388
|
this._releaseOrderId = releaseOrder.id
|
|
1273
1389
|
this.partnerBizplaceId = releaseOrder.bizplace.id
|
|
1274
1390
|
this._exportOption = releaseOrder.exportOption
|
|
1391
|
+
this._recallOption = releaseOrder.recall
|
|
1275
1392
|
|
|
1276
1393
|
this._beforeRemark = releaseOrder?.remark
|
|
1277
1394
|
this._courierOption = releaseOrder.courierOption
|
|
@@ -1322,7 +1439,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1322
1439
|
} else {
|
|
1323
1440
|
this._editable = false
|
|
1324
1441
|
}
|
|
1325
|
-
this.inventoryData = {
|
|
1442
|
+
this.inventoryData = {
|
|
1443
|
+
records: this._orderMethod == PICKING_STANDARD.SELECT_BY_PRODUCT.value ? orderProducts : orderInventories
|
|
1444
|
+
}
|
|
1445
|
+
this.orderInventoryData = {
|
|
1446
|
+
records: orderInventories
|
|
1447
|
+
}
|
|
1326
1448
|
this.vasData = {
|
|
1327
1449
|
records: orderVass
|
|
1328
1450
|
.sort((a, b) => a.set - b.set)
|
|
@@ -1525,7 +1647,9 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1525
1647
|
}
|
|
1526
1648
|
|
|
1527
1649
|
_fillupSOForm(data) {
|
|
1528
|
-
|
|
1650
|
+
data.exportRemark = data.remark
|
|
1651
|
+
this._remindContainerDepature = data?.remindContainerDepature || ''
|
|
1652
|
+
this._fillupForm(this.exportInfoForm, data)
|
|
1529
1653
|
}
|
|
1530
1654
|
|
|
1531
1655
|
_fillupDAForm(data) {
|
|
@@ -1563,6 +1687,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1563
1687
|
this._releaseOrder = {}
|
|
1564
1688
|
this._status = null
|
|
1565
1689
|
this.roType = 'b2b'
|
|
1690
|
+
this._orderMethod = PICKING_STANDARD.SELECT_BY_PRODUCT.value
|
|
1691
|
+
this._isInBatchPicking = false
|
|
1566
1692
|
this._exportOption = false
|
|
1567
1693
|
this._courierOption = false
|
|
1568
1694
|
this._packingOption = false
|
|
@@ -1571,6 +1697,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1571
1697
|
this._beforeRemark = null
|
|
1572
1698
|
this._attachments = []
|
|
1573
1699
|
this.inventoryData = { records: [] }
|
|
1700
|
+
this.orderInventoryData = { records: [] }
|
|
1574
1701
|
this.vasData = { records: [] }
|
|
1575
1702
|
}
|
|
1576
1703
|
|
|
@@ -1728,7 +1855,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1728
1855
|
<release-extra-product-popup
|
|
1729
1856
|
.releaseGoodNo="${this._releaseOrderNo}"
|
|
1730
1857
|
.bizplace="${this.partnerBizplaceId}"
|
|
1731
|
-
.existingInventoryData="${this.
|
|
1858
|
+
.existingInventoryData="${this.orderInventoryData}"
|
|
1859
|
+
.recall="${this._recallOption}"
|
|
1732
1860
|
@completed="${e => {
|
|
1733
1861
|
this._fetchReleaseOrder(this._releaseOrderNo)
|
|
1734
1862
|
this.updateContext()
|
|
@@ -1785,6 +1913,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1785
1913
|
delete releaseOrder.bizplaceName
|
|
1786
1914
|
delete releaseOrder.status
|
|
1787
1915
|
delete releaseOrder.ganNo
|
|
1916
|
+
delete releaseOrder.recall
|
|
1788
1917
|
|
|
1789
1918
|
let shippingOrderInfo = {}
|
|
1790
1919
|
|
|
@@ -1835,8 +1964,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1835
1964
|
|
|
1836
1965
|
if (!result.value) return
|
|
1837
1966
|
|
|
1838
|
-
let shippingOrder = this._exportOption ? this._serializeForm(this.shippingOrderForm) : null
|
|
1839
|
-
|
|
1840
1967
|
const response = await client.mutate({
|
|
1841
1968
|
mutation: gql`
|
|
1842
1969
|
mutation updateReleaseGoodDetails(
|
|
@@ -1861,7 +1988,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1861
1988
|
name: this._releaseOrderNo,
|
|
1862
1989
|
ownTransport: this._importCargo ? true : this._ownTransport
|
|
1863
1990
|
},
|
|
1864
|
-
shippingOrder,
|
|
1991
|
+
shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
|
|
1865
1992
|
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null
|
|
1866
1993
|
}
|
|
1867
1994
|
})
|
|
@@ -2031,6 +2158,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2031
2158
|
throw new Error(i18next.t('text.release_order_form_invalid'))
|
|
2032
2159
|
}
|
|
2033
2160
|
|
|
2161
|
+
if (this._exportOption && !this.exportInfoForm.checkValidity()) {
|
|
2162
|
+
throw new Error(i18next.t('text.export_form_is_invalid'))
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2034
2165
|
// - condition: export is ticked
|
|
2035
2166
|
if (this.shippingOrderForm) {
|
|
2036
2167
|
if (!this.shippingOrderForm.checkValidity()) {
|
|
@@ -2056,13 +2187,21 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
2056
2187
|
return date.toISOString().split('T')[0]
|
|
2057
2188
|
}
|
|
2058
2189
|
|
|
2059
|
-
_tabChange(key) {
|
|
2190
|
+
async _tabChange(key) {
|
|
2060
2191
|
if (key == 'order') {
|
|
2061
2192
|
this._showReleasedOrderInfo = false
|
|
2062
2193
|
this._showShippingInfo = true
|
|
2063
|
-
|
|
2194
|
+
this._showExportInfo = true
|
|
2195
|
+
} else if (key == 'shipment') {
|
|
2064
2196
|
this._showReleasedOrderInfo = true
|
|
2065
2197
|
this._showShippingInfo = false
|
|
2198
|
+
this._showExportInfo = true
|
|
2199
|
+
} else {
|
|
2200
|
+
this.containerSizes = await getCodeByName('CONTAINER_SIZES')
|
|
2201
|
+
|
|
2202
|
+
this._showReleasedOrderInfo = true
|
|
2203
|
+
this._showShippingInfo = true
|
|
2204
|
+
this._showExportInfo = false
|
|
2066
2205
|
}
|
|
2067
2206
|
}
|
|
2068
2207
|
|
|
@@ -219,7 +219,11 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
219
219
|
|
|
220
220
|
this.totalPalletQty = doRepsonse.data.deliveryOrder.palletQty
|
|
221
221
|
|
|
222
|
-
roResponse
|
|
222
|
+
roResponse !== undefined
|
|
223
|
+
? roResponse.ownTransport == true
|
|
224
|
+
? (this._showCoNumber = true)
|
|
225
|
+
: (this._showCoNumber = false)
|
|
226
|
+
: ''
|
|
223
227
|
|
|
224
228
|
this._isDisabled = await fetchSettingRule('disable-reusable-pallet')
|
|
225
229
|
|
|
@@ -1094,16 +1098,8 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
1094
1098
|
if (this.manualDo) {
|
|
1095
1099
|
response = await client.mutate({
|
|
1096
1100
|
mutation: gql`
|
|
1097
|
-
mutation dispatchManualDeliveryOrder(
|
|
1098
|
-
$orderInfo:
|
|
1099
|
-
$orderItems: [OrderInventoryPatch!]
|
|
1100
|
-
$shippingOrderInfo: ShippingOrderInfoPatch
|
|
1101
|
-
) {
|
|
1102
|
-
dispatchManualDeliveryOrder(
|
|
1103
|
-
orderInfo: $orderInfo
|
|
1104
|
-
orderItems: $orderItems
|
|
1105
|
-
shippingOrderInfo: $shippingOrderInfo
|
|
1106
|
-
) {
|
|
1101
|
+
mutation dispatchManualDeliveryOrder($orderInfo: DeliveryOrderPatch, $orderItems: [OrderInventoryPatch!]) {
|
|
1102
|
+
dispatchManualDeliveryOrder(orderInfo: $orderInfo, orderItems: $orderItems) {
|
|
1107
1103
|
id
|
|
1108
1104
|
name
|
|
1109
1105
|
description
|
|
@@ -1113,19 +1109,17 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
1113
1109
|
`,
|
|
1114
1110
|
variables: {
|
|
1115
1111
|
orderInfo: { ...this._getDeliveryInfo() },
|
|
1116
|
-
orderItems: this._getOrderItems()
|
|
1117
|
-
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null
|
|
1112
|
+
orderItems: this._getOrderItems()
|
|
1118
1113
|
}
|
|
1119
1114
|
})
|
|
1120
1115
|
} else {
|
|
1121
|
-
//** Comment: @Oscar, this class name title is not conform to the naming convention set, kindly change. */
|
|
1122
1116
|
response = await client.mutate({
|
|
1123
1117
|
mutation: gql`
|
|
1124
1118
|
mutation dispatchDeliveryOrder(
|
|
1125
1119
|
$orderInfo: DeliveryOrderPatch
|
|
1126
1120
|
$orderItems: [OrderInventoryPatch!]
|
|
1127
1121
|
$shippingInfo: ShippingOrderInfoPatch
|
|
1128
|
-
$exportInfo:
|
|
1122
|
+
$exportInfo: ExportInformationPatch
|
|
1129
1123
|
) {
|
|
1130
1124
|
dispatchDeliveryOrder(
|
|
1131
1125
|
orderInfo: $orderInfo
|
|
@@ -1498,6 +1492,7 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
1498
1492
|
this._showShippingInfo = true
|
|
1499
1493
|
this.initProperties()
|
|
1500
1494
|
} else {
|
|
1495
|
+
await this._getAllPostCode()
|
|
1501
1496
|
this._showReleasedOrderInfo = true
|
|
1502
1497
|
this._showShippingInfo = false
|
|
1503
1498
|
this._exportOption = false
|
|
@@ -1569,13 +1564,13 @@ class DeliveryNotePopup extends localize(i18next)(LitElement) {
|
|
|
1569
1564
|
|
|
1570
1565
|
_fillupDAForm(data) {
|
|
1571
1566
|
this._fillupForm(this.deliveryAddressForm, data)
|
|
1572
|
-
this._selectedCountry = data.country
|
|
1567
|
+
this._selectedCountry = data.country || 'MALAYSIA'
|
|
1573
1568
|
this._deliveryOrder.postalCode = data.postalCode
|
|
1574
1569
|
}
|
|
1575
1570
|
|
|
1576
1571
|
_fillupBLForm(data) {
|
|
1577
1572
|
this._fillupForm(this.billingAddressForm, data)
|
|
1578
|
-
this._selectedBillingCountry = data.billingCountry
|
|
1573
|
+
this._selectedBillingCountry = data.billingCountry || 'MALAYSIA'
|
|
1579
1574
|
this._deliveryOrder.billingPostalCode = data.billingPostalCode
|
|
1580
1575
|
}
|
|
1581
1576
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html, LitElement } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
4
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
9
|
import { client } from '@things-factory/shell'
|
|
6
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
7
|
-
import gql from 'graphql-tag'
|
|
8
|
-
import { css, html, LitElement } from 'lit-element'
|
|
9
11
|
|
|
10
12
|
class UploadDeliveryNote extends localize(i18next)(LitElement) {
|
|
11
13
|
static get styles() {
|
|
@@ -202,7 +204,7 @@ class UploadDeliveryNote extends localize(i18next)(LitElement) {
|
|
|
202
204
|
if (this._loadedFlag) {
|
|
203
205
|
const filters = [
|
|
204
206
|
{
|
|
205
|
-
name: '
|
|
207
|
+
name: 'releaseGoodId',
|
|
206
208
|
operator: 'eq',
|
|
207
209
|
value: this._releaseGoodId
|
|
208
210
|
}
|