@things-factory/operato-wms 4.3.61 → 4.3.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/client/pages/components/select-inventory-popup.js +626 -0
  2. package/client/pages/inbound/unload-product.js +10 -9
  3. package/client/pages/inventory/inventory-by-product-detail.js +99 -92
  4. package/client/pages/inventory/inventory-by-product.js +170 -68
  5. package/client/pages/inventory-check/inspecting-product.js +1 -1
  6. package/client/pages/order/release-order/b2b/b2b-order-list.js +76 -80
  7. package/client/pages/order/release-order/b2c/b2c-order-requests.js +93 -81
  8. package/client/pages/order/release-order/batch-picking-popup.js +11 -0
  9. package/client/pages/order/release-order/create-release-order.js +258 -252
  10. package/client/pages/order/release-order/release-extra-product-popup.js +10 -3
  11. package/client/pages/order/release-order/release-order-detail.js +202 -63
  12. package/client/pages/order/transport-order/delivery-note-popup.js +12 -17
  13. package/client/pages/order/transport-order/upload-delivery-note.js +6 -4
  14. package/client/pages/order/transport-order/view-delivery-note.js +0 -1
  15. package/client/pages/outbound/generate-worksheet-popup.js +337 -0
  16. package/client/pages/outbound/inventory-reassign-popup.js +1097 -0
  17. package/client/pages/outbound/loading-product.js +2 -2
  18. package/client/pages/outbound/picking-product.js +174 -100
  19. package/client/pages/outbound/sorting-product.js +5 -5
  20. package/client/pages/outbound/worksheet-batch-picking.js +39 -5
  21. package/client/pages/outbound/worksheet-picking.js +45 -6
  22. package/client/pages/report/outbound-order-details-report.js +181 -49
  23. package/client/pages/report/release-inventory-report.js +503 -0
  24. package/client/route.js +5 -0
  25. package/dist-server/graphql/resolvers/extra/add-release-good-products.js +54 -3
  26. package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
  27. package/dist-server/graphql/resolvers/reports/index.js +2 -1
  28. package/dist-server/graphql/resolvers/reports/index.js.map +1 -1
  29. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +63 -28
  30. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  31. package/dist-server/graphql/resolvers/reports/release-inventory-report.js +180 -0
  32. package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -0
  33. package/dist-server/graphql/types/reports/index.js +6 -1
  34. package/dist-server/graphql/types/reports/index.js.map +1 -1
  35. package/dist-server/graphql/types/reports/outbound-order-details-report.js +14 -1
  36. package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +1 -1
  37. package/dist-server/graphql/types/reports/release-inventory-report-list.js +14 -0
  38. package/dist-server/graphql/types/reports/release-inventory-report-list.js.map +1 -0
  39. package/dist-server/graphql/types/reports/release-inventory-report.js +29 -0
  40. package/dist-server/graphql/types/reports/release-inventory-report.js.map +1 -0
  41. package/dist-server/utils/report-query-util.js +4 -2
  42. package/dist-server/utils/report-query-util.js.map +1 -1
  43. package/helps/release-note.ko.md +13 -7
  44. package/helps/release-note.md +13 -7
  45. package/helps/release-note.ms.md +13 -7
  46. package/helps/release-note.zh.md +13 -7
  47. package/package.json +9 -9
  48. package/server/graphql/resolvers/extra/add-release-good-products.ts +66 -3
  49. package/server/graphql/resolvers/reports/index.ts +3 -1
  50. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +66 -29
  51. package/server/graphql/resolvers/reports/release-inventory-report.ts +202 -0
  52. package/server/graphql/types/reports/index.ts +6 -1
  53. package/server/graphql/types/reports/outbound-order-details-report.ts +14 -1
  54. package/server/graphql/types/reports/release-inventory-report-list.ts +8 -0
  55. package/server/graphql/types/reports/release-inventory-report.ts +23 -0
  56. package/server/utils/report-query-util.ts +4 -2
  57. package/things-factory.config.js +4 -0
  58. package/translations/en.json +73 -16
  59. package/translations/ko.json +157 -110
  60. package/translations/ms.json +65 -16
  61. package/translations/zh.json +79 -29
