@things-factory/operato-wms 5.0.13 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/bulk-operation/bulk-operation.js +96 -8
- package/client/pages/bulk-operation/validate-gan-popup.js +37 -27
- package/client/pages/bulk-operation/validate-ro-popup.js +40 -0
- package/client/pages/components/select-inventory-popup.js +633 -0
- package/client/pages/constants/order.js +2 -1
- package/client/pages/inbound/pallet-label-popup.js +2 -0
- package/client/pages/inbound/select-product-batch.js +7 -1
- package/client/pages/inbound/undo-unload-popup.js +37 -21
- package/client/pages/inbound/unload-product.js +147 -59
- package/client/pages/inbound/worksheet-putaway.js +1 -1
- package/client/pages/inbound/worksheet-unloading.js +11 -7
- package/client/pages/inventory/inventory-adjustment.js +261 -238
- 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/onhand-inventory.js +10 -12
- package/client/pages/inventory/serial-number-list-popup.js +36 -5
- package/client/pages/inventory-check/inspecting-product.js +1 -1
- package/client/pages/manifest/create-loading-manifest.js +47 -22
- package/client/pages/manifest/dispatcher-verification-popup.js +24 -13
- package/client/pages/manifest/loading-manifest-detail.js +311 -46
- package/client/pages/manifest/loading-manifest-list.js +86 -13
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +305 -52
- package/client/pages/order/arrival-notice/arrival-notice-list.js +20 -1
- package/client/pages/order/arrival-notice/create-arrival-notice.js +2 -2
- package/client/pages/order/goods-received-note/received-note-detail.js +187 -15
- package/client/pages/order/release-order/b2b/b2b-order-list.js +76 -80
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +148 -123
- package/client/pages/order/release-order/batch-picking-popup.js +11 -0
- package/client/pages/order/release-order/create-release-order.js +762 -250
- package/client/pages/order/release-order/release-extra-product-popup.js +10 -3
- package/client/pages/order/release-order/release-order-detail.js +897 -215
- package/client/pages/order/transport-order/delivery-note-popup.js +1050 -107
- package/client/pages/order/transport-order/print-delivery-note.js +214 -33
- 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 +374 -0
- package/client/pages/outbound/inventory-reassign-popup.js +1097 -0
- package/client/pages/outbound/loading-product.js +88 -78
- package/client/pages/outbound/merged-outbound-worksheet.js +1 -1
- package/client/pages/outbound/packing-product.js +193 -82
- package/client/pages/outbound/packing-worksheet-list.js +10 -9
- package/client/pages/outbound/picking-product.js +979 -905
- package/client/pages/outbound/route-label-popup.js +283 -191
- package/client/pages/outbound/serial-number-popup.js +1 -0
- package/client/pages/outbound/sorting-product.js +12 -12
- package/client/pages/outbound/worksheet-batch-picking.js +39 -5
- package/client/pages/outbound/worksheet-packing.js +17 -4
- package/client/pages/outbound/worksheet-picking.js +45 -6
- package/client/pages/report/inbound-serial-number-report.js +86 -9
- package/client/pages/report/inventory-report.js +10 -0
- package/client/pages/report/inventory-summary-report.js +28 -19
- package/client/pages/report/outbound-order-details-report.js +204 -43
- package/client/pages/report/outbound-serial-number-report.js +87 -9
- package/client/pages/report/release-inventory-report.js +503 -0
- package/client/route.js +5 -0
- package/client/util/index.js +2 -0
- package/client/util/page-settings.js +43 -0
- package/client/util/toast.js +10 -0
- package/dist-server/graphql/resolvers/board-setting/board-settings.js +3 -3
- package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.js +2 -2
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.js +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.js +2 -2
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +9 -10
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +2 -2
- package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.js +6 -4
- package/dist-server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.js.map +1 -1
- package/dist-server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.js +6 -4
- package/dist-server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js +21 -10
- package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js +1 -2
- package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js +1 -2
- package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/index.js +2 -1
- package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +17 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +113 -75
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js +21 -10
- package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/unit-inbounded-outbounded.js +56 -0
- package/dist-server/graphql/resolvers/dashboard/unit-inbounded-outbounded.js.map +1 -0
- package/dist-server/graphql/resolvers/index.js +5 -4
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +1 -1
- package/dist-server/graphql/resolvers/opa-menu/opa-menus.js +8 -7
- package/dist-server/graphql/resolvers/opa-menu/opa-menus.js.map +1 -1
- package/dist-server/graphql/resolvers/{extra → other}/add-release-good-products.js +59 -8
- package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -0
- package/dist-server/graphql/resolvers/{extra → other}/index.js +3 -1
- package/dist-server/graphql/resolvers/other/index.js.map +1 -0
- package/dist-server/graphql/resolvers/other/page-settings.js +87 -0
- package/dist-server/graphql/resolvers/other/page-settings.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/costing-report.js +4 -4
- package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js +36 -7
- package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.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 +69 -30
- package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js +36 -11
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/product-label-report.js +3 -3
- package/dist-server/graphql/resolvers/reports/product-label-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/resolvers/shipping-provider/shipping-providers.js +2 -2
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -1
- package/dist-server/graphql/types/dashboard/index.js +1 -0
- package/dist-server/graphql/types/dashboard/index.js.map +1 -1
- package/dist-server/graphql/types/index.js +7 -2
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/other/index.js +19 -0
- package/dist-server/graphql/types/other/index.js.map +1 -0
- package/dist-server/graphql/types/other/page-setting.js +34 -0
- package/dist-server/graphql/types/other/page-setting.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 +17 -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 +12 -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 +27 -0
- package/dist-server/graphql/types/reports/release-inventory-report.js.map +1 -0
- package/dist-server/migrations/1568858861188-SeedSetting.js +5 -6
- package/dist-server/migrations/1568858861188-SeedSetting.js.map +1 -1
- package/dist-server/migrations/1623308919899-SeedLocationRecommendSetting.js +1 -1
- package/dist-server/migrations/1623308919899-SeedLocationRecommendSetting.js.map +1 -1
- package/dist-server/migrations/1623381200659-SeedStoringRule.js +1 -1
- package/dist-server/migrations/1623381200659-SeedStoringRule.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/utils/report-query-util.js +5 -2
- package/dist-server/utils/report-query-util.js.map +1 -1
- package/helps/release-note.ko.md +8 -20
- package/helps/release-note.md +8 -20
- package/helps/release-note.ms.md +8 -20
- package/helps/release-note.zh.md +8 -20
- package/package.json +42 -42
- package/server/graphql/resolvers/board-setting/board-settings.ts +4 -6
- package/server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.ts +4 -5
- package/server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.ts +9 -10
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.ts +4 -5
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +17 -19
- package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.ts +10 -8
- package/server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.ts +9 -9
- package/server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.ts +9 -9
- package/server/graphql/resolvers/dashboard/arrival-notices-by-status.ts +23 -14
- package/server/graphql/resolvers/dashboard/collection-orders-by-status.ts +4 -5
- package/server/graphql/resolvers/dashboard/delivery-orders-by-status.ts +4 -5
- package/server/graphql/resolvers/dashboard/index.ts +3 -1
- package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +18 -6
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +114 -81
- package/server/graphql/resolvers/dashboard/release-goods-by-status.ts +23 -14
- package/server/graphql/resolvers/dashboard/unit-inbounded-outbounded.ts +61 -0
- package/server/graphql/resolvers/index.ts +5 -4
- package/server/graphql/resolvers/inventory-comparison/inventory-comparison-list.ts +11 -9
- package/server/graphql/resolvers/opa-menu/opa-menus.ts +7 -6
- package/server/graphql/resolvers/{extra → other}/add-release-good-products.ts +73 -12
- package/server/graphql/resolvers/other/index.ts +10 -0
- package/server/graphql/resolvers/other/page-settings.ts +105 -0
- package/server/graphql/resolvers/reports/costing-report.ts +8 -10
- package/server/graphql/resolvers/reports/inbound-order-details-report.ts +7 -9
- package/server/graphql/resolvers/reports/inbound-serial-number-report.ts +41 -13
- package/server/graphql/resolvers/reports/index.ts +3 -1
- package/server/graphql/resolvers/reports/outbound-order-details-report.ts +76 -38
- package/server/graphql/resolvers/reports/outbound-serial-number-report.ts +42 -18
- package/server/graphql/resolvers/reports/product-label-report.ts +4 -6
- package/server/graphql/resolvers/reports/release-inventory-report.ts +201 -0
- package/server/graphql/resolvers/shipping-provider/shipping-providers.ts +3 -5
- package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +10 -10
- package/server/graphql/types/dashboard/index.ts +1 -0
- package/server/graphql/types/index.ts +8 -2
- package/server/graphql/types/other/index.ts +19 -0
- package/server/graphql/types/other/page-setting.ts +33 -0
- package/server/graphql/types/reports/index.ts +6 -1
- package/server/graphql/types/reports/outbound-order-details-report.ts +17 -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/migrations/1568858861188-SeedSetting.ts +4 -4
- package/server/migrations/1623308919899-SeedLocationRecommendSetting.ts +3 -2
- package/server/migrations/1623381200659-SeedStoringRule.ts +3 -2
- package/server/utils/report-query-util.ts +5 -2
- package/things-factory.config.js +4 -0
- package/translations/en.json +148 -27
- package/translations/ko.json +185 -105
- package/translations/ms.json +183 -98
- package/translations/zh.json +197 -112
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +0 -1
- package/dist-server/graphql/resolvers/extra/index.js.map +0 -1
- package/dist-server/graphql/types/extra/index.js +0 -11
- package/dist-server/graphql/types/extra/index.js.map +0 -1
- package/server/graphql/resolvers/extra/index.ts +0 -5
- package/server/graphql/types/extra/index.ts +0 -7
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import '@things-factory/biz-ui'
|
|
1
2
|
import '@things-factory/grist-ui'
|
|
2
3
|
import '../../components/attachment-viewer'
|
|
3
4
|
import '../../components/vas-templates'
|
|
4
5
|
import './release-extra-product-popup'
|
|
5
6
|
import '../../components/popup-note'
|
|
7
|
+
import '@things-factory/component-ui'
|
|
8
|
+
import '@things-factory/import-ui'
|
|
6
9
|
|
|
10
|
+
import { getCodeByName } from '@things-factory/code-base'
|
|
7
11
|
import gql from 'graphql-tag'
|
|
8
12
|
import { css, html } from 'lit-element'
|
|
9
13
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
@@ -19,6 +23,7 @@ import { isMobileDevice } from '@things-factory/utils'
|
|
|
19
23
|
import { fetchSettingRule } from '../../../fetch-setting-value'
|
|
20
24
|
import {
|
|
21
25
|
ORDER_STATUS,
|
|
26
|
+
PICKING_STANDARD,
|
|
22
27
|
VAS_BATCH_AND_PRODUCT_TYPE,
|
|
23
28
|
VAS_BATCH_NO_TYPE,
|
|
24
29
|
VAS_ETC_TYPE,
|
|
@@ -39,11 +44,13 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
39
44
|
_courierOption: Boolean,
|
|
40
45
|
_packingOption: Boolean,
|
|
41
46
|
roType: String,
|
|
47
|
+
_orderMethod: String,
|
|
42
48
|
customerBizplaceId: String,
|
|
43
49
|
partnerBizplaceId: String,
|
|
44
50
|
inventoryGristConfig: Object,
|
|
45
51
|
vasGristConfig: Object,
|
|
46
52
|
inventoryData: Object,
|
|
53
|
+
orderInventoryData: Object,
|
|
47
54
|
vasData: Object,
|
|
48
55
|
_attachments: Array,
|
|
49
56
|
_status: String,
|
|
@@ -56,7 +63,47 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
56
63
|
_containerLeavingDate: Date,
|
|
57
64
|
_vasExpanded: Boolean,
|
|
58
65
|
_beforeRemark: String,
|
|
59
|
-
isUserBelongsDomain: Boolean
|
|
66
|
+
isUserBelongsDomain: Boolean,
|
|
67
|
+
_isInBatchPicking: Boolean,
|
|
68
|
+
/* Shipping Form Field */
|
|
69
|
+
_contactPointId: String,
|
|
70
|
+
_contactPointName: String,
|
|
71
|
+
_companyName: String,
|
|
72
|
+
_attentionTo: String,
|
|
73
|
+
_deliveryCountry: String,
|
|
74
|
+
_deliveryPostCode: Array,
|
|
75
|
+
_deliveryState: String,
|
|
76
|
+
_deliveryCity: String,
|
|
77
|
+
_deliveryContact: String,
|
|
78
|
+
_deliveryFullAddress: String,
|
|
79
|
+
_selectedPostCode: String,
|
|
80
|
+
_selectedDeliveryCountry: String,
|
|
81
|
+
_billingCountry: String,
|
|
82
|
+
_billingPostCode: Array,
|
|
83
|
+
_billingState: String,
|
|
84
|
+
_billingCity: String,
|
|
85
|
+
_billingContact: String,
|
|
86
|
+
_billingFullAddress: String,
|
|
87
|
+
_selectedBillingPostCode: String,
|
|
88
|
+
_deliveryAllCountry: Array,
|
|
89
|
+
_containerClosureDate: Date,
|
|
90
|
+
_recallOption: Boolean,
|
|
91
|
+
|
|
92
|
+
// Export Form Field
|
|
93
|
+
containerSizes: Array,
|
|
94
|
+
_remindContainerDepature: Boolean,
|
|
95
|
+
|
|
96
|
+
// Refractor
|
|
97
|
+
_shippingInfo: Object,
|
|
98
|
+
_selectedCountry: String,
|
|
99
|
+
_selectedBillingCountry: String,
|
|
100
|
+
|
|
101
|
+
/* Tab Toggle*/
|
|
102
|
+
_showReleasedOrderInfo: Boolean,
|
|
103
|
+
_showShippingInfo: Boolean,
|
|
104
|
+
_disableBillingAddress: Boolean,
|
|
105
|
+
_showExportInfo: Boolean,
|
|
106
|
+
currentTab: Object
|
|
60
107
|
}
|
|
61
108
|
}
|
|
62
109
|
|
|
@@ -90,6 +137,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
90
137
|
overflow-y: hidden;
|
|
91
138
|
flex: 1;
|
|
92
139
|
}
|
|
140
|
+
|
|
141
|
+
.label-remind-container-departure {
|
|
142
|
+
margin-left: 20px;
|
|
143
|
+
width: 50%;
|
|
144
|
+
}
|
|
145
|
+
|
|
93
146
|
h2 {
|
|
94
147
|
padding: var(--subtitle-padding);
|
|
95
148
|
font: var(--subtitle-font);
|
|
@@ -127,6 +180,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
127
180
|
h2.vas-title {
|
|
128
181
|
padding-bottom: 0px;
|
|
129
182
|
}
|
|
183
|
+
[title] {
|
|
184
|
+
margin-top: -5px;
|
|
185
|
+
margin-bottom: -5px;
|
|
186
|
+
}
|
|
130
187
|
|
|
131
188
|
[options-wrap] *,
|
|
132
189
|
[attachment-wrap] a * {
|
|
@@ -142,6 +199,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
142
199
|
[attachment-wrap] {
|
|
143
200
|
grid-column: span 9 / auto;
|
|
144
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
|
+
|
|
145
211
|
[attachment-wrap] a {
|
|
146
212
|
display: block;
|
|
147
213
|
text-overflow: ellipsis;
|
|
@@ -169,226 +235,464 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
169
235
|
.form-container > form {
|
|
170
236
|
flex: 1;
|
|
171
237
|
}
|
|
238
|
+
|
|
239
|
+
[hidden] {
|
|
240
|
+
display: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.section-header {
|
|
244
|
+
grid-column: span 36 / auto !important;
|
|
245
|
+
text-align: left !important;
|
|
246
|
+
margin-top: 10px !important;
|
|
247
|
+
font-weight: 600 !important;
|
|
248
|
+
}
|
|
249
|
+
.quick-find-content-container {
|
|
250
|
+
margin: 0 15px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@media screen and (max-width: 480px) {
|
|
254
|
+
.section-header {
|
|
255
|
+
grid-column: span 12 / auto !important;
|
|
256
|
+
}
|
|
257
|
+
.quick-find-content-container {
|
|
258
|
+
margin: 0;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
172
261
|
`
|
|
173
262
|
]
|
|
174
263
|
}
|
|
175
264
|
|
|
176
265
|
render() {
|
|
266
|
+
const RELEASE_ORDER_TABS = {
|
|
267
|
+
RELEASE_ORDER_INFO: i18next.t('label.order'),
|
|
268
|
+
SHIPPING_INFO: i18next.t('label.shipment'),
|
|
269
|
+
EXPORT_INFO: i18next.t('label.export')
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const orderSet = {
|
|
273
|
+
[RELEASE_ORDER_TABS.RELEASE_ORDER_INFO]: {},
|
|
274
|
+
[RELEASE_ORDER_TABS.SHIPPING_INFO]: {},
|
|
275
|
+
[RELEASE_ORDER_TABS.EXPORT_INFO]: {}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const disabledKey = {
|
|
279
|
+
export: this._exportOption
|
|
280
|
+
}
|
|
281
|
+
|
|
177
282
|
return html`
|
|
178
|
-
|
|
179
|
-
<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
this.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
283
|
+
<div class="quick-find-content-container" >
|
|
284
|
+
<quick-find-content
|
|
285
|
+
id="order-items-list"
|
|
286
|
+
name="quickFindContent"
|
|
287
|
+
.disabledKey="${disabledKey}"
|
|
288
|
+
.data="${orderSet}"
|
|
289
|
+
@tabChanged="${e => {
|
|
290
|
+
this._tabChange(e.detail.currentTabKey)
|
|
291
|
+
}}"
|
|
292
|
+
></quick-find-content>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<div ?hidden="${this._showReleasedOrderInfo}">
|
|
296
|
+
<div class="form-container">
|
|
297
|
+
|
|
298
|
+
<form name="releaseOrder" class="multi-column-form">
|
|
299
|
+
<fieldset>
|
|
300
|
+
<legend>${i18next.t('title.release_order_no')}: ${this._releaseOrderNo}</legend>
|
|
301
|
+
|
|
302
|
+
<label>${i18next.t('label.options')}</label>
|
|
303
|
+
<div options-wrap>
|
|
304
|
+
<input
|
|
305
|
+
id="ownTransport"
|
|
306
|
+
type="checkbox"
|
|
307
|
+
name="ownTransport"
|
|
308
|
+
?checked="${this._ownTransport}"
|
|
309
|
+
?disabled="${this._disableTransport || !this?._editable}"
|
|
310
|
+
@change="${e => {
|
|
311
|
+
this._ownTransport = e.currentTarget.checked
|
|
312
|
+
if (this._ownTransport) {
|
|
313
|
+
this._warehouseTransportInput.checked = false
|
|
314
|
+
this._warehouseTransport = false
|
|
315
|
+
} else {
|
|
316
|
+
this._warehouseTransportInput.checked = true
|
|
317
|
+
this._warehouseTransport = true
|
|
318
|
+
this._exportInput.checked = false
|
|
319
|
+
this._exportOption = false
|
|
320
|
+
}
|
|
321
|
+
this._validateTransport()
|
|
322
|
+
}}"
|
|
323
|
+
/>
|
|
324
|
+
<label for="ownTransport">${i18next.t('label.own_transport')}</label>
|
|
325
|
+
|
|
326
|
+
<input
|
|
327
|
+
id="warehouseTransport"
|
|
328
|
+
type="checkbox"
|
|
329
|
+
name="warehouseTransport"
|
|
330
|
+
?checked="${!this._ownTransport}"
|
|
331
|
+
?disabled="${this._disableTransport || !this?._editable}"
|
|
332
|
+
@change="${e => {
|
|
333
|
+
this._warehouseTransport = e.currentTarget.checked
|
|
334
|
+
if (this._warehouseTransport) {
|
|
335
|
+
this._ownTransportInput.checked = false
|
|
336
|
+
this._ownTransport = false
|
|
337
|
+
this._exportInput.checked = false
|
|
338
|
+
this._exportOption = false
|
|
339
|
+
} else {
|
|
340
|
+
this._ownTransportInput.checked = true
|
|
341
|
+
this._ownTransport = true
|
|
342
|
+
}
|
|
343
|
+
this._validateTransport()
|
|
344
|
+
}}"
|
|
345
|
+
/>
|
|
346
|
+
<label for="warehouseTransport">${i18next.t('label.warehouse_transport')}</label>
|
|
347
|
+
|
|
348
|
+
<input
|
|
349
|
+
id="courierOption"
|
|
350
|
+
type="checkbox"
|
|
351
|
+
name="courierOption"
|
|
352
|
+
?checked="${this._courierOption}"
|
|
353
|
+
disabled
|
|
354
|
+
/>
|
|
355
|
+
<label>${i18next.t('label.courier')}</label>
|
|
356
|
+
|
|
357
|
+
<input
|
|
358
|
+
id="packingOption"
|
|
359
|
+
type="checkbox"
|
|
360
|
+
name="packingOption"
|
|
361
|
+
?checked="${this._packingOption}"
|
|
362
|
+
disabled
|
|
363
|
+
/>
|
|
364
|
+
<label>${i18next.t('label.packing')}</label>
|
|
365
|
+
|
|
366
|
+
<input
|
|
367
|
+
id="exportOption"
|
|
368
|
+
type="checkbox"
|
|
369
|
+
name="exportOption"
|
|
370
|
+
?checked="${this._exportOption}"
|
|
371
|
+
?disabled="${true}"
|
|
372
|
+
@change="${e => {
|
|
373
|
+
this._exportOption = e.currentTarget.checked
|
|
374
|
+
if (this._exportOption == true) {
|
|
375
|
+
this._warehouseTransportInput.checked = false
|
|
376
|
+
this._warehouseTransport = false
|
|
377
|
+
this._ownTransportInput.checked = true
|
|
378
|
+
this._ownTransport = true
|
|
379
|
+
}
|
|
380
|
+
if (this._warehouseTransport) {
|
|
381
|
+
this._exportInput.checked = false
|
|
382
|
+
this._exportOption = false
|
|
383
|
+
}
|
|
384
|
+
}}"
|
|
385
|
+
/>
|
|
386
|
+
<label for="exportOption">${i18next.t('label.export')}</label>
|
|
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
|
+
|
|
397
|
+
${
|
|
398
|
+
this._crossDocking
|
|
399
|
+
? html`
|
|
400
|
+
<input
|
|
401
|
+
id="crossDocking"
|
|
402
|
+
type="checkbox"
|
|
403
|
+
name="crossDocking"
|
|
404
|
+
?checked="${this._crossDocking}"
|
|
405
|
+
disabled
|
|
406
|
+
/>
|
|
407
|
+
<label for="crossDocking">${i18next.t('label.cross_docking')}</label>
|
|
408
|
+
`
|
|
409
|
+
: ''
|
|
410
|
+
}
|
|
411
|
+
</div>
|
|
412
|
+
|
|
413
|
+
<label>${i18next.t('label.company')}</label>
|
|
414
|
+
<input name="bizplaceName" disabled />
|
|
415
|
+
|
|
416
|
+
<label>${i18next.t('label.ref_no')}</label>
|
|
417
|
+
<input name="refNo" ?readonly="${!this?._editable}" />
|
|
418
|
+
|
|
419
|
+
<label>${i18next.t('label.ref_no_2')}</label>
|
|
420
|
+
<input name="refNo2" ?readonly="${!this?._editable}" />
|
|
421
|
+
|
|
422
|
+
<label>${i18next.t('label.ref_no_3')}</label>
|
|
423
|
+
<input name="refNo3" ?readonly="${!this?._editable}" />
|
|
424
|
+
|
|
425
|
+
<label>${i18next.t('label.release_date')}</label>
|
|
426
|
+
<input name="releaseDate" type="date" ?readonly="${!this?._editable}" min="${this._getStdDate()}" />
|
|
427
|
+
|
|
428
|
+
<label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
|
|
429
|
+
<input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
|
|
430
|
+
|
|
431
|
+
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.order_remark')}</label>
|
|
432
|
+
<textarea name="remark" ?hidden="${this.roType === 'b2b'}" rows="5" ?readonly="${!this
|
|
433
|
+
?._editable}"></textarea>
|
|
268
434
|
|
|
269
435
|
${
|
|
270
436
|
this._crossDocking
|
|
271
437
|
? html`
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
type="checkbox"
|
|
275
|
-
name="crossDocking"
|
|
276
|
-
?checked="${this._crossDocking}"
|
|
277
|
-
disabled
|
|
278
|
-
/>
|
|
279
|
-
<label for="crossDocking">${i18next.t('label.cross_docking')}</label>
|
|
438
|
+
<label for="ganNo">${i18next.t('label.arrival_notice')}</label>
|
|
439
|
+
<input disabled name="ganNo" .value="${this._ganNo}" />
|
|
280
440
|
`
|
|
281
441
|
: ''
|
|
282
442
|
}
|
|
283
|
-
|
|
443
|
+
${
|
|
444
|
+
this._attachments?.length > 0
|
|
445
|
+
? html`
|
|
446
|
+
<label>${i18next.t('label.attachment')}</label>
|
|
447
|
+
<ul attachment-wrap>
|
|
448
|
+
${(this._attachments || []).map(
|
|
449
|
+
attachment =>
|
|
450
|
+
html`
|
|
451
|
+
<li>
|
|
452
|
+
<a href="${location.origin}/attachment/${attachment.path}" download
|
|
453
|
+
><mwc-icon>attach_file</mwc-icon> ${attachment.name}</a
|
|
454
|
+
>
|
|
455
|
+
</li>
|
|
456
|
+
`
|
|
457
|
+
)}
|
|
458
|
+
</ul>
|
|
459
|
+
`
|
|
460
|
+
: ''
|
|
461
|
+
}
|
|
462
|
+
</fieldset>
|
|
463
|
+
</form>
|
|
284
464
|
|
|
285
|
-
|
|
286
|
-
|
|
465
|
+
<barcode-tag bcid="qrcode" .value=${this._releaseOrderNo}></barcode-tag>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
287
468
|
|
|
288
|
-
|
|
289
|
-
|
|
469
|
+
|
|
470
|
+
<form name="shippingInfo" ?hidden="${this._showShippingInfo}" class="multi-column-form" autocomplete="off">
|
|
290
471
|
|
|
291
|
-
|
|
292
|
-
<input name="refNo2" ?readonly="${!this?._editable}" />
|
|
472
|
+
<legend>${i18next.t('title.shipping_information')}</legend>
|
|
293
473
|
|
|
294
|
-
|
|
295
|
-
|
|
474
|
+
|
|
475
|
+
<label>${i18next.t('label.company')}</label>
|
|
476
|
+
<input name="attentionCompany" .value="${this._releaseOrder.attentionCompany}" />
|
|
296
477
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
?._editable}" min="${this._getStdDate()}" required />
|
|
478
|
+
<label>${i18next.t('label.attention_to')}</label>
|
|
479
|
+
<input name="attentionTo" .value="${this._releaseOrder.attentionTo}" />
|
|
300
480
|
|
|
301
|
-
|
|
302
|
-
|
|
481
|
+
|
|
482
|
+
<button type="button" @click="${this._openContactPointSelector.bind(this)}">import</button>
|
|
303
483
|
|
|
304
|
-
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.attention_to')}</label>
|
|
305
|
-
<input name="attentionTo" ?hidden="${this.roType === 'b2b'}" readonly />
|
|
306
484
|
|
|
307
|
-
|
|
308
|
-
|
|
485
|
+
<!-- delivery -->
|
|
486
|
+
|
|
487
|
+
<label class="section-header">${i18next.t('label.delivery_address')}</label>
|
|
488
|
+
<label>${i18next.t('label.country')}</label>
|
|
489
|
+
<select
|
|
490
|
+
name="country"
|
|
491
|
+
@change=${e => {
|
|
492
|
+
this._validateCountry(e)
|
|
493
|
+
}}
|
|
494
|
+
>
|
|
495
|
+
${this._deliveryAllCountry?.map(
|
|
496
|
+
(country, key) =>
|
|
497
|
+
html`<option value=${country.name} ?selected=${country.name === this._selectedCountry}>
|
|
498
|
+
${country.name}
|
|
499
|
+
</option>`
|
|
500
|
+
)}
|
|
501
|
+
</select>
|
|
502
|
+
|
|
503
|
+
<label>${i18next.t('label.zip_postal_code')}</label>
|
|
504
|
+
${
|
|
505
|
+
this._selectedCountry !== 'MALAYSIA'
|
|
506
|
+
? html` <input name="postalCode" .value="" /> `
|
|
507
|
+
: html`<select
|
|
508
|
+
name="postalCode"
|
|
509
|
+
@change=${e => {
|
|
510
|
+
this._getStateAndCityByPostCode(e.target.value, e.target.name)
|
|
511
|
+
}}
|
|
512
|
+
value=${this?._selectedPostCode || ''}
|
|
513
|
+
>
|
|
514
|
+
<option value=""></option>
|
|
515
|
+
${this._deliveryPostCode.map(
|
|
516
|
+
(country, key) =>
|
|
517
|
+
html`<option
|
|
518
|
+
?selected=${(this._selectedPostCode.length > 0
|
|
519
|
+
? this._selectedPostCode
|
|
520
|
+
: this._releaseOrder.postalCode) == country.postalCode}
|
|
521
|
+
value=${country.postalCode}
|
|
522
|
+
>
|
|
523
|
+
${country.postalCode}
|
|
524
|
+
</option>`
|
|
525
|
+
)}
|
|
526
|
+
</select>`
|
|
527
|
+
}
|
|
309
528
|
|
|
310
|
-
|
|
311
|
-
|
|
529
|
+
<label>${i18next.t('label.state')}</label>
|
|
530
|
+
<input name="state" .value="${this._releaseOrder.state}" />
|
|
531
|
+
|
|
532
|
+
<label>${i18next.t('label.city')}</label>
|
|
533
|
+
<input name="city" .value="${this._releaseOrder.city}" />
|
|
534
|
+
|
|
535
|
+
<label>${i18next.t('label.delivery_address')}</label>
|
|
536
|
+
<textarea name="deliveryAddress1" .value="${this._releaseOrder.deliveryAddress1}"></textarea>
|
|
537
|
+
|
|
538
|
+
<label>${i18next.t('label.contact')}</label>
|
|
539
|
+
<input name="phone1" value="${this._releaseOrder.phone1}" />
|
|
540
|
+
|
|
541
|
+
<!-- billing -->
|
|
542
|
+
<label class="section-header">${i18next.t('label.billing_address')}</label>
|
|
543
|
+
<label>${i18next.t('label.country')}</label>
|
|
544
|
+
|
|
545
|
+
<select
|
|
546
|
+
name="billingCountry"
|
|
547
|
+
?disabled=${this._disableBillingAddress}
|
|
548
|
+
@change=${e => {
|
|
549
|
+
this._validateBillingCountry(e)
|
|
550
|
+
}}
|
|
551
|
+
>
|
|
552
|
+
${this._deliveryAllCountry.map(
|
|
553
|
+
(country, key) =>
|
|
554
|
+
html`<option value=${country.name} ?selected=${country.name === this._selectedBillingCountry}>
|
|
555
|
+
${country.name}
|
|
556
|
+
</option>`
|
|
557
|
+
)}
|
|
558
|
+
</select>
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
<label>${i18next.t('label.zip_postal_code')}</label>
|
|
312
562
|
|
|
313
|
-
<label ?hidden="${this.roType === 'b2b'}">${i18next.t('label.order_remark')}</label>
|
|
314
|
-
<textarea name="remark" ?hidden="${this.roType === 'b2b'}" rows="5" ?readonly="${!this
|
|
315
|
-
?._editable}"></textarea>
|
|
316
563
|
|
|
317
564
|
${
|
|
318
|
-
this.
|
|
319
|
-
? html`
|
|
320
|
-
<label for="ganNo">${i18next.t('label.arrival_notice')}</label>
|
|
321
|
-
<input disabled name="ganNo" .value="${this._ganNo}" />
|
|
322
|
-
`
|
|
323
|
-
: ''
|
|
324
|
-
}
|
|
325
|
-
${
|
|
326
|
-
this._attachments?.length > 0
|
|
565
|
+
this._selectedBillingCountry !== 'MALAYSIA'
|
|
327
566
|
? html`
|
|
328
|
-
<
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<li>
|
|
334
|
-
<a href="${location.origin}/attachment/${attachment.path}" download
|
|
335
|
-
><mwc-icon>attach_file</mwc-icon> ${attachment.name}</a
|
|
336
|
-
>
|
|
337
|
-
</li>
|
|
338
|
-
`
|
|
339
|
-
)}
|
|
340
|
-
</ul>
|
|
567
|
+
<input
|
|
568
|
+
?disabled=${this._disableBillingAddress}
|
|
569
|
+
name="billingPostalCode"
|
|
570
|
+
.value=${this._releaseOrder.billingPostalCode}
|
|
571
|
+
/>
|
|
341
572
|
`
|
|
342
|
-
:
|
|
573
|
+
: html`<select
|
|
574
|
+
?disabled=${this._disableBillingAddress}
|
|
575
|
+
name="billingPostalCode"
|
|
576
|
+
@change=${e => {
|
|
577
|
+
this._getStateAndCityByPostCode(e.target.value, e.target.name)
|
|
578
|
+
}}
|
|
579
|
+
value=${this._releaseOrder.billingPostalCode}
|
|
580
|
+
>
|
|
581
|
+
<option value=""></option>
|
|
582
|
+
|
|
583
|
+
${this._billingPostCode.map(
|
|
584
|
+
(country, key) =>
|
|
585
|
+
html`<option
|
|
586
|
+
?selected=${this._releaseOrder.billingPostalCode == country.postalCode}
|
|
587
|
+
value=${country.postalCode}
|
|
588
|
+
>
|
|
589
|
+
${country.postalCode}
|
|
590
|
+
</option>`
|
|
591
|
+
)}
|
|
592
|
+
</select>`
|
|
343
593
|
}
|
|
344
|
-
</fieldset>
|
|
345
|
-
</form>
|
|
346
594
|
|
|
347
|
-
|
|
348
|
-
|
|
595
|
+
<label>${i18next.t('label.state')}</label>
|
|
596
|
+
<input ?disabled=${this._disableBillingAddress} name="billingState" .value="${
|
|
597
|
+
this._releaseOrder.billingState
|
|
598
|
+
}" />
|
|
599
|
+
|
|
600
|
+
<label>${i18next.t('label.city')}</label>
|
|
601
|
+
<input ?disabled=${this._disableBillingAddress} name="billingCity" .value="${
|
|
602
|
+
this._releaseOrder.billingCity
|
|
603
|
+
}" />
|
|
604
|
+
|
|
605
|
+
<label>${i18next.t('label.billing_address')}</label>
|
|
606
|
+
<textarea ?disabled=${this._disableBillingAddress} name="billingAddress" .value="${
|
|
607
|
+
this._releaseOrder.billingAddress || ''
|
|
608
|
+
}"></textarea>
|
|
609
|
+
|
|
610
|
+
<input type="checkbox" id="matchDeliveryAddress" name="matchDeliveryAddressInputa" ?checked=${
|
|
611
|
+
this._releaseOrder.postalCode == this._releaseOrder.billingPostalCode &&
|
|
612
|
+
this._releaseOrder.billingAddress == this._releaseOrder.deliveryAddress1
|
|
613
|
+
} @click=${e => {
|
|
614
|
+
e.currentTarget.checked ? (this._disableBillingAddress = true) : (this._disableBillingAddress = false)
|
|
615
|
+
e.currentTarget.checked ? this.matchDeliveryAddress() : ''
|
|
616
|
+
}} />
|
|
617
|
+
<label for="matchDeliveryAddress">${i18next.t('label.match_delivery_address')}</label>
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
</form>
|
|
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>
|
|
649
|
+
|
|
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
|
+
/>
|
|
349
664
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
<label>${i18next.t('label.container_arrival_date')}</label>
|
|
361
|
-
<input
|
|
362
|
-
name="containerArrivalDate"
|
|
363
|
-
type="date"
|
|
364
|
-
?readonly="${!this?._editable}"
|
|
365
|
-
.value="${this._containerArrivalDate}"
|
|
366
|
-
@change="${e => {
|
|
367
|
-
this._containerLeavingDateInput.setAttribute('min', e.currentTarget.value)
|
|
368
|
-
}}"
|
|
369
|
-
required
|
|
370
|
-
/>
|
|
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
|
+
/>
|
|
371
675
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
+
/>
|
|
383
688
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
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>
|
|
392
696
|
|
|
393
697
|
<div class="container">
|
|
394
698
|
<div class="grist">
|
|
@@ -428,10 +732,33 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
428
732
|
constructor() {
|
|
429
733
|
super()
|
|
430
734
|
this._clearPage()
|
|
735
|
+
this._deliveryAllCountry = []
|
|
431
736
|
this._editable = false
|
|
432
737
|
this._disableTransport = false
|
|
433
738
|
this._shippingOrder = null
|
|
434
739
|
this._vasExpanded = false
|
|
740
|
+
this._showReleasedOrderInfo = false
|
|
741
|
+
this._showShippingInfo = true
|
|
742
|
+
this._attentionTo = ''
|
|
743
|
+
this._companyName = ''
|
|
744
|
+
this._deliveryPostCode = []
|
|
745
|
+
this._deliveryState = ''
|
|
746
|
+
this._deliveryCity = ''
|
|
747
|
+
this._deliveryFullAddress = ''
|
|
748
|
+
this._deliveryContact = ''
|
|
749
|
+
this._billingPostCode = []
|
|
750
|
+
this._billingState = ''
|
|
751
|
+
this._billingCity = ''
|
|
752
|
+
this._billingFullAddress = ''
|
|
753
|
+
this._billingContact = ''
|
|
754
|
+
this._selectedPostCode = ''
|
|
755
|
+
this._selectedBillingPostCode = ''
|
|
756
|
+
this.currentTab = {
|
|
757
|
+
selected: 'order'
|
|
758
|
+
}
|
|
759
|
+
this.containerSizes = []
|
|
760
|
+
this._containerClosureDate = ''
|
|
761
|
+
this._showExportInfo = true
|
|
435
762
|
}
|
|
436
763
|
|
|
437
764
|
get context() {
|
|
@@ -501,7 +828,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
501
828
|
}
|
|
502
829
|
|
|
503
830
|
let addProductStatus = [ORDER_STATUS.PICKING.value, ORDER_STATUS.LOADING.value]
|
|
504
|
-
if (addProductStatus.indexOf(this._status) >= 0 && this._allowROAddProductSetting) {
|
|
831
|
+
if (addProductStatus.indexOf(this._status) >= 0 && this._allowROAddProductSetting && !this._isInBatchPicking) {
|
|
505
832
|
actions.push({
|
|
506
833
|
title: i18next.t('button.edit'),
|
|
507
834
|
action: this._openExtraProductPopup.bind(this),
|
|
@@ -527,7 +854,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
527
854
|
|
|
528
855
|
let cancelOrderStatus = [
|
|
529
856
|
ORDER_STATUS.PICKING.value,
|
|
530
|
-
ORDER_STATUS.PENDING_WORKSHEET,
|
|
857
|
+
ORDER_STATUS.PENDING_WORKSHEET.value,
|
|
531
858
|
ORDER_STATUS.READY_TO_PICK.value,
|
|
532
859
|
ORDER_STATUS.LOADING.value
|
|
533
860
|
]
|
|
@@ -546,14 +873,46 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
546
873
|
}
|
|
547
874
|
}
|
|
548
875
|
|
|
876
|
+
get shippingInfoForm() {
|
|
877
|
+
return this.shadowRoot.querySelector('form[name=shippingInfo]')
|
|
878
|
+
}
|
|
879
|
+
|
|
549
880
|
get releaseOrderForm() {
|
|
550
881
|
return this.shadowRoot.querySelector('form[name=releaseOrder]')
|
|
551
882
|
}
|
|
552
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
|
+
|
|
892
|
+
get deliveryOrderForm() {
|
|
893
|
+
return this.shadowRoot.querySelector('form[name=deliveryOrderInfo]')
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
get billingPostalCodeInput() {
|
|
897
|
+
return this.shadowRoot.querySelector('select[name=billingPostalCode]')
|
|
898
|
+
}
|
|
899
|
+
|
|
553
900
|
get shippingOrderForm() {
|
|
554
901
|
return this.shadowRoot.querySelector('form[name=shippingOrder]')
|
|
555
902
|
}
|
|
556
903
|
|
|
904
|
+
get contactPointForm() {
|
|
905
|
+
return this.shadowRoot.querySelector('form[name=contactPointInfo]')
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
get billingAddressForm() {
|
|
909
|
+
return this.shadowRoot.querySelector('form[name=billingAddressInfo]')
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
get deliveryAddressForm() {
|
|
913
|
+
return this.shadowRoot.querySelector('form[name=deliveryAddressInfo]')
|
|
914
|
+
}
|
|
915
|
+
|
|
557
916
|
get _ownTransportInput() {
|
|
558
917
|
return this.shadowRoot.querySelector('input[name=ownTransport]')
|
|
559
918
|
}
|
|
@@ -586,11 +945,32 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
586
945
|
return this.shadowRoot.querySelector('data-grist#vas-grist')
|
|
587
946
|
}
|
|
588
947
|
|
|
948
|
+
get matchDeliveryAddressInput() {
|
|
949
|
+
return this.shadowRoot?.querySelector('input[name=matchDeliveryAddressInputa]')
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
get _cityInput() {
|
|
953
|
+
return this.shadowRoot.querySelector('input[name=city]')
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
get _stateInput() {
|
|
957
|
+
return this.shadowRoot.querySelector('input[name=state]')
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
get _cityBillingInput() {
|
|
961
|
+
return this.shadowRoot.querySelector('input[name=billingCity]')
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
get _stateBillingInput() {
|
|
965
|
+
return this.shadowRoot.querySelector('input[name=billingState]')
|
|
966
|
+
}
|
|
967
|
+
|
|
589
968
|
async pageUpdated(changes) {
|
|
590
969
|
if (this.active) {
|
|
591
970
|
if (changes.resourceId) {
|
|
592
971
|
this._releaseOrderNo = changes.resourceId
|
|
593
972
|
}
|
|
973
|
+
this._clearPage()
|
|
594
974
|
|
|
595
975
|
if (this._releaseOrderNo) {
|
|
596
976
|
await this._fetchReleaseOrder(this._releaseOrderNo)
|
|
@@ -600,6 +980,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
600
980
|
}
|
|
601
981
|
|
|
602
982
|
async pageInitialized() {
|
|
983
|
+
await this._getAllPostCode()
|
|
984
|
+
await this.fetchCountry()
|
|
985
|
+
this.containerSizes = await getCodeByName('CONTAINER_SIZES')
|
|
986
|
+
|
|
603
987
|
this.isUserBelongsDomain = await this._checkUserBelongsDomain()
|
|
604
988
|
let [allowROAddProductSetting, userRoles] = [fetchSettingRule('allow-ro-add-product'), this.fetchUserRoleHandler()]
|
|
605
989
|
let [enableTransportationServiceSetting] = await Promise.all([fetchSettingRule('enable-transportation-service')])
|
|
@@ -612,7 +996,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
612
996
|
this.inventoryGristConfig = {
|
|
613
997
|
pagination: { infinite: true },
|
|
614
998
|
rows: { selectable: { multiple: true }, appendable: false },
|
|
615
|
-
list: { fields: ['sku', 'productName', 'batchId','invStatus', 'packingType', 'releaseQty', 'releaseUomValue'] },
|
|
999
|
+
list: { fields: ['sku', 'productName', 'batchId', 'invStatus', 'packingType', 'releaseQty', 'releaseUomValue'] },
|
|
616
1000
|
columns: [
|
|
617
1001
|
{ name: 'releaseUomValue', hidden: true },
|
|
618
1002
|
{ name: 'remainUomValue', hidden: true },
|
|
@@ -804,13 +1188,24 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
804
1188
|
truckNo
|
|
805
1189
|
type
|
|
806
1190
|
attentionTo
|
|
1191
|
+
attentionCompany
|
|
807
1192
|
phone1
|
|
808
1193
|
deliveryAddress1
|
|
1194
|
+
billingAddress
|
|
1195
|
+
billingCity
|
|
1196
|
+
billingCountry
|
|
1197
|
+
billingPostalCode
|
|
1198
|
+
billingState
|
|
1199
|
+
city
|
|
1200
|
+
state
|
|
1201
|
+
postalCode
|
|
1202
|
+
country
|
|
809
1203
|
remark
|
|
810
1204
|
bizplace {
|
|
811
1205
|
id
|
|
812
1206
|
name
|
|
813
1207
|
}
|
|
1208
|
+
orderMethod
|
|
814
1209
|
invStatus
|
|
815
1210
|
status
|
|
816
1211
|
refNo
|
|
@@ -824,6 +1219,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
824
1219
|
exportOption
|
|
825
1220
|
courierOption
|
|
826
1221
|
packingOption
|
|
1222
|
+
recall
|
|
827
1223
|
releaseDate
|
|
828
1224
|
collectionOrderNo
|
|
829
1225
|
attachment {
|
|
@@ -838,6 +1234,25 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
838
1234
|
name
|
|
839
1235
|
description
|
|
840
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
|
+
}
|
|
841
1256
|
inventoryInfos {
|
|
842
1257
|
id
|
|
843
1258
|
name
|
|
@@ -866,13 +1281,18 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
866
1281
|
name
|
|
867
1282
|
}
|
|
868
1283
|
status
|
|
1284
|
+
refWorksheetId
|
|
869
1285
|
}
|
|
870
1286
|
shippingOrderInfo {
|
|
871
1287
|
id
|
|
872
1288
|
containerNo
|
|
873
1289
|
containerLeavingDate
|
|
874
1290
|
containerArrivalDate
|
|
1291
|
+
containerClosureDate
|
|
1292
|
+
containerSize
|
|
1293
|
+
remindContainerDeparture
|
|
875
1294
|
shipName
|
|
1295
|
+
remark
|
|
876
1296
|
}
|
|
877
1297
|
orderVass {
|
|
878
1298
|
vas {
|
|
@@ -906,8 +1326,21 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
906
1326
|
if (!response.errors) {
|
|
907
1327
|
const releaseOrder = response.data.releaseGoodDetail
|
|
908
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
|
+
})
|
|
909
1340
|
|
|
910
1341
|
this.roType = releaseOrder.type
|
|
1342
|
+
this._orderMethod = releaseOrder.orderMethod
|
|
1343
|
+
this._isInBatchPicking = releaseOrder.inventoryInfos.some(inventoryInfo => inventoryInfo.refWorksheetId)
|
|
911
1344
|
const orderInventories = releaseOrder.inventoryInfos.map(inventoryInfo => {
|
|
912
1345
|
let roundedUomValue = parseFloat(inventoryInfo.releaseUomValue.toFixed(2))
|
|
913
1346
|
return {
|
|
@@ -939,7 +1372,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
939
1372
|
releaseUomValueWithUom: inventoryInfo.releaseUomValue + ' ' + inventoryInfo.uom,
|
|
940
1373
|
remainUomValueWithUom: `${inventoryInfo.uomValue - inventoryInfo.releaseUomValue} ${inventoryInfo.uom}`,
|
|
941
1374
|
status: inventoryInfo.status,
|
|
942
|
-
invStatus: inventoryInfo.status ==
|
|
1375
|
+
invStatus: inventoryInfo.status == 'MISSING',
|
|
943
1376
|
existing: true,
|
|
944
1377
|
roundedUomValue: `${roundedUomValue} ${inventoryInfo.uom}`,
|
|
945
1378
|
addableQty: inventoryInfo.qty - inventoryInfo.lockedQty,
|
|
@@ -948,16 +1381,29 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
948
1381
|
})
|
|
949
1382
|
|
|
950
1383
|
const orderVass = releaseOrder.orderVass
|
|
1384
|
+
this._releaseOrder = {
|
|
1385
|
+
...releaseOrder
|
|
1386
|
+
}
|
|
951
1387
|
|
|
952
1388
|
this._releaseOrderId = releaseOrder.id
|
|
953
1389
|
this.partnerBizplaceId = releaseOrder.bizplace.id
|
|
954
1390
|
this._exportOption = releaseOrder.exportOption
|
|
1391
|
+
this._recallOption = releaseOrder.recall
|
|
955
1392
|
|
|
956
1393
|
this._beforeRemark = releaseOrder?.remark
|
|
957
1394
|
this._courierOption = releaseOrder.courierOption
|
|
958
1395
|
this._packingOption = releaseOrder.packingOption
|
|
959
1396
|
this._crossDocking = releaseOrder?.crossDocking
|
|
960
1397
|
|
|
1398
|
+
if (
|
|
1399
|
+
releaseOrder?.postalCode === releaseOrder?.billingPostalCode &&
|
|
1400
|
+
releaseOrder?.billingAddress === releaseOrder.deliveryAddress1
|
|
1401
|
+
) {
|
|
1402
|
+
this._disableBillingAddress = true
|
|
1403
|
+
} else {
|
|
1404
|
+
this._disableBillingAddress = false
|
|
1405
|
+
}
|
|
1406
|
+
|
|
961
1407
|
await this.updateComplete
|
|
962
1408
|
|
|
963
1409
|
this._ganNo = releaseOrder?.arrivalNotice?.name
|
|
@@ -973,6 +1419,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
973
1419
|
this._fillupSOForm(shippingOrder)
|
|
974
1420
|
}
|
|
975
1421
|
|
|
1422
|
+
this._fillupDAForm(releaseOrder)
|
|
1423
|
+
|
|
976
1424
|
if (this._exportOption) {
|
|
977
1425
|
this._ownTransport = true
|
|
978
1426
|
this._ownTransportInput.checked = true
|
|
@@ -991,7 +1439,12 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
991
1439
|
} else {
|
|
992
1440
|
this._editable = false
|
|
993
1441
|
}
|
|
994
|
-
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
|
+
}
|
|
995
1448
|
this.vasData = {
|
|
996
1449
|
records: orderVass
|
|
997
1450
|
.sort((a, b) => a.set - b.set)
|
|
@@ -1165,15 +1618,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1165
1618
|
try {
|
|
1166
1619
|
const response = await client.mutate({
|
|
1167
1620
|
mutation: gql`
|
|
1168
|
-
mutation generateReleaseGoodWorksheet($releaseGoodNo: String
|
|
1169
|
-
generateReleaseGoodWorksheet(releaseGoodNo: $releaseGoodNo) {
|
|
1621
|
+
mutation generateReleaseGoodWorksheet($releaseGoodNo: String!, $currentStatus: String) {
|
|
1622
|
+
generateReleaseGoodWorksheet(releaseGoodNo: $releaseGoodNo, currentStatus: $currentStatus) {
|
|
1170
1623
|
pickingWorksheet {
|
|
1171
1624
|
name
|
|
1172
1625
|
}
|
|
1173
1626
|
}
|
|
1174
1627
|
}
|
|
1175
1628
|
`,
|
|
1176
|
-
variables: { releaseGoodNo: this._releaseOrderNo }
|
|
1629
|
+
variables: { releaseGoodNo: this._releaseOrderNo, currentStatus: this._status }
|
|
1177
1630
|
})
|
|
1178
1631
|
|
|
1179
1632
|
if (!response.errors) {
|
|
@@ -1194,7 +1647,16 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1194
1647
|
}
|
|
1195
1648
|
|
|
1196
1649
|
_fillupSOForm(data) {
|
|
1197
|
-
|
|
1650
|
+
data.exportRemark = data.remark
|
|
1651
|
+
this._remindContainerDepature = data?.remindContainerDepature || ''
|
|
1652
|
+
this._fillupForm(this.exportInfoForm, data)
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
_fillupDAForm(data) {
|
|
1656
|
+
this._fillupForm(this.shippingInfoForm, data)
|
|
1657
|
+
this._selectedCountry = data.country
|
|
1658
|
+
this._selectedBillingCountry = data.billingCountry
|
|
1659
|
+
this._releaseOrder.billingPostalCode = data.billingPostalCode
|
|
1198
1660
|
}
|
|
1199
1661
|
|
|
1200
1662
|
_fillupForm(form, data) {
|
|
@@ -1222,8 +1684,15 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1222
1684
|
}
|
|
1223
1685
|
|
|
1224
1686
|
_clearPage() {
|
|
1687
|
+
this._showReleasedOrderInfo = false
|
|
1688
|
+
this._showShippingInfo = true
|
|
1689
|
+
this._showExportInfo = true
|
|
1690
|
+
|
|
1691
|
+
this._releaseOrder = {}
|
|
1225
1692
|
this._status = null
|
|
1226
1693
|
this.roType = 'b2b'
|
|
1694
|
+
this._orderMethod = PICKING_STANDARD.SELECT_BY_PRODUCT.value
|
|
1695
|
+
this._isInBatchPicking = false
|
|
1227
1696
|
this._exportOption = false
|
|
1228
1697
|
this._courierOption = false
|
|
1229
1698
|
this._packingOption = false
|
|
@@ -1232,6 +1701,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1232
1701
|
this._beforeRemark = null
|
|
1233
1702
|
this._attachments = []
|
|
1234
1703
|
this.inventoryData = { records: [] }
|
|
1704
|
+
this.orderInventoryData = { records: [] }
|
|
1235
1705
|
this.vasData = { records: [] }
|
|
1236
1706
|
}
|
|
1237
1707
|
|
|
@@ -1298,7 +1768,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1298
1768
|
|
|
1299
1769
|
if (!response.errors) {
|
|
1300
1770
|
this._showToast({ message: i18next.t('text.release_order_is_submitted_for_cancellation') })
|
|
1301
|
-
navigate(`b2b_orders`)
|
|
1771
|
+
this.roType === 'b2b' ? navigate(`b2b_orders`) : navigate(`b2c_order_requests`)
|
|
1302
1772
|
}
|
|
1303
1773
|
} catch (e) {
|
|
1304
1774
|
throw e
|
|
@@ -1389,7 +1859,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1389
1859
|
<release-extra-product-popup
|
|
1390
1860
|
.releaseGoodNo="${this._releaseOrderNo}"
|
|
1391
1861
|
.bizplace="${this.partnerBizplaceId}"
|
|
1392
|
-
.existingInventoryData="${this.
|
|
1862
|
+
.existingInventoryData="${this.orderInventoryData}"
|
|
1863
|
+
.recall="${this._recallOption}"
|
|
1393
1864
|
@completed="${e => {
|
|
1394
1865
|
this._fetchReleaseOrder(this._releaseOrderNo)
|
|
1395
1866
|
this.updateContext()
|
|
@@ -1446,22 +1917,45 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1446
1917
|
delete releaseOrder.bizplaceName
|
|
1447
1918
|
delete releaseOrder.status
|
|
1448
1919
|
delete releaseOrder.ganNo
|
|
1920
|
+
delete releaseOrder.recall
|
|
1921
|
+
|
|
1922
|
+
let shippingOrderInfo = {}
|
|
1923
|
+
|
|
1924
|
+
let contactPointInfo = this._serializeForm(this.shippingInfoForm)
|
|
1925
|
+
|
|
1926
|
+
shippingOrderInfo = {
|
|
1927
|
+
...contactPointInfo
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
delete shippingOrderInfo['']
|
|
1931
|
+
delete shippingOrderInfo.matchDeliveryAddressInputa
|
|
1932
|
+
|
|
1933
|
+
// If match delivery address is ticked, all the billing address info will be the same with delivery address info
|
|
1934
|
+
if (this._disableBillingAddress) {
|
|
1935
|
+
shippingOrderInfo.billingAddress = contactPointInfo.deliveryAddress1
|
|
1936
|
+
shippingOrderInfo.billingPostalCode = contactPointInfo.postalCode
|
|
1937
|
+
shippingOrderInfo.billingCity = contactPointInfo.city
|
|
1938
|
+
shippingOrderInfo.billingState = contactPointInfo.state
|
|
1939
|
+
shippingOrderInfo.billingCountry = contactPointInfo.country
|
|
1940
|
+
}
|
|
1449
1941
|
|
|
1450
1942
|
let afterRemarkValue
|
|
1451
1943
|
if (releaseOrder?.remark) {
|
|
1452
1944
|
afterRemarkValue = releaseOrder.remark = releaseOrder.remark.trimStart()
|
|
1453
1945
|
}
|
|
1454
1946
|
|
|
1455
|
-
if (this.
|
|
1456
|
-
if (
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1947
|
+
if (this.roType === 'b2c') {
|
|
1948
|
+
if (this._beforeRemark !== afterRemarkValue) {
|
|
1949
|
+
if (!afterRemarkValue) {
|
|
1950
|
+
const remarkResult = await CustomAlert({
|
|
1951
|
+
title: i18next.t('title.removing_order_remark'),
|
|
1952
|
+
text: i18next.t('text.do_you_want_to_proceed'),
|
|
1953
|
+
confirmButton: { text: i18next.t('button.proceed') },
|
|
1954
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
1955
|
+
})
|
|
1956
|
+
|
|
1957
|
+
if (!remarkResult.value) return
|
|
1958
|
+
}
|
|
1465
1959
|
}
|
|
1466
1960
|
}
|
|
1467
1961
|
|
|
@@ -1474,12 +1968,18 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1474
1968
|
|
|
1475
1969
|
if (!result.value) return
|
|
1476
1970
|
|
|
1477
|
-
let shippingOrder = this._exportOption ? this._serializeForm(this.shippingOrderForm) : null
|
|
1478
|
-
|
|
1479
1971
|
const response = await client.mutate({
|
|
1480
1972
|
mutation: gql`
|
|
1481
|
-
mutation updateReleaseGoodDetails(
|
|
1482
|
-
|
|
1973
|
+
mutation updateReleaseGoodDetails(
|
|
1974
|
+
$releaseOrder: ReleaseGoodPatch!
|
|
1975
|
+
$shippingOrder: ShippingOrderPatch
|
|
1976
|
+
$shippingOrderInfo: ShippingOrderInfoPatch
|
|
1977
|
+
) {
|
|
1978
|
+
updateReleaseGoodDetails(
|
|
1979
|
+
releaseGood: $releaseOrder
|
|
1980
|
+
shippingOrder: $shippingOrder
|
|
1981
|
+
shippingOrderInfo: $shippingOrderInfo
|
|
1982
|
+
) {
|
|
1483
1983
|
id
|
|
1484
1984
|
name
|
|
1485
1985
|
}
|
|
@@ -1492,7 +1992,8 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1492
1992
|
name: this._releaseOrderNo,
|
|
1493
1993
|
ownTransport: this._importCargo ? true : this._ownTransport
|
|
1494
1994
|
},
|
|
1495
|
-
shippingOrder
|
|
1995
|
+
shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
|
|
1996
|
+
shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null
|
|
1496
1997
|
}
|
|
1497
1998
|
})
|
|
1498
1999
|
|
|
@@ -1505,6 +2006,130 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1505
2006
|
}
|
|
1506
2007
|
}
|
|
1507
2008
|
|
|
2009
|
+
_openContactPointSelector() {
|
|
2010
|
+
openPopup(
|
|
2011
|
+
html`
|
|
2012
|
+
<contact-points-popup
|
|
2013
|
+
@selected="${e => {
|
|
2014
|
+
this._fillUpDeliveryInfo(e.detail)
|
|
2015
|
+
}}"
|
|
2016
|
+
></contact-points-popup>
|
|
2017
|
+
`,
|
|
2018
|
+
{
|
|
2019
|
+
backdrop: true,
|
|
2020
|
+
size: 'large',
|
|
2021
|
+
title: i18next.t('title.select_destination')
|
|
2022
|
+
}
|
|
2023
|
+
)
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
matchDeliveryAddress() {
|
|
2027
|
+
this._billingFullAddress = ''
|
|
2028
|
+
this._billingState = ''
|
|
2029
|
+
this._billingCity = ''
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
async _getAllPostCode() {
|
|
2033
|
+
try {
|
|
2034
|
+
const response = await client.query({
|
|
2035
|
+
query: gql`
|
|
2036
|
+
query geoAreasAllPostCode {
|
|
2037
|
+
geoAreasAllPostCode {
|
|
2038
|
+
items {
|
|
2039
|
+
postalCode
|
|
2040
|
+
}
|
|
2041
|
+
total
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
`
|
|
2045
|
+
})
|
|
2046
|
+
|
|
2047
|
+
if (!response.errors) {
|
|
2048
|
+
const items = response.data.geoAreasAllPostCode.items
|
|
2049
|
+
this._deliveryPostCode = items
|
|
2050
|
+
this._billingPostCode = items
|
|
2051
|
+
|
|
2052
|
+
return true
|
|
2053
|
+
}
|
|
2054
|
+
} catch (e) {
|
|
2055
|
+
this._showToast(e)
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
async _getStateAndCityByPostCode(value, name) {
|
|
2060
|
+
const postCode = value
|
|
2061
|
+
|
|
2062
|
+
// If user select the first empty postal code, the city and state will change to empty
|
|
2063
|
+
if (postCode == '') {
|
|
2064
|
+
if (name == 'postalCode') {
|
|
2065
|
+
this._cityInput.value = ''
|
|
2066
|
+
this._stateInput.value = ''
|
|
2067
|
+
return
|
|
2068
|
+
} else if (name == 'billingPostalCode') {
|
|
2069
|
+
this._cityBillingInput.value = ''
|
|
2070
|
+
this._stateBillingInput.value = ''
|
|
2071
|
+
return
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
try {
|
|
2076
|
+
const response = await client.query({
|
|
2077
|
+
query: gql`
|
|
2078
|
+
query geoAreasGetStateAndCityByPosCode($postCode: String!) {
|
|
2079
|
+
geoAreasGetStateAndCityByPosCode(postCode: $postCode) {
|
|
2080
|
+
stateName
|
|
2081
|
+
cityName
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
`,
|
|
2085
|
+
variables: {
|
|
2086
|
+
postCode
|
|
2087
|
+
}
|
|
2088
|
+
})
|
|
2089
|
+
|
|
2090
|
+
if (!response.errors) {
|
|
2091
|
+
const { stateName, cityName } = response.data.geoAreasGetStateAndCityByPosCode
|
|
2092
|
+
|
|
2093
|
+
switch (name) {
|
|
2094
|
+
case 'postalCode':
|
|
2095
|
+
this._cityInput.value = stateName
|
|
2096
|
+
this._stateInput.value = cityName.toUpperCase()
|
|
2097
|
+
break
|
|
2098
|
+
|
|
2099
|
+
case 'billingPostalCode':
|
|
2100
|
+
this._cityBillingInput.value = stateName
|
|
2101
|
+
this._stateBillingInput.value = cityName.toUpperCase()
|
|
2102
|
+
|
|
2103
|
+
default:
|
|
2104
|
+
break
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
} catch (error) {
|
|
2108
|
+
this._showToast(e)
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
async fetchCountry() {
|
|
2113
|
+
const response = await client.query({
|
|
2114
|
+
query: gql`
|
|
2115
|
+
query geoCountriesWithoutParam {
|
|
2116
|
+
geoCountriesWithoutParam {
|
|
2117
|
+
items {
|
|
2118
|
+
id
|
|
2119
|
+
name
|
|
2120
|
+
description
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
`
|
|
2125
|
+
})
|
|
2126
|
+
|
|
2127
|
+
if (!response.error) {
|
|
2128
|
+
this._billingAllCountry = response.data.geoCountriesWithoutParam.items
|
|
2129
|
+
this._deliveryAllCountry = response.data.geoCountriesWithoutParam.items
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
|
|
1508
2133
|
_getFormInfo() {
|
|
1509
2134
|
let formData = this._serializeForm(this.releaseOrderForm)
|
|
1510
2135
|
delete formData.importedOrder
|
|
@@ -1537,6 +2162,10 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1537
2162
|
throw new Error(i18next.t('text.release_order_form_invalid'))
|
|
1538
2163
|
}
|
|
1539
2164
|
|
|
2165
|
+
if (this._exportOption && !this.exportInfoForm.checkValidity()) {
|
|
2166
|
+
throw new Error(i18next.t('text.export_form_is_invalid'))
|
|
2167
|
+
}
|
|
2168
|
+
|
|
1540
2169
|
// - condition: export is ticked
|
|
1541
2170
|
if (this.shippingOrderForm) {
|
|
1542
2171
|
if (!this.shippingOrderForm.checkValidity()) {
|
|
@@ -1561,6 +2190,59 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1561
2190
|
date.setDate(date.getDate())
|
|
1562
2191
|
return date.toISOString().split('T')[0]
|
|
1563
2192
|
}
|
|
2193
|
+
|
|
2194
|
+
async _tabChange(key) {
|
|
2195
|
+
if (key == 'order') {
|
|
2196
|
+
this._showReleasedOrderInfo = false
|
|
2197
|
+
this._showShippingInfo = true
|
|
2198
|
+
this._showExportInfo = true
|
|
2199
|
+
} else if (key == 'shipment') {
|
|
2200
|
+
this._showReleasedOrderInfo = true
|
|
2201
|
+
this._showShippingInfo = false
|
|
2202
|
+
this._showExportInfo = true
|
|
2203
|
+
} else {
|
|
2204
|
+
this.containerSizes = await getCodeByName('CONTAINER_SIZES')
|
|
2205
|
+
|
|
2206
|
+
this._showReleasedOrderInfo = true
|
|
2207
|
+
this._showShippingInfo = true
|
|
2208
|
+
this._showExportInfo = false
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
_fillUpDeliveryInfo(data) {
|
|
2213
|
+
// remapping according release good table
|
|
2214
|
+
const remapData = {
|
|
2215
|
+
attentionCompany: data.companyName || '',
|
|
2216
|
+
attentionTo: data.name || '',
|
|
2217
|
+
city: data.city || '',
|
|
2218
|
+
state: data.state || '',
|
|
2219
|
+
postalCode: data.postCode || '',
|
|
2220
|
+
country: 'Malaysia',
|
|
2221
|
+
phone1: data.phone || '',
|
|
2222
|
+
deliveryAddress1: data.address ? data.address : '' + data.address2 ? data.address2 : '',
|
|
2223
|
+
billingAddress: data.billingAddress
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
this._selectedPostCode = data.postCode
|
|
2227
|
+
|
|
2228
|
+
this._fillupForm(this.shippingInfoForm, remapData)
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
_validateCountry(e) {
|
|
2232
|
+
if (e.target.value != 'MALAYSIA') {
|
|
2233
|
+
this._selectedCountry = e.target.value
|
|
2234
|
+
} else {
|
|
2235
|
+
this._selectedCountry = e.target.value
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
_validateBillingCountry(e) {
|
|
2240
|
+
if (e.target.value != 'MALAYSIA') {
|
|
2241
|
+
this._selectedBillingCountry = e.target.value
|
|
2242
|
+
} else {
|
|
2243
|
+
this._selectedBillingCountry = e.target.value
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
1564
2246
|
}
|
|
1565
2247
|
|
|
1566
2248
|
window.customElements.define('release-order-detail', ReleaseOrderDetail)
|