@things-factory/operato-wms 4.0.24 → 4.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/adjustment/transfer-inventory.js +32 -6
- package/client/pages/bulk-operation/bulk-operation.js +189 -64
- package/client/pages/bulk-operation/validate-gan-popup.js +391 -0
- package/client/pages/bulk-operation/validate-ro-popup.js +52 -22
- package/client/pages/components/popup-unloading.js +47 -34
- package/client/pages/components/select-product-popup.js +74 -27
- package/client/pages/components/worksheet-information-popup.js +100 -0
- package/client/pages/inbound/putaway-product.js +184 -231
- package/client/pages/inbound/undo-unload-popup.js +295 -0
- package/client/pages/inbound/unload-product.js +229 -567
- package/client/pages/inbound/unloaded-inventories-popup.js +129 -0
- package/client/pages/inbound/worksheet-unloading.js +15 -11
- package/client/pages/inventory/inventory-adjustment.js +9 -10
- package/client/pages/master/product/product-list.js +1 -1
- package/client/pages/order/arrival-notice/arrival-notice-detail.js +409 -21
- package/client/pages/order/arrival-notice/create-arrival-notice.js +89 -13
- package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +90 -10
- package/client/pages/order/arrival-notice/edit-product-popup.js +2 -2
- package/client/pages/order/release-order/b2b/b2b-order-list.js +78 -2
- package/client/pages/order/release-order/b2b/b2b-order-requests.js +32 -16
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +49 -5
- package/client/pages/order/release-order/batch-generate-single-picking-worksheet-popup.js +314 -0
- package/client/pages/order/release-order/batch-picking-popup.js +19 -2
- package/client/pages/order/release-order/create-release-order.js +194 -89
- package/client/pages/order/release-order/release-order-detail.js +390 -107
- package/client/pages/order/return-order/create-return-order.js +3 -3
- package/client/pages/order/transport-order/create-delivery-order.js +1 -1
- package/client/pages/order/transport-order/delivery-order-list.js +1 -1
- package/client/pages/outbound/packing-product.js +111 -236
- package/client/pages/outbound/picking-product.js +287 -380
- package/client/pages/outbound/sorting-product.js +66 -63
- package/client/pages/outbound/worksheet-loading.js +7 -3
- package/client/pages/outbound/worksheet-packing.js +3 -3
- package/client/pages/outbound/worksheet-picking.js +22 -18
- package/client/pages/vas/print-product-label.js +17 -9
- package/dist-server/graphql/resolvers/reports/product-label-report.js +1 -0
- package/dist-server/graphql/resolvers/reports/product-label-report.js.map +1 -1
- package/package.json +65 -65
- package/server/graphql/resolvers/reports/product-label-report.ts +1 -0
- package/translations/en.json +31 -2
- package/translations/ko.json +32 -3
- package/translations/ms.json +32 -3
- package/translations/zh.json +32 -3
|
@@ -2,12 +2,13 @@ import '@things-factory/barcode-ui'
|
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
3
|
import './scan-inventory-popup'
|
|
4
4
|
import './select-location-popup'
|
|
5
|
+
import '../components/worksheet-information-popup'
|
|
5
6
|
|
|
6
7
|
import gql from 'graphql-tag'
|
|
7
8
|
import { css, html } from 'lit-element'
|
|
8
9
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
9
10
|
|
|
10
|
-
import { MultiColumnFormStyles
|
|
11
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
11
12
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
12
13
|
import { openPopup } from '@things-factory/layout-base'
|
|
13
14
|
import { client, CustomAlert, PageView, store } from '@things-factory/shell'
|
|
@@ -27,57 +28,40 @@ const AVAIL_ORDER_TYPES = { ARRIVAL_NOTICE, CUSTOMER_RETURN, WAREHOUSE_RETURN }
|
|
|
27
28
|
class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
28
29
|
static get properties() {
|
|
29
30
|
return {
|
|
30
|
-
refOrderType: String,
|
|
31
|
-
orderNo: String,
|
|
32
31
|
config: Object,
|
|
33
32
|
data: Object,
|
|
33
|
+
incompleteLocationName: Boolean,
|
|
34
|
+
locations: Array,
|
|
35
|
+
orderNo: String,
|
|
36
|
+
refOrderType: String,
|
|
37
|
+
recommendLocationName: String,
|
|
38
|
+
_bizplaceName: String,
|
|
34
39
|
_enableCartonLabel: Boolean,
|
|
40
|
+
_expirationDate: Number,
|
|
41
|
+
_expirationPeriod: Number,
|
|
42
|
+
_locationType: String,
|
|
43
|
+
_operationType: String,
|
|
44
|
+
_orderNo: String,
|
|
35
45
|
_productName: String,
|
|
36
46
|
_productSku: String,
|
|
37
47
|
_selectedTaskStatus: String,
|
|
38
|
-
_operationType: String,
|
|
39
|
-
incompleteLocationName: Boolean,
|
|
40
|
-
locations: Array,
|
|
41
|
-
recommendLocationName: String,
|
|
42
48
|
_scanning: Boolean,
|
|
43
|
-
|
|
44
|
-
_expirationDate: Number,
|
|
45
|
-
_locationType: String
|
|
49
|
+
_worksheetInfo: Object
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
static get styles() {
|
|
50
54
|
return [
|
|
51
|
-
SingleColumnFormStyles,
|
|
52
55
|
MultiColumnFormStyles,
|
|
53
56
|
css`
|
|
54
57
|
:host {
|
|
55
58
|
display: flex;
|
|
56
59
|
flex-direction: column;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.grist {
|
|
60
|
-
background-color: var(--main-section-background-color);
|
|
61
|
-
display: flex;
|
|
62
|
-
overflow: auto;
|
|
63
|
-
flex: 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.left-column {
|
|
67
|
-
flex: 1;
|
|
68
60
|
overflow: hidden;
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.right-column {
|
|
74
|
-
flex: 1;
|
|
75
|
-
overflow: auto;
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: column;
|
|
78
61
|
}
|
|
79
62
|
|
|
80
63
|
data-grist {
|
|
64
|
+
overflow: auto;
|
|
81
65
|
flex: 1;
|
|
82
66
|
}
|
|
83
67
|
|
|
@@ -87,28 +71,13 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
87
71
|
color: var(--subtitle-text-color);
|
|
88
72
|
border-bottom: var(--subtitle-border-bottom);
|
|
89
73
|
}
|
|
90
|
-
.grist h2 {
|
|
91
|
-
margin: var(--grist-title-margin);
|
|
92
|
-
border: var(--grist-title-border);
|
|
93
|
-
font: var(--grist-title-font);
|
|
94
|
-
color: var(--secondary-color);
|
|
95
|
-
}
|
|
96
74
|
|
|
97
|
-
|
|
75
|
+
legend mwc-icon {
|
|
98
76
|
vertical-align: middle;
|
|
99
77
|
margin: var(--grist-title-icon-margin);
|
|
100
78
|
font-size: var(--grist-title-icon-size);
|
|
101
79
|
color: var(--grist-title-icon-color);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
h2 + data-grist {
|
|
105
|
-
padding-top: var(--grist-title-with-grid-padding);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@media (max-width: 460px) {
|
|
109
|
-
:host {
|
|
110
|
-
display: block;
|
|
111
|
-
}
|
|
80
|
+
cursor: pointer;
|
|
112
81
|
}
|
|
113
82
|
`
|
|
114
83
|
]
|
|
@@ -144,12 +113,12 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
144
113
|
}
|
|
145
114
|
}
|
|
146
115
|
|
|
147
|
-
get
|
|
148
|
-
return this.shadowRoot.querySelector('
|
|
116
|
+
get cartonInput() {
|
|
117
|
+
return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]').shadowRoot.querySelector('input')
|
|
149
118
|
}
|
|
150
119
|
|
|
151
|
-
get
|
|
152
|
-
return this.shadowRoot.querySelector('
|
|
120
|
+
get grist() {
|
|
121
|
+
return this.shadowRoot.querySelector('data-grist')
|
|
153
122
|
}
|
|
154
123
|
|
|
155
124
|
get infoForm() {
|
|
@@ -160,18 +129,6 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
160
129
|
return this.shadowRoot.querySelector('form#input-form')
|
|
161
130
|
}
|
|
162
131
|
|
|
163
|
-
get grist() {
|
|
164
|
-
return this.shadowRoot.querySelector('data-grist')
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
get palletInput() {
|
|
168
|
-
return this.shadowRoot.querySelector('barcode-scanable-input[name=palletId]').shadowRoot.querySelector('input')
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
get cartonInput() {
|
|
172
|
-
return this.shadowRoot.querySelector('barcode-scanable-input[name=cartonId]').shadowRoot.querySelector('input')
|
|
173
|
-
}
|
|
174
|
-
|
|
175
132
|
get locationInput() {
|
|
176
133
|
return this.shadowRoot.querySelector('barcode-scanable-input[name=locationCode]').shadowRoot.querySelector('input')
|
|
177
134
|
}
|
|
@@ -180,19 +137,30 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
180
137
|
return this.shadowRoot.querySelector('select[name=newLocationCode]')
|
|
181
138
|
}
|
|
182
139
|
|
|
183
|
-
get
|
|
184
|
-
return this.shadowRoot.querySelector('
|
|
140
|
+
get orderTypeSelector() {
|
|
141
|
+
return this.shadowRoot.querySelector('select[name=orderType]')
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
get orderNoInput() {
|
|
145
|
+
return this.shadowRoot.querySelector('barcode-scanable-input[name=orderNo]').shadowRoot.querySelector('input')
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
get palletInput() {
|
|
149
|
+
return this.shadowRoot.querySelector('barcode-scanable-input[name=palletId]').shadowRoot.querySelector('input')
|
|
185
150
|
}
|
|
186
151
|
|
|
187
152
|
get qtyInput() {
|
|
188
153
|
return this.shadowRoot.querySelector('input[name=transferQty]')
|
|
189
154
|
}
|
|
190
155
|
|
|
156
|
+
get toPalletInput() {
|
|
157
|
+
return this.shadowRoot.querySelector('barcode-scanable-input[name=toPalletId]').shadowRoot.querySelector('input')
|
|
158
|
+
}
|
|
159
|
+
|
|
191
160
|
render() {
|
|
192
161
|
return html`
|
|
193
162
|
<form id="info-form" class="multi-column-form">
|
|
194
163
|
<fieldset>
|
|
195
|
-
<legend>${i18next.t('title.scan_area')}</legend>
|
|
196
164
|
<label>${i18next.t('label.order_type')}</label>
|
|
197
165
|
<select name="orderType" @change="${this.orderTypeChangeHandler.bind(this)}">
|
|
198
166
|
${Object.keys(AVAIL_ORDER_TYPES).map(key =>
|
|
@@ -224,101 +192,60 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
224
192
|
}}"
|
|
225
193
|
></barcode-scanable-input>
|
|
226
194
|
</fieldset>
|
|
195
|
+
</form>
|
|
227
196
|
|
|
197
|
+
<form id="input-form" class="multi-column-form" @keypress="${this._transactionHandler.bind(this)}">
|
|
228
198
|
<fieldset>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
199
|
+
${this.recommendLocationName
|
|
200
|
+
? html` <label>${i18next.t('label.recommend_location')}</label>
|
|
201
|
+
<input name="recommendLocation" type="text" value=${this.recommendLocationName} readonly />`
|
|
202
|
+
: html``}
|
|
203
|
+
${this._enableCartonLabel
|
|
204
|
+
? html`
|
|
205
|
+
<label>${i18next.t('label.carton_id')}</label>
|
|
206
|
+
<barcode-scanable-input name="cartonId" custom-input></barcode-scanable-input>
|
|
207
|
+
`
|
|
208
|
+
: html`
|
|
209
|
+
<label>${i18next.t('label.lot_barcode')}</label>
|
|
210
|
+
<barcode-scanable-input name="palletId" .value=${this._pallet} custom-input></barcode-scanable-input>
|
|
211
|
+
`}
|
|
212
|
+
${this._operationType === OPERATION_TYPE.PUTAWAY
|
|
213
|
+
? html` <label>${i18next.t('label.location')}</label>
|
|
214
|
+
<barcode-scanable-input
|
|
215
|
+
name="locationCode"
|
|
216
|
+
.value=${this._location}
|
|
217
|
+
custom-input
|
|
218
|
+
></barcode-scanable-input>`
|
|
219
|
+
: ''}
|
|
220
|
+
${this._operationType === OPERATION_TYPE.TRANSFER
|
|
221
|
+
? html` <label>${i18next.t('label.to_lot_barcode')}</label>
|
|
222
|
+
<barcode-scanable-input
|
|
223
|
+
name="toPalletId"
|
|
224
|
+
.value=${this._location}
|
|
225
|
+
custom-input
|
|
226
|
+
></barcode-scanable-input>
|
|
227
|
+
|
|
228
|
+
<label>${i18next.t('label.qty')}</label>
|
|
229
|
+
<input type="number" min="1" name="transferQty" />`
|
|
230
|
+
: html``}
|
|
246
231
|
</fieldset>
|
|
247
232
|
</form>
|
|
248
233
|
|
|
249
|
-
<
|
|
250
|
-
<div
|
|
251
|
-
<
|
|
252
|
-
<data-grist
|
|
253
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
254
|
-
.config=${this.config}
|
|
255
|
-
.data=${this.data}
|
|
256
|
-
></data-grist>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<div class="right-column">
|
|
260
|
-
<form id="input-form" class="single-column-form" @keypress="${this._transactionHandler.bind(this)}">
|
|
234
|
+
<data-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .data=${this.data}>
|
|
235
|
+
<div slot="headroom" id="form-section">
|
|
236
|
+
<form id="info-form" class="multi-column-form">
|
|
261
237
|
<fieldset>
|
|
262
|
-
<legend
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<label>${i18next.t('label.batch_no_ref')}</label>
|
|
271
|
-
<input name="batchIdRef" readonly />
|
|
272
|
-
|
|
273
|
-
<label>${i18next.t('label.packing_type')}</label>
|
|
274
|
-
<input name="packingTypeSize" readonly />
|
|
275
|
-
|
|
276
|
-
<label>${i18next.t('label.current_location')}</label>
|
|
277
|
-
<input name="location" readonly />
|
|
278
|
-
</fieldset>
|
|
279
|
-
|
|
280
|
-
<fieldset>
|
|
281
|
-
<legend>${i18next.t('title.input_section')}</legend>
|
|
282
|
-
${this.recommendLocationName
|
|
283
|
-
? html` <label>${i18next.t('label.recommend_location')}</label>
|
|
284
|
-
<input name="recommendLocation" type="text" value=${this.recommendLocationName} readonly />`
|
|
285
|
-
: html``}
|
|
286
|
-
${this._enableCartonLabel
|
|
287
|
-
? html`
|
|
288
|
-
<label>${i18next.t('label.carton_id')}</label>
|
|
289
|
-
<barcode-scanable-input name="cartonId" custom-input></barcode-scanable-input>
|
|
290
|
-
`
|
|
291
|
-
: html`
|
|
292
|
-
<label>${i18next.t('label.lot_barcode')}</label>
|
|
293
|
-
<barcode-scanable-input
|
|
294
|
-
name="palletId"
|
|
295
|
-
.value=${this._pallet}
|
|
296
|
-
custom-input
|
|
297
|
-
></barcode-scanable-input>
|
|
298
|
-
`}
|
|
299
|
-
${this._operationType === OPERATION_TYPE.PUTAWAY
|
|
300
|
-
? html` <label>${i18next.t('label.location')}</label>
|
|
301
|
-
<barcode-scanable-input
|
|
302
|
-
name="locationCode"
|
|
303
|
-
.value=${this._location}
|
|
304
|
-
custom-input
|
|
305
|
-
></barcode-scanable-input>`
|
|
306
|
-
: ''}
|
|
307
|
-
${this._operationType === OPERATION_TYPE.TRANSFER
|
|
308
|
-
? html` <label>${i18next.t('label.to_lot_barcode')}</label>
|
|
309
|
-
<barcode-scanable-input
|
|
310
|
-
name="toPalletId"
|
|
311
|
-
.value=${this._location}
|
|
312
|
-
custom-input
|
|
313
|
-
></barcode-scanable-input>
|
|
314
|
-
|
|
315
|
-
<label>${i18next.t('label.qty')}</label>
|
|
316
|
-
<input type="number" min="1" name="transferQty" />`
|
|
317
|
-
: html``}
|
|
238
|
+
<legend>
|
|
239
|
+
${i18next.t('title.order_no')}: ${this._orderNo}
|
|
240
|
+
${this._orderNo
|
|
241
|
+
? html`(${this._bizplaceName})
|
|
242
|
+
<mwc-icon @click="${this._openWorksheetInformation.bind(this)}">info</mwc-icon>`
|
|
243
|
+
: ''}
|
|
244
|
+
</legend>
|
|
318
245
|
</fieldset>
|
|
319
246
|
</form>
|
|
320
247
|
</div>
|
|
321
|
-
</
|
|
248
|
+
</data-grist>
|
|
322
249
|
`
|
|
323
250
|
}
|
|
324
251
|
|
|
@@ -326,8 +253,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
326
253
|
super()
|
|
327
254
|
this.data = { records: [] }
|
|
328
255
|
this.refOrderType = AVAIL_ORDER_TYPES.ARRIVAL_NOTICE.value
|
|
329
|
-
this.
|
|
330
|
-
this.orderNo = ''
|
|
256
|
+
this._orderNo = ''
|
|
331
257
|
this._selectedOrderProduct = null
|
|
332
258
|
this._selectedTaskStatus = null
|
|
333
259
|
this.recommendLocationName = null
|
|
@@ -372,16 +298,11 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
372
298
|
this._selectedTaskStatus = null
|
|
373
299
|
this._selectedTaskStatus = record.status
|
|
374
300
|
this.recommendLocationName = null
|
|
375
|
-
this._productName = `${record.product.sku + ' - ' + record.product.name} ${
|
|
376
|
-
record.product.description ? `(${record.product.description})` : ''
|
|
377
|
-
}`
|
|
378
301
|
|
|
379
302
|
if (!record.completed && this.refOrderType !== AVAIL_ORDER_TYPES.WAREHOUSE_RETURN.value) {
|
|
380
303
|
this.recommendLocationName = (await this._getLocationRecommendation(record.name)) || null
|
|
381
304
|
}
|
|
382
305
|
|
|
383
|
-
this._fillUpForm(this.inputForm, record)
|
|
384
|
-
|
|
385
306
|
if (this._enableCartonLabel && record?.cartonId) this._focusOnCartonInput()
|
|
386
307
|
else this._focusOnPalletInput()
|
|
387
308
|
}
|
|
@@ -398,12 +319,6 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
398
319
|
header: i18next.t('field.completed'),
|
|
399
320
|
width: 40
|
|
400
321
|
},
|
|
401
|
-
{
|
|
402
|
-
type: 'object',
|
|
403
|
-
name: 'product',
|
|
404
|
-
header: i18next.t('field.product'),
|
|
405
|
-
width: 140
|
|
406
|
-
},
|
|
407
322
|
{
|
|
408
323
|
type: 'string',
|
|
409
324
|
name: 'palletId',
|
|
@@ -417,9 +332,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
417
332
|
width: 140
|
|
418
333
|
},
|
|
419
334
|
{
|
|
420
|
-
type: '
|
|
421
|
-
name: '
|
|
422
|
-
header: i18next.t('field.
|
|
335
|
+
type: 'object',
|
|
336
|
+
name: 'product',
|
|
337
|
+
header: i18next.t('field.product'),
|
|
423
338
|
width: 140
|
|
424
339
|
},
|
|
425
340
|
{
|
|
@@ -428,6 +343,24 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
428
343
|
header: i18next.t('field.batch_id'),
|
|
429
344
|
width: 140
|
|
430
345
|
},
|
|
346
|
+
{
|
|
347
|
+
type: 'string',
|
|
348
|
+
name: 'packingType',
|
|
349
|
+
header: i18next.t('field.packing_type'),
|
|
350
|
+
width: 140
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
type: 'string',
|
|
354
|
+
name: 'packingSize',
|
|
355
|
+
header: i18next.t('field.packing_size'),
|
|
356
|
+
width: 140
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
type: 'date',
|
|
360
|
+
name: 'expirationDate',
|
|
361
|
+
header: i18next.t('field.exp_date'),
|
|
362
|
+
width: 140
|
|
363
|
+
},
|
|
431
364
|
{
|
|
432
365
|
type: 'integer',
|
|
433
366
|
name: 'qty',
|
|
@@ -435,8 +368,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
435
368
|
width: 80
|
|
436
369
|
},
|
|
437
370
|
{
|
|
438
|
-
type: '
|
|
439
|
-
name: '
|
|
371
|
+
type: 'object',
|
|
372
|
+
name: 'reusablePallet',
|
|
440
373
|
header: i18next.t('field.reusable_pallet'),
|
|
441
374
|
width: 140
|
|
442
375
|
}
|
|
@@ -491,6 +424,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
491
424
|
partnerDomainId
|
|
492
425
|
customerCompanyDomainId
|
|
493
426
|
refNo
|
|
427
|
+
refNo2
|
|
428
|
+
refNo3
|
|
494
429
|
startedAt
|
|
495
430
|
}
|
|
496
431
|
worksheetDetailInfos {
|
|
@@ -528,10 +463,11 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
528
463
|
})
|
|
529
464
|
|
|
530
465
|
if (!response.errors) {
|
|
531
|
-
this.
|
|
466
|
+
this._orderNo = orderNo
|
|
532
467
|
const worksheetInfo = response.data.putawayWorksheet.worksheetInfo
|
|
533
468
|
const partnerDomainId = worksheetInfo.partnerDomainId
|
|
534
|
-
this.
|
|
469
|
+
this._worksheetInfo = worksheetInfo
|
|
470
|
+
this._bizplaceName = worksheetInfo.bizplaceName
|
|
535
471
|
|
|
536
472
|
this.data = {
|
|
537
473
|
records: response.data.putawayWorksheet.worksheetDetailInfos
|
|
@@ -580,6 +516,9 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
580
516
|
partnerDomainId
|
|
581
517
|
customerCompanyDomainId
|
|
582
518
|
refNo
|
|
519
|
+
refNo
|
|
520
|
+
refNo2
|
|
521
|
+
refNo3
|
|
583
522
|
startedAt
|
|
584
523
|
}
|
|
585
524
|
worksheetDetailInfos {
|
|
@@ -616,22 +555,17 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
616
555
|
})
|
|
617
556
|
|
|
618
557
|
if (!response.errors) {
|
|
619
|
-
this.
|
|
558
|
+
this._orderNo = orderNo
|
|
620
559
|
const worksheetInfo = response.data.putawayReturningWorksheet.worksheetInfo
|
|
621
|
-
this.
|
|
560
|
+
this._worksheetInfo = worksheetInfo
|
|
561
|
+
this._bizplaceName = worksheetInfo.bizplaceName
|
|
622
562
|
|
|
623
563
|
this.data = {
|
|
624
564
|
records: response.data.putawayReturningWorksheet.worksheetDetailInfos
|
|
625
565
|
.map(record => {
|
|
626
|
-
let reusablePalletName = ''
|
|
627
|
-
if (record.reusablePallet) {
|
|
628
|
-
reusablePalletName = record.reusablePallet.name
|
|
629
|
-
}
|
|
630
566
|
return {
|
|
631
567
|
...record,
|
|
632
568
|
completed: record.status === WORKSHEET_STATUS.DONE.value,
|
|
633
|
-
packingTypeSize: `${record.packingType}(${record.packingSize})`,
|
|
634
|
-
reusablePalletName: reusablePalletName,
|
|
635
569
|
expirationPeriod: record.product.expirationPeriod,
|
|
636
570
|
expirationDate: record.expirationDate
|
|
637
571
|
}
|
|
@@ -668,6 +602,8 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
668
602
|
partnerDomainId
|
|
669
603
|
customerCompanyDomainId
|
|
670
604
|
refNo
|
|
605
|
+
refNo2
|
|
606
|
+
refNo3
|
|
671
607
|
startedAt
|
|
672
608
|
}
|
|
673
609
|
worksheetDetailInfos {
|
|
@@ -698,17 +634,17 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
698
634
|
variables: { releaseGoodNo: orderNo }
|
|
699
635
|
})
|
|
700
636
|
if (!response.errors) {
|
|
701
|
-
this.
|
|
637
|
+
this._orderNo = orderNo
|
|
702
638
|
const worksheetInfo = response.data.returnWorksheet.worksheetInfo
|
|
703
|
-
this.
|
|
639
|
+
this._worksheetInfo = worksheetInfo
|
|
640
|
+
this._bizplaceName = worksheetInfo.bizplaceName
|
|
704
641
|
|
|
705
642
|
this.data = {
|
|
706
643
|
records: response.data.returnWorksheet.worksheetDetailInfos
|
|
707
644
|
.map(record => {
|
|
708
645
|
return {
|
|
709
646
|
...record,
|
|
710
|
-
completed: record.status === WORKSHEET_STATUS.DONE.value
|
|
711
|
-
packingTypeSize: `${record.packingType}(${record.packingSize})`
|
|
647
|
+
completed: record.status === WORKSHEET_STATUS.DONE.value
|
|
712
648
|
}
|
|
713
649
|
})
|
|
714
650
|
.sort((a, b) => {
|
|
@@ -740,7 +676,6 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
740
676
|
this.data = { records: [] }
|
|
741
677
|
this.infoForm.reset()
|
|
742
678
|
this.inputForm.reset()
|
|
743
|
-
this._productName = ''
|
|
744
679
|
this.orderNoInput.value = ''
|
|
745
680
|
this._selectedOrderProduct = null
|
|
746
681
|
this._selectedTaskStatus = null
|
|
@@ -749,28 +684,6 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
749
684
|
this.updateContext()
|
|
750
685
|
}
|
|
751
686
|
|
|
752
|
-
_fillUpForm(form, data) {
|
|
753
|
-
form.reset()
|
|
754
|
-
for (let key in data) {
|
|
755
|
-
Array.from(form.querySelectorAll('input')).forEach(field => {
|
|
756
|
-
if (field.name === key && field.type === 'checkbox') {
|
|
757
|
-
field.checked = data[key]
|
|
758
|
-
} else if (field.name === key && field.type === 'datetime-local') {
|
|
759
|
-
const datetime = Number(data[key])
|
|
760
|
-
const timezoneOffset = new Date(datetime).getTimezoneOffset() * 60000
|
|
761
|
-
field.value = new Date(datetime - timezoneOffset).toISOString().slice(0, -1)
|
|
762
|
-
} else if (field.name === key) {
|
|
763
|
-
if (data[key] instanceof Object) {
|
|
764
|
-
const objectData = data[key]
|
|
765
|
-
field.value = `${objectData.name} ${objectData.description ? `(${objectData.description})` : ''}`
|
|
766
|
-
} else {
|
|
767
|
-
field.value = data[key]
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
})
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
|
|
774
687
|
_transactionHandler(e) {
|
|
775
688
|
if (e.keyCode === 13) {
|
|
776
689
|
if (this.refOrderType === AVAIL_ORDER_TYPES.ARRIVAL_NOTICE.value) {
|
|
@@ -803,13 +716,21 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
803
716
|
if (this._enableCartonLabel) {
|
|
804
717
|
let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
|
|
805
718
|
worksheetDetailNames.push(worksheetDetail[0].name)
|
|
806
|
-
if (worksheetDetail[0].
|
|
807
|
-
await this.
|
|
719
|
+
if (worksheetDetail[0].expirationDate) {
|
|
720
|
+
await this._checkExpiry(
|
|
721
|
+
worksheetDetail[0].expirationPeriod,
|
|
722
|
+
new Date(worksheetDetail[0].expirationDate),
|
|
723
|
+
locationDetails.type
|
|
724
|
+
)
|
|
808
725
|
}
|
|
809
726
|
} else {
|
|
810
727
|
worksheetDetailNames.push(this._selectedOrderProduct.name)
|
|
811
|
-
if (this._selectedOrderProduct.
|
|
812
|
-
await this.
|
|
728
|
+
if (this._selectedOrderProduct.expirationDate) {
|
|
729
|
+
await this._checkExpiry(
|
|
730
|
+
this._selectedOrderProduct.expirationPeriod,
|
|
731
|
+
new Date(this._selectedOrderProduct.expirationDate),
|
|
732
|
+
locationDetails.type
|
|
733
|
+
)
|
|
813
734
|
}
|
|
814
735
|
}
|
|
815
736
|
|
|
@@ -838,7 +759,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
838
759
|
})
|
|
839
760
|
|
|
840
761
|
if (!response.errors) {
|
|
841
|
-
this._fetchProducts(this.
|
|
762
|
+
this._fetchProducts(this._orderNo)
|
|
842
763
|
if (this._enableCartonLabel) {
|
|
843
764
|
this.cartonInput.value = ''
|
|
844
765
|
this._focusOnCartonInput()
|
|
@@ -874,15 +795,23 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
874
795
|
const locationDetails = await this._fetchLocation(this.locationInput.value.trim())
|
|
875
796
|
|
|
876
797
|
if (this._enableCartonLabel) {
|
|
877
|
-
worksheetDetailNames.push(worksheetDetail[0].name)
|
|
878
798
|
let worksheetDetail = this._getSelectedOrderProducts(this.cartonInput.value)
|
|
879
|
-
|
|
880
|
-
|
|
799
|
+
worksheetDetailNames.push(worksheetDetail[0].name)
|
|
800
|
+
if (worksheetDetail[0].expirationDate) {
|
|
801
|
+
await this._checkExpiry(
|
|
802
|
+
worksheetDetail[0].expirationPeriod,
|
|
803
|
+
new Date(worksheetDetail[0].expirationDate),
|
|
804
|
+
locationDetails.type
|
|
805
|
+
)
|
|
881
806
|
}
|
|
882
807
|
} else {
|
|
883
808
|
worksheetDetailNames.push(this._selectedOrderProduct.name)
|
|
884
|
-
if (this._selectedOrderProduct.
|
|
885
|
-
await this.
|
|
809
|
+
if (this._selectedOrderProduct.expirationDate) {
|
|
810
|
+
await this._checkExpiry(
|
|
811
|
+
this._selectedOrderProduct.expirationPeriod,
|
|
812
|
+
new Date(this._selectedOrderProduct.expirationDate),
|
|
813
|
+
locationDetails.type
|
|
814
|
+
)
|
|
886
815
|
}
|
|
887
816
|
}
|
|
888
817
|
|
|
@@ -911,7 +840,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
911
840
|
})
|
|
912
841
|
|
|
913
842
|
if (!response.errors) {
|
|
914
|
-
this._fetchProducts(this.
|
|
843
|
+
this._fetchProducts(this._orderNo)
|
|
915
844
|
if (this._enableCartonLabel) {
|
|
916
845
|
this.cartonInput.value = ''
|
|
917
846
|
this._focusOnCartonInput()
|
|
@@ -938,6 +867,19 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
938
867
|
}
|
|
939
868
|
}
|
|
940
869
|
|
|
870
|
+
_openWorksheetInformation() {
|
|
871
|
+
openPopup(
|
|
872
|
+
html`
|
|
873
|
+
<worksheet-information-popup .worksheetInformation="${this._worksheetInfo}"></worksheet-information-popup>
|
|
874
|
+
`,
|
|
875
|
+
{
|
|
876
|
+
backdrop: true,
|
|
877
|
+
size: 'large',
|
|
878
|
+
title: i18next.t('title.order_information')
|
|
879
|
+
}
|
|
880
|
+
)
|
|
881
|
+
}
|
|
882
|
+
|
|
941
883
|
async _warehouseReturnPutaway() {
|
|
942
884
|
if (this._scanning === false) {
|
|
943
885
|
this._scanning = true
|
|
@@ -945,8 +887,10 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
945
887
|
await this._validatePutaway()
|
|
946
888
|
if (!this.incompleteLocationName) {
|
|
947
889
|
let worksheetDetailNames = []
|
|
948
|
-
if (this._enableCartonLabel)
|
|
949
|
-
|
|
890
|
+
if (this._enableCartonLabel) {
|
|
891
|
+
const selectedWorksheetDetailName = this._getSelectedOrderProducts(this.cartonInput.value)
|
|
892
|
+
worksheetDetailNames.push(selectedWorksheetDetailName[0].name)
|
|
893
|
+
} else worksheetDetailNames.push(this._selectedOrderProduct.name)
|
|
950
894
|
|
|
951
895
|
const response = await client.mutate({
|
|
952
896
|
mutation: gql`
|
|
@@ -973,7 +917,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
973
917
|
})
|
|
974
918
|
|
|
975
919
|
if (!response.errors) {
|
|
976
|
-
this._fetchProducts(this.
|
|
920
|
+
this._fetchProducts(this._orderNo)
|
|
977
921
|
if (this._enableCartonLabel) {
|
|
978
922
|
this.cartonInput.value = ''
|
|
979
923
|
this._focusOnCartonInput()
|
|
@@ -1017,7 +961,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1017
961
|
})
|
|
1018
962
|
|
|
1019
963
|
if (!response.errors) {
|
|
1020
|
-
this._fetchProducts(this.
|
|
964
|
+
this._fetchProducts(this._orderNo)
|
|
1021
965
|
this._focusOnPalletInput()
|
|
1022
966
|
this._selectedTaskStatus = null
|
|
1023
967
|
this._selectedOrderProduct = null
|
|
@@ -1096,6 +1040,15 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1096
1040
|
}
|
|
1097
1041
|
}
|
|
1098
1042
|
|
|
1043
|
+
async _checkExpiry(expirationPeriod, expiryDate, locationType) {
|
|
1044
|
+
let date = new Date()
|
|
1045
|
+
let acceptBefore = new Date(date.setDate(date.getDate() + expirationPeriod))
|
|
1046
|
+
|
|
1047
|
+
if (expirationPeriod > 0) {
|
|
1048
|
+
if (expiryDate < acceptBefore && locationType !== 'QUARANTINE') await this._expiryAlert()
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1099
1052
|
_validateTransfer() {
|
|
1100
1053
|
// 1. validate for order selection
|
|
1101
1054
|
if (!this._selectedOrderProduct) throw new Error(i18next.t('text.target_is_not_selected'))
|
|
@@ -1274,7 +1227,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1274
1227
|
})
|
|
1275
1228
|
|
|
1276
1229
|
if (!response.errors) {
|
|
1277
|
-
this._fetchProducts(this.
|
|
1230
|
+
this._fetchProducts(this._orderNo)
|
|
1278
1231
|
if (this._enableCartonLabel) {
|
|
1279
1232
|
this.cartonInput.value = ''
|
|
1280
1233
|
this._focusOnCartonInput()
|
|
@@ -1319,7 +1272,7 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1319
1272
|
})
|
|
1320
1273
|
|
|
1321
1274
|
if (!response.errors) {
|
|
1322
|
-
this._fetchProducts(this.
|
|
1275
|
+
this._fetchProducts(this._orderNo)
|
|
1323
1276
|
if (this._enableCartonLabel) {
|
|
1324
1277
|
this.cartonInput.value = ''
|
|
1325
1278
|
this._focusOnCartonInput()
|
|
@@ -1364,12 +1317,12 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1364
1317
|
completePutaway(arrivalNoticeNo: $arrivalNoticeNo)
|
|
1365
1318
|
}
|
|
1366
1319
|
`,
|
|
1367
|
-
variables: { arrivalNoticeNo: this.
|
|
1320
|
+
variables: { arrivalNoticeNo: this._orderNo }
|
|
1368
1321
|
})
|
|
1369
1322
|
|
|
1370
1323
|
if (!response.errors) {
|
|
1371
1324
|
this._clearView()
|
|
1372
|
-
this.
|
|
1325
|
+
this._orderNo = ''
|
|
1373
1326
|
await CustomAlert({
|
|
1374
1327
|
title: i18next.t('title.completed'),
|
|
1375
1328
|
text: i18next.t('text.putaway_completed'),
|
|
@@ -1385,12 +1338,12 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1385
1338
|
completePutawayReturn(returnOrderNo: $returnOrderNo)
|
|
1386
1339
|
}
|
|
1387
1340
|
`,
|
|
1388
|
-
variables: { returnOrderNo: this.
|
|
1341
|
+
variables: { returnOrderNo: this._orderNo }
|
|
1389
1342
|
})
|
|
1390
1343
|
|
|
1391
1344
|
if (!response.errors) {
|
|
1392
1345
|
this._clearView()
|
|
1393
|
-
this.
|
|
1346
|
+
this._orderNo = ''
|
|
1394
1347
|
await CustomAlert({
|
|
1395
1348
|
title: i18next.t('title.completed'),
|
|
1396
1349
|
text: i18next.t('text.putaway_completed'),
|
|
@@ -1406,12 +1359,12 @@ class PutawayProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1406
1359
|
completeReturn(releaseGoodNo: $releaseGoodNo)
|
|
1407
1360
|
}
|
|
1408
1361
|
`,
|
|
1409
|
-
variables: { releaseGoodNo: this.
|
|
1362
|
+
variables: { releaseGoodNo: this._orderNo }
|
|
1410
1363
|
})
|
|
1411
1364
|
|
|
1412
1365
|
if (!response.errors) {
|
|
1413
1366
|
this._clearView()
|
|
1414
|
-
this.
|
|
1367
|
+
this._orderNo = ''
|
|
1415
1368
|
await CustomAlert({
|
|
1416
1369
|
title: i18next.t('title.completed'),
|
|
1417
1370
|
text: i18next.t('text.putaway_completed'),
|