@@ -0,0 +1,626 @@
1
+ import '@things-factory/grist-ui'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit-element'
5
+
6
+ import { getCodeByName } from '@things-factory/code-base'
7
+ import { i18next, localize } from '@things-factory/i18n-base'
8
+ import { client } from '@things-factory/shell'
9
+ import { ScrollbarStyles } from '@things-factory/styles'
10
+ import { isMobileDevice } from '@things-factory/utils'
11
+ import { GROUP_TYPES, INVENTORY_STATUS } from '../constants'
12
+
13
+ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
14
+ static get properties() {
15
+ return {
16
+ productConfig: Object,
17
+ data: Object,
18
+ bizplaceId: String,
19
+ searchFields: Array,
20
+ selectMultipleProducts: Boolean,
21
+ switchTypePane: String,
22
+ recall: Boolean,
23
+ inventoryData: Object
24
+ }
25
+ }
26
+
27
+ static get styles() {
28
+ return [
29
+ ScrollbarStyles,
30
+ css`
31
+ :host {
32
+ display: flex;
33
+ flex-direction: column;
34
+ overflow: hidden;
35
+ background-color: white;
36
+ }
37
+
38
+ search-form {
39
+ overflow: visible;
40
+ }
41
+ .grist {
42
+ display: flex;
43
+ flex-direction: column;
44
+ flex: 1;
45
+ overflow-y: auto;
46
+ }
47
+ .grist-container {
48
+ overflow-y: hidden;
49
+ display: flex;
50
+ flex: 1;
51
+ }
52
+ data-grist {
53
+ overflow-y: hidden;
54
+ flex: 1;
55
+ }
56
+ h2 {
57
+ padding: var(--subtitle-padding);
58
+ font: var(--subtitle-font);
59
+ color: var(--subtitle-text-color);
60
+ border-bottom: var(--subtitle-border-bottom);
61
+ }
62
+ .grist h2 {
63
+ font: var(--grist-title-font);
64
+ }
65
+ .button-container {
66
+ padding: var(--button-container-padding);
67
+ margin: var(--button-container-margin);
68
+ text-align: var(--button-container-align);
69
+ background-color: var(--button-container-background);
70
+ height: var(--button-container-height);
71
+ }
72
+ `
73
+ ]
74
+ }
75
+
76
+ render() {
77
+ return html`
78
+ <search-form
79
+ id="search-form"
80
+ .fields=${this.searchFields}
81
+ @submit=${() => this.productGrist.fetch()}
82
+ ></search-form>
83
+
84
+ <div class="grist-container">
85
+ <div class="grist">
86
+ <data-grist
87
+ id="product"
88
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
89
+ .config=${this.productConfig}
90
+ .fetchHandler=${this.fetchProducts.bind(this)}
91
+ ></data-grist>
92
+ </div>
93
+ </div>
94
+
95
+ <div class="button-container">
96
+ <mwc-button
97
+ @click="${this.selectProduct.bind(this)}"
98
+ label="${`${i18next.t('button.select')}`}"
99
+ raised
100
+ ></mwc-button>
101
+ </div>
102
+ `
103
+ }
104
+
105
+ get productGrist() {
106
+ return this.shadowRoot.querySelector('data-grist#product')
107
+ }
108
+
109
+ get searchForm() {
110
+ return this.shadowRoot.querySelector('search-form')
111
+ }
112
+
113
+ async firstUpdated() {
114
+ const paneType = this.switchTypePane
115
+ const _packingType = await getCodeByName('PACKING_TYPES')
116
+ const { SINGLE, BUNDLE } = GROUP_TYPES
117
+ const _groupTypes = [SINGLE, BUNDLE]
118
+
119
+ if (paneType === 'product') {
120
+ this.searchFields = [
121
+ {
122
+ label: i18next.t('field.batch_id'),
123
+ name: 'batchId',
124
+ props: { searchOper: 'i_like' }
125
+ },
126
+ {
127
+ label: i18next.t('field.product_info'),
128
+ name: 'productName',
129
+ props: { searchOper: 'i_like' }
130
+ },
131
+ {
132
+ label: i18next.t('field.packing_type'),
133
+ name: 'packingType',
134
+ type: 'select',
135
+ options: [
136
+ { value: '' },
137
+ ..._packingType.map(packingType => {
138
+ return {
139
+ name: packingType.name,
140
+ value: packingType.name
141
+ }
142
+ })
143
+ ],
144
+ props: { searchOper: 'eq' }
145
+ },
146
+ {
147
+ label: i18next.t('field.group_type'),
148
+ name: 'groupType',
149
+ type: 'select',
150
+ options: [
151
+ { value: '' },
152
+ ..._groupTypes.map(groupType => {
153
+ return {
154
+ name: groupType.value,
155
+ value: groupType.value
156
+ }
157
+ })
158
+ ],
159
+ props: { searchOper: 'eq' }
160
+ }
161
+ ]
162
+
163
+ this.productConfig = {
164
+ pagination: { pages: [10, 20, 50, 100] },
165
+ rows: {
166
+ appendable: false,
167
+ selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
168
+ },
169
+ columns: [
170
+ { type: 'gutter', gutterName: 'sequence' },
171
+ {
172
+ type: 'gutter',
173
+ gutterName: 'row-selector',
174
+ multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false,
175
+ label: true
176
+ },
177
+ {
178
+ type: 'string',
179
+ name: 'productId',
180
+ hidden: true,
181
+ label: true
182
+ },
183
+ { type: 'string', name: 'remainUomValue', hidden: true, label: true },
184
+ {
185
+ type: 'string',
186
+ name: 'batchId',
187
+ header: i18next.t('field.batch_id'),
188
+ sortable: true,
189
+ label: true,
190
+ width: 120
191
+ },
192
+ {
193
+ type: 'string',
194
+ name: 'batchIdRef',
195
+ header: i18next.t('field.batch_no_ref'),
196
+ label: true,
197
+ width: 120
198
+ },
199
+ {
200
+ type: 'string',
201
+ name: 'productSKU',
202
+ header: i18next.t('field.sku'),
203
+ sortable: true,
204
+ label: true,
205
+ width: 150
206
+ },
207
+ {
208
+ type: 'string',
209
+ name: 'productName',
210
+ header: i18next.t('field.product_info'),
211
+ sortable: true,
212
+ label: true,
213
+ width: 220
214
+ },
215
+ {
216
+ type: 'string',
217
+ name: 'productBrand',
218
+ header: i18next.t('field.brand'),
219
+ label: true,
220
+ width: 180
221
+ },
222
+ {
223
+ type: 'string',
224
+ name: 'packingType',
225
+ header: i18next.t('field.packing_type'),
226
+ label: true,
227
+ width: 100
228
+ },
229
+ {
230
+ type: 'string',
231
+ name: 'packingSize',
232
+ header: i18next.t('field.packing_size'),
233
+ label: true,
234
+ width: 120
235
+ },
236
+ {
237
+ type: 'string',
238
+ name: 'uom',
239
+ header: i18next.t('field.uom'),
240
+ label: true,
241
+ width: 120
242
+ },
243
+ {
244
+ type: 'string',
245
+ name: 'remainQty',
246
+ header: i18next.t('field.remain_qty'),
247
+ label: true,
248
+ width: 120
249
+ },
250
+ {
251
+ type: 'string',
252
+ name: 'remainUomValueWithUom',
253
+ header: i18next.t('field.remain_uom_value'),
254
+ label: true,
255
+ width: 120
256
+ },
257
+ {
258
+ type: 'string',
259
+ name: 'groupType',
260
+ header: i18next.t('field.group_type'),
261
+ label: true,
262
+ width: 120
263
+ }
264
+ ]
265
+ }
266
+ } else {
267
+ this.searchFields = [
268
+ {
269
+ label: i18next.t('field.batch_id'),
270
+ name: 'batchId',
271
+ props: { searchOper: 'i_like' }
272
+ },
273
+ {
274
+ label: i18next.t('field.product_info'),
275
+ name: 'productName',
276
+ props: { searchOper: 'i_like' }
277
+ },
278
+ {
279
+ label: i18next.t('field.location'),
280
+ name: 'location',
281
+ props: { searchOper: 'i_like' }
282
+ }
283
+ ]
284
+
285
+ this.productConfig = {
286
+ pagination: { pages: [10, 20, 50, 100] },
287
+ rows: {
288
+ appendable: false,
289
+ selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
290
+ },
291
+ columns: [
292
+ { type: 'gutter', gutterName: 'sequence' },
293
+ {
294
+ type: 'gutter',
295
+ gutterName: 'row-selector',
296
+ multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false
297
+ },
298
+ {
299
+ type: 'string',
300
+ name: 'productId',
301
+ hidden: true,
302
+ label: true
303
+ },
304
+ { type: 'string', name: 'remainUomValue', hidden: true, label: true },
305
+ {
306
+ type: 'string',
307
+ name: 'palletId',
308
+ header: i18next.t('field.lot_id'),
309
+ label: true,
310
+ width: 120
311
+ },
312
+ {
313
+ type: 'string',
314
+ name: 'cartonId',
315
+ header: i18next.t('field.carton_id'),
316
+ label: true,
317
+ width: 120
318
+ },
319
+ {
320
+ type: 'string',
321
+ name: 'productSKU',
322
+ header: i18next.t('field.sku'),
323
+ sortable: true,
324
+ label: true,
325
+ width: 150
326
+ },
327
+ {
328
+ type: 'string',
329
+ name: 'productName',
330
+ header: i18next.t('field.product_name'),
331
+ sortable: true,
332
+ label: true,
333
+ width: 220
334
+ },
335
+ {
336
+ type: 'string',
337
+ name: 'productBrand',
338
+ header: i18next.t('field.brand'),
339
+ label: true,
340
+ width: 180
341
+ },
342
+ {
343
+ type: 'string',
344
+ name: 'batchId',
345
+ header: i18next.t('field.batch_id'),
346
+ sortable: true,
347
+ label: true,
348
+ width: 120
349
+ },
350
+ {
351
+ type: 'string',
352
+ name: 'location',
353
+ header: i18next.t('field.location'),
354
+ label: true,
355
+ width: 120
356
+ },
357
+ {
358
+ type: 'string',
359
+ name: 'packingType',
360
+ header: i18next.t('field.packing_type'),
361
+ label: true,
362
+ width: 100
363
+ },
364
+ {
365
+ type: 'string',
366
+ name: 'packingSize',
367
+ header: i18next.t('field.packing_size'),
368
+ label: true,
369
+ width: 120
370
+ },
371
+ {
372
+ type: 'string',
373
+ name: 'uom',
374
+ header: i18next.t('field.uom'),
375
+ label: true,
376
+ width: 120
377
+ },
378
+ {
379
+ type: 'string',
380
+ name: 'remainQty',
381
+ header: i18next.t('field.remain_qty'),
382
+ label: true,
383
+ width: 120
384
+ },
385
+ {
386
+ type: 'string',
387
+ name: 'remainUomValueWithUom',
388
+ header: i18next.t('field.remain_uom_value'),
389
+ label: true,
390
+ width: 120
391
+ },
392
+ {
393
+ type: 'string',
394
+ name: 'batchIdRef',
395
+ header: i18next.t('field.batch_no_ref'),
396
+ label: true,
397
+ width: 120
398
+ },
399
+ {
400
+ type: 'string',
401
+ name: 'remark',
402
+ header: i18next.t('field.remark'),
403
+ label: true,
404
+ width: 120
405
+ }
406
+ ]
407
+ }
408
+ }
409
+ }
410
+
411
+ async fetchProducts({ page, limit, sorters = [] }) {
412
+ let filters = [...this.searchForm.queryFilters, { name: 'bizplace_id', operator: 'eq', value: this.bizplaceId }]
413
+ const pagination = { page, limit }
414
+ const sortings = sorters
415
+
416
+ const paneType = this.switchTypePane
417
+ const recall = this.recall
418
+
419
+ if (recall) {
420
+ filters.push({ name: 'recall', operator: '', value: recall })
421
+ }
422
+
423
+ if (paneType === 'product') {
424
+ const data = this.inventoryData
425
+
426
+ if (data.length > 0) {
427
+ const remapData = data.map(res => {
428
+ return {
429
+ batchId: res.batchId,
430
+ groupType: res.groupType,
431
+ packingType: res.packingType,
432
+ packingSize: res.packingSize,
433
+ productId: res.productId,
434
+ releaseQty: res.releaseQty,
435
+ releaseUomValue: res.releaseUomValue
436
+ }
437
+ })
438
+ filters.push({ name: 'batch_product', operator: 'notin', value: remapData })
439
+ }
440
+
441
+ const response = await client.query({
442
+ query: gql`
443
+ query inventoryProductGroup($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
444
+ inventoryProductGroup(filters: $filters, pagination: $pagination, sortings: $sortings) {
445
+ items {
446
+ id
447
+ productId
448
+ batchId
449
+ batchIdRef
450
+ groupType
451
+ packingSize
452
+ productBrand
453
+ productName
454
+ productSKU
455
+ packingType
456
+ remainQty
457
+ remainUomValue
458
+ remainUomValueWithUom
459
+ uom
460
+ }
461
+ total
462
+ }
463
+ }
464
+ `,
465
+ variables: { filters, pagination, sortings }
466
+ })
467
+
468
+ if (!response.errors) {
469
+ return {
470
+ total: response.data.inventoryProductGroup.total || 0,
471
+ records: response.data.inventoryProductGroup.items || []
472
+ }
473
+ }
474
+ } else {
475
+ filters.push(
476
+ { name: 'status', operator: 'eq', value: INVENTORY_STATUS.STORED.value },
477
+ { name: 'recall', operator: '', value: recall }
478
+ )
479
+ const response = await client.query({
480
+ query: gql`
481
+ query inventoriesByPallet($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
482
+ inventoriesByPallet(filters: $filters, pagination: $pagination, sortings: $sortings) {
483
+ items {
484
+ id
485
+ batchId
486
+ palletId
487
+ cartonId
488
+ productId
489
+ productSKU
490
+ productName
491
+ productBrand
492
+ palletId
493
+ location {
494
+ name
495
+ }
496
+ packingType
497
+ packingSize
498
+ uom
499
+ remainQty
500
+ remainUomValue
501
+ remainUomValueWithUom
502
+ batchIdRef
503
+ remark
504
+ }
505
+ total
506
+ }
507
+ }
508
+ `,
509
+ variables: { filters, pagination, sortings }
510
+ })
511
+
512
+ if (!response.errors) {
513
+ return {
514
+ total: response.data.inventoriesByPallet.total || 0,
515
+ records:
516
+ response.data.inventoriesByPallet.items.map(item => {
517
+ return {
518
+ ...item,
519
+ location: item.location.name
520
+ }
521
+ }) || []
522
+ }
523
+ }
524
+ }
525
+ }
526
+
527
+ selectProduct() {
528
+ const paneType = this.switchTypePane
529
+
530
+ if (this.selectMultipleProducts !== true) {
531
+ const selectedProduct = this.productGrist.selected[0]
532
+ if (selectedProduct) {
533
+ this.dispatchEvent(
534
+ new CustomEvent('selected', {
535
+ detail: {
536
+ productDetailId: selectedProduct.id,
537
+ packingType: selectedProduct.packingType,
538
+ uom: selectedProduct.uom,
539
+ uomValue: selectedProduct.uomValue,
540
+ productName: `${selectedProduct.name}(${selectedProduct.description}(${selectedProduct.sku}))`,
541
+ isError: false,
542
+ productBrand: selectedProduct.brand,
543
+ product: {
544
+ id: selectedProduct.productId,
545
+ name: selectedProduct.name,
546
+ sku: selectedProduct.sku,
547
+ packingType: selectedProduct.packingType,
548
+ packingSize: selectedProduct.packingSize,
549
+ primaryUnit: selectedProduct.uom,
550
+ primaryValue: selectedProduct.uomValue
551
+ }
552
+ }
553
+ })
554
+ )
555
+ history.back()
556
+ } else {
557
+ document.dispatchEvent(
558
+ new CustomEvent('notify', { detail: { message: i18next.t('text.product_is_not_selected') } })
559
+ )
560
+ }
561
+ } else {
562
+ const selectedMultipleProducts = this.productGrist.selected
563
+ if (selectedMultipleProducts) {
564
+ const multipleProducts = selectedMultipleProducts.map(itm => {
565
+ return {
566
+ productName:
567
+ paneType === 'product' ? `${itm.batchId}(${itm.productName})` : `${itm.batchId}(${itm.palletId})`,
568
+ productSKU: itm.productSKU,
569
+ product: { id: itm.productId, name: itm.productName },
570
+ uom: itm.uom,
571
+ uomValue: itm.uomValue,
572
+ productBrand: itm.productBrand,
573
+ packingType: itm.packingType,
574
+ packingSize: itm.packingSize,
575
+ remainQty: itm.remainQty,
576
+ remainUomValueWithUom: itm.remainUomValueWithUom,
577
+ productId: itm.productId,
578
+ remainUomValue: itm.remainUomValue,
579
+ batchId: itm.batchId,
580
+ batchIdRef: itm.batchIdRef,
581
+ groupType: itm.groupType,
582
+ location: itm.location,
583
+ releaseQty: 0,
584
+ releaseUomValue: 0,
585
+ palletId: itm.palletId,
586
+ inventory: {
587
+ id: itm.id,
588
+ productName:
589
+ paneType === 'product' ? `${itm.batchId}(${itm.productName})` : `${itm.batchId}(${itm.palletId})`,
590
+ productSKU: itm.productSKU,
591
+ uom: itm.uom,
592
+ uomValue: itm.uomValue,
593
+ productBrand: itm.productBrand,
594
+ packingType: itm.packingType,
595
+ packingSize: itm.packingSize,
596
+ remainQty: itm.remainQty,
597
+ remainUomValueWithUom: itm.remainUomValueWithUom,
598
+ productId: itm.productId,
599
+ remainUomValue: itm.remainUomValue,
600
+ batchId: itm.batchId,
601
+ batchIdRef: itm.batchIdRef,
602
+ groupType: itm.groupType,
603
+ location: itm.location,
604
+ palletId: itm.palletId
605
+ }
606
+ }
607
+ })
608
+
609
+ this.dispatchEvent(
610
+ new CustomEvent('selected', {
611
+ detail: {
612
+ multipleProducts
613
+ }
614
+ })
615
+ )
616
+ history.back()
617
+ } else {
618
+ document.dispatchEvent(
619
+ new CustomEvent('notify', { detail: { message: i18next.t('text.product_is_not_selected') } })
620
+ )
621
+ }
622
+ }
623
+ }
624
+ }
625
+
626
+ window.customElements.define('select-inventory-popup', SelectInventoryPopUp)
@@ -35,7 +35,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
35
35
  _enableProductScanning: Boolean,
36
36
  _expirationPeriod: Number,
37
37
  _enableCartonLabel: Boolean,
38
- _enableInputQty: Boolean,
38
+ _enableInputQty: Number,
39
39
  _isLooseItem: Boolean,
40
40
  _isQtyChecked: Boolean,
41
41
  _isRequiredCheckExpiry: Boolean,
@@ -274,7 +274,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
274
274
  <barcode-scanable-input name="productBarcode" without-enter custom-input></barcode-scanable-input>
275
275
  `
276
276
  : ''}
277
- ${this._enableInputQty && !this._isRequireSerialNumberScanningInbound
277
+ ${this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound
278
278
  ? html`
279
279
  <label>${i18next.t('label.actual_qty')}</label>
280
280
  <input name="qty" type="number" min="1" />
@@ -322,7 +322,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
322
322
  this._worksheetLoaded = false
323
323
  this._usingReusablePallet = false
324
324
  this._enableCartonLabel = false
325
- this._enableInputQty = true
325
+ this._enableInputQty = -1
326
326
  this._enableProductScanning = false
327
327
  this._expirationPeriod = 0
328
328
  this._isLooseItem = false
@@ -669,7 +669,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
669
669
  this._enableProductScanning = await fetchSettingRule('enable-product-scanning', partnerDomainId)
670
670
  this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
671
671
  if (this._enableProductScanning)
672
- this._enableInputQty = await fetchSettingRule('enable-input-qty', partnerDomainId)
672
+ this._enableInputQty = parseInt(await fetchSettingRule('enable-input-qty', partnerDomainId))
673
673
 
674
674
  this._fetchInventories()
675
675
  }
@@ -823,7 +823,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
823
823
  this._focusOnSerialNumberInput()
824
824
  }
825
825
  } else {
826
- if (this._enableInputQty) {
826
+ if (this._enableInputQty >= 0 && this._enableInputQty < 4) {
827
827
  this.actualQtyInput.value = ''
828
828
  }
829
829
  this.cartonInput.value = ''
@@ -836,7 +836,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
836
836
  this._focusOnSerialNumberInput()
837
837
  } else {
838
838
  this.lotInput.value = ''
839
- if (this._enableInputQty) this.actualQtyInput.value = ''
839
+ if (this._enableInputQty >= 0 && this._enableInputQty < 4) this.actualQtyInput.value = ''
840
840
  this._focusOnLotInput()
841
841
  }
842
842
  }
@@ -873,7 +873,8 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
873
873
  if (this._isRequireSerialNumberScanningInbound) {
874
874
  return this._scanSerialNumberUnload()
875
875
  } else {
876
- if (!(this._enableProductScanning && !this._enableInputQty)) return this._qtyUnload()
876
+ if (!(this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)))
877
+ return this._qtyUnload()
877
878
  }
878
879
  this._scanProductUnload()
879
880
  }
@@ -1197,7 +1198,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1197
1198
  }
1198
1199
  await this._scanSerialNumberUnload()
1199
1200
  } else {
1200
- if (this._enableProductScanning && !this._enableInputQty) {
1201
+ if (this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)) {
1201
1202
  await this._scanProductUnload()
1202
1203
  } else {
1203
1204
  await this._qtyUnload()
@@ -1265,7 +1266,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1265
1266
 
1266
1267
  let orderProducts = await this._checkedScannedProduct()
1267
1268
 
1268
- if (this._enableInputQty && !this._isRequireSerialNumberScanningInbound) {
1269
+ if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
1269
1270
  if (!parseInt(this.actualQtyInput.value)) {
1270
1271
  this._focusOnActualQtyInput()
1271
1272
  throw new Error(i18next.t('text.enter_qty'))