@things-factory/operato-wms 4.3.345 → 4.3.347

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.
@@ -7,28 +7,14 @@ import '../inventory/serial-number-list-popup'
7
7
  import '../components/select-product-popup'
8
8
 
9
9
  import gql from 'graphql-tag'
10
- import {
11
- css,
12
- html
13
- } from 'lit-element'
10
+ import { css, html } from 'lit-element'
14
11
  import { connect } from 'pwa-helpers/connect-mixin'
15
12
 
16
13
  import { DirectPrinter } from '@things-factory/barcode-base'
17
- import {
18
- i18next,
19
- localize
20
- } from '@things-factory/i18n-base'
14
+ import { i18next, localize } from '@things-factory/i18n-base'
21
15
  import { openPopup } from '@things-factory/layout-base'
22
- import {
23
- client,
24
- CustomAlert,
25
- PageView,
26
- store
27
- } from '@things-factory/shell'
28
- import {
29
- CommonButtonStyles,
30
- ScrollbarStyles
31
- } from '@things-factory/styles'
16
+ import { client, CustomAlert, PageView, store } from '@things-factory/shell'
17
+ import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
32
18
  import { isMobileDevice } from '@things-factory/utils'
33
19
 
34
20
  import { fetchPageSettings } from '../../util/index'
@@ -419,7 +405,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
419
405
  sortable: true,
420
406
  imex: {
421
407
  header: i18next.t('field.transfer_qty'),
422
- key: 'tranferQty',
408
+ key: 'transferQty',
423
409
  width: 10,
424
410
  type: 'integer'
425
411
  },
@@ -432,7 +418,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
432
418
  sortable: true,
433
419
  imex: {
434
420
  header: i18next.t('field.transfer_uom_value'),
435
- key: 'tranferUomValue',
421
+ key: 'transferUomValue',
436
422
  width: 10,
437
423
  type: 'float'
438
424
  },
@@ -1038,6 +1024,20 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1038
1024
  ) {
1039
1025
  throw new Error(i18next.t('text.empty_value_in_list'))
1040
1026
  }
1027
+
1028
+ let currentItem = this.dataGrist?.data?.records.find(itm => itm.id === row.id)
1029
+ //if user is not updating adjustment code or note, check if current data has them
1030
+ if (!row.hasOwnProperty('adjustmentNote')) {
1031
+ if (!currentItem.adjustmentNote) {
1032
+ throw new Error(i18next.t('text.empty_value_in_list'))
1033
+ }
1034
+ }
1035
+
1036
+ if (!row.hasOwnProperty('adjustmentCode')) {
1037
+ if (!currentItem.adjustmentCode) {
1038
+ throw new Error(i18next.t('text.empty_value_in_list'))
1039
+ }
1040
+ }
1041
1041
  }
1042
1042
 
1043
1043
  row.bizplace = row.bizplace ? { id: row.bizplace.id } : undefined
@@ -185,7 +185,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
185
185
  sortable: true,
186
186
  imex: {
187
187
  header: i18next.t('field.transfer_qty'),
188
- key: 'tranferQty',
188
+ key: 'transferQty',
189
189
  width: 10,
190
190
  type: 'integer'
191
191
  },
@@ -198,7 +198,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
198
198
  sortable: true,
199
199
  imex: {
200
200
  header: i18next.t('field.transfer_uom_value'),
201
- key: 'tranferUomValue',
201
+ key: 'transferUomValue',
202
202
  width: 10,
203
203
  type: 'float'
204
204
  },
@@ -517,7 +517,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
517
517
  console.log(response)
518
518
 
519
519
  return {
520
- total: response.data.onhandInventories.total || 0,
520
+ total: response.data.onhandInventories.total || 0,
521
521
  records:
522
522
  response.data.onhandInventories.items.map(item => {
523
523
  return flattenObject(
@@ -529,7 +529,7 @@ class OnhandInventory extends connect(store)(localize(i18next)(PageView)) {
529
529
  name: `${item.product.name} ${item.product.description}`,
530
530
  productBrand: `${item.product.brand}`
531
531
  },
532
- volume: parseFloat(item.product.volume * item.remainQty).toFixed(4),
532
+ volume: parseFloat(item.product.volume * item.remainQty).toFixed(4)
533
533
  // Need to move to serverside processing and fetch with db query for consistent performance
534
534
  },
535
535
  '_'
@@ -130,7 +130,7 @@ class WorksheetCycleCount extends localize(i18next)(PageView) {
130
130
  </fieldset>
131
131
  </form>
132
132
 
133
- <barcode-tag bcid="qrcode" .value=${this._cycleCountNo}></barcode-tag>
133
+ <barcode-tag bcid="qrcode" .value=${this._cycleCountNo} showLogo="true"></barcode-tag>
134
134
  </div>
135
135
 
136
136
  <div class="grist">
@@ -538,7 +538,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
538
538
  />
539
539
  </fieldset>
540
540
  </form>
541
- <barcode-tag bcid="qrcode" .value=${this._ganNo}></barcode-tag>
541
+ <barcode-tag bcid="qrcode" .value=${this._ganNo} showLogo="true"></barcode-tag>
542
542
  </div>
543
543
 
544
544
  <div class="container">
@@ -360,7 +360,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
360
360
  </fieldset>
361
361
  </form>
362
362
 
363
- <barcode-tag bcid="qrcode" .value=${this._releaseOrderNo}></barcode-tag>
363
+ <barcode-tag bcid="qrcode" .value=${this._releaseOrderNo} showLogo="true"></barcode-tag>
364
364
  </div>
365
365
  </div>
366
366
 
@@ -174,7 +174,7 @@ class BulkPrintPackingList extends localize(i18next)(PageView) {
174
174
  </fieldset>
175
175
  </form>
176
176
 
177
- <barcode-tag bcid="qrcode" .value=${releaseOrder.name}></barcode-tag>
177
+ <barcode-tag bcid="qrcode" .value=${releaseOrder.name} showLogo="true"></barcode-tag>
178
178
  </div>
179
179
 
180
180
  <div class="grist">
@@ -496,7 +496,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
496
496
  </fieldset>
497
497
  </form>
498
498
 
499
- <barcode-tag bcid="qrcode" .value=${this._releaseOrderNo}></barcode-tag>
499
+ <barcode-tag bcid="qrcode" .value=${this._releaseOrderNo} showLogo="true"></barcode-tag>
500
500
  </div>
501
501
  </div>
502
502
 
@@ -192,7 +192,7 @@ class ReturnOrderDetail extends connect(store)(localize(i18next)(PageView)) {
192
192
  </fieldset>
193
193
  </form>
194
194
 
195
- <barcode-tag bcid="qrcode" .value=${this._returnOrderNo}></barcode-tag>
195
+ <barcode-tag bcid="qrcode" .value=${this._returnOrderNo} showLogo="true"></barcode-tag>
196
196
  </div>
197
197
 
198
198
  <div class="container">
@@ -128,7 +128,7 @@ class ReverseKittingOrderDetail extends connect(store)(localize(i18next)(PageVie
128
128
  </fieldset>
129
129
  </form>
130
130
 
131
- ${!this._newOrder ? html`<barcode-tag bcid="qrcode" .value=${this._reverseKittingNo}></barcode-tag>` : ''}
131
+ ${!this._newOrder ? html`<barcode-tag bcid="qrcode" .value=${this._reverseKittingNo} showLogo="true"></barcode-tag>` : ''}
132
132
  </div>
133
133
  <div class="container">
134
134
  <div class="grist">
@@ -1,20 +1,19 @@
1
1
  import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
3
  import './route-label-popup'
4
+ import './select-operator-popup'
4
5
 
5
6
  import gql from 'graphql-tag'
6
7
  import { css, html } from 'lit-element'
7
8
 
8
- import './select-operator-popup'
9
9
  import { getCodeByName } from '@things-factory/code-base'
10
10
  import { i18next, localize } from '@things-factory/i18n-base'
11
- import { client, navigate, PageView } from '@things-factory/shell'
12
- import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
13
- import { isMobileDevice } from '@things-factory/utils'
14
11
  import { openPopup } from '@things-factory/layout-base'
12
+ import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
13
+ import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
14
+ import { isMobileDevice } from '@things-factory/utils'
15
15
 
16
16
  import { fetchSettingRule } from '../../fetch-setting-value'
17
-
18
17
  import { WORKSHEET_STATUS, WORKSHEET_TYPE } from '../constants'
19
18
 
20
19
  class SingleOutboundWorksheet extends localize(i18next)(PageView) {
@@ -82,6 +81,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
82
81
  ...CommonButtonStyles.activate
83
82
  })
84
83
 
84
+ actions.push({
85
+ title: i18next.t('button.activate'),
86
+ action: this._activateBulkWorksheet.bind(this),
87
+ ...CommonButtonStyles.activate
88
+ })
89
+
85
90
  return {
86
91
  title: i18next.t('title.outbound_worksheet'),
87
92
  actions,
@@ -289,7 +294,12 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
289
294
  type: 'boolean',
290
295
  name: 'releaseGoodPriorityDelivery',
291
296
  header: i18next.t('field.priority_delivery'),
292
- imex: { header: i18next.t('field.priority_delivery'), key: 'releaseGoodPriorityDelivery', width: 20, type: 'string' },
297
+ imex: {
298
+ header: i18next.t('field.priority_delivery'),
299
+ key: 'releaseGoodPriorityDelivery',
300
+ width: 20,
301
+ type: 'string'
302
+ },
293
303
  width: 120
294
304
  },
295
305
  {
@@ -460,7 +470,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
460
470
  releaseGoodCrossDocking: item.releaseGood.crossDocking,
461
471
  releaseGoodCourierOption: item.releaseGood.courierOption,
462
472
  releaseGoodPackingOption: item.releaseGood.packingOption,
463
- releaseGoodPriorityDelivery: item.releaseGood.priorityDelivery
473
+ releaseGoodPriorityDelivery: item.releaseGood.priorityDelivery
464
474
  }
465
475
  }) || {}
466
476
  }
@@ -500,10 +510,7 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
500
510
 
501
511
  _assignPicker() {
502
512
  try {
503
- let selectedData = this.dataGrist.selected.filter(item => {
504
- return item.status == 'DEACTIVATED'
505
- })
506
-
513
+ let selectedData = this.dataGrist.selected
507
514
  if (selectedData.length <= 0) throw new Error(i18next.t('text.no_available_worksheet_selected'))
508
515
 
509
516
  openPopup(
@@ -545,6 +552,58 @@ class SingleOutboundWorksheet extends localize(i18next)(PageView) {
545
552
  }
546
553
  }
547
554
 
555
+ async _activateBulkWorksheet() {
556
+ try {
557
+ let selectedData = this.dataGrist.selected.filter(item => {
558
+ if (item.status !== 'DEACTIVATED') {
559
+ throw new Error(i18next.t('text.please_select_order_with_status_deactivated_only'))
560
+ }
561
+ return item.status == 'DEACTIVATED'
562
+ })
563
+
564
+ if (selectedData.length <= 0)
565
+ throw new Error(i18next.t('text.please_select_at_least_one_order_with_status_deactivated_to_proceed'))
566
+
567
+ if (selectedData.length > 50)
568
+ throw new Error(i18next.t('text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed'))
569
+
570
+ const result = await CustomAlert({
571
+ title: i18next.t('title.are_you_sure'),
572
+ text: i18next.t('text.activate_picking_worksheet'),
573
+ confirmButton: { text: i18next.t('button.confirm') },
574
+ cancelButton: { text: i18next.t('button.cancel') }
575
+ })
576
+
577
+ if (!result.value) {
578
+ return
579
+ }
580
+
581
+ const response = await client.mutate({
582
+ mutation: gql`
583
+ mutation activateBulkPicking($worksheetNo: [String!]!) {
584
+ activateBulkPicking(worksheetNo: $worksheetNo) {
585
+ id
586
+ name
587
+ }
588
+ }
589
+ `,
590
+ variables: {
591
+ worksheetNo: selectedData.map(item => {
592
+ return item.name
593
+ })
594
+ }
595
+ })
596
+
597
+ if (!response.errors) {
598
+ this._showToast({ message: i18next.t('text.worksheet_activated') })
599
+ }
600
+ } catch (e) {
601
+ this._showToast(e)
602
+ } finally {
603
+ this.dataGrist.fetch()
604
+ }
605
+ }
606
+
548
607
  _modifyDateRange(e) {
549
608
  const fromDate = e.currentTarget.value
550
609
 
@@ -151,6 +151,11 @@ class WorksheetPicking extends localize(i18next)(PageView) {
151
151
  title: i18next.t('button.back'),
152
152
  action: () => history.back(),
153
153
  ...CommonButtonStyles.back
154
+ },
155
+ {
156
+ title: i18next.t('button.select_operator'),
157
+ action: this._selectOperator.bind(this),
158
+ ...CommonButtonStyles.add
154
159
  }
155
160
  ]
156
161
  if (this.crossDocking) {
@@ -165,14 +170,6 @@ class WorksheetPicking extends localize(i18next)(PageView) {
165
170
  })
166
171
  }
167
172
 
168
- if (this.activatable || this.assignable) {
169
- actions.push({
170
- title: i18next.t('button.select_operator'),
171
- action: this._selectOperator.bind(this),
172
- ...CommonButtonStyles.add
173
- })
174
- }
175
-
176
173
  if (this.activatable) {
177
174
  if (this.isAssignedInventory) {
178
175
  actions.push({
@@ -151,7 +151,7 @@ class ReplenishmentDetail extends localize(i18next)(PageView) {
151
151
  </fieldset>
152
152
  </form>
153
153
 
154
- <barcode-tag bcid="qrcode" .value=${this._orderNo}></barcode-tag>
154
+ <barcode-tag bcid="qrcode" .value=${this._orderNo} showLogo="true"></barcode-tag>
155
155
  </div>
156
156
  `}
157
157
 
@@ -137,7 +137,7 @@ class WorksheetReplenishment extends localize(i18next)(PageView) {
137
137
  </fieldset>
138
138
  </form>
139
139
 
140
- <barcode-tag bcid="qrcode" .value=${this._orderNo}></barcode-tag>
140
+ <barcode-tag bcid="qrcode" .value=${this._orderNo} showLogo="true"></barcode-tag>
141
141
  </div>
142
142
 
143
143
  <div class="grist">
@@ -142,7 +142,7 @@ class WorksheetRefVas extends localize(i18next)(PageView) {
142
142
  </form>
143
143
 
144
144
  <!-- TODO: Get reference order number to show QR code -->
145
- <barcode-tag bcid="qrcode" .value=${this.formData.orderNo}></barcode-tag>
145
+ <barcode-tag bcid="qrcode" .value=${this.formData.orderNo} showLogo="true"></barcode-tag>
146
146
  </div>
147
147
 
148
148
  <div class="container">
@@ -160,7 +160,7 @@ class WorksheetVas extends localize(i18next)(PageView) {
160
160
  </fieldset>
161
161
  </form>
162
162
 
163
- <barcode-tag bcid="qrcode" .value=${this._voNo}></barcode-tag>
163
+ <barcode-tag bcid="qrcode" .value=${this._voNo} showLogo="true"></barcode-tag>
164
164
  </div>
165
165
 
166
166
  <div class="container">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.345",
3
+ "version": "4.3.347",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -91,7 +91,7 @@
91
91
  "@things-factory/print-ui": "^4.3.281",
92
92
  "@things-factory/product-base": "^4.3.344",
93
93
  "@things-factory/resource-ui": "^4.3.281",
94
- "@things-factory/sales-ui": "^4.3.345",
94
+ "@things-factory/sales-ui": "^4.3.346",
95
95
  "@things-factory/scene-data-transform": "^4.3.281",
96
96
  "@things-factory/scene-excel": "^4.3.281",
97
97
  "@things-factory/scene-firebase": "^4.3.281",
@@ -107,8 +107,8 @@
107
107
  "@things-factory/system-ui": "^4.3.281",
108
108
  "@things-factory/transport-base": "^4.3.344",
109
109
  "@things-factory/tutorial-ui": "^4.3.281",
110
- "@things-factory/warehouse-base": "^4.3.345",
111
- "@things-factory/worksheet-base": "^4.3.345"
110
+ "@things-factory/warehouse-base": "^4.3.346",
111
+ "@things-factory/worksheet-base": "^4.3.347"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.281",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "9f0c745f3b86edf8d20dac827e6b02739144136e"
120
+ "gitHead": "904685cece59b6764b617ff8547d7d5efe1f666c"
121
121
  }
@@ -1915,6 +1915,9 @@
1915
1915
  "title.picking": "picking",
1916
1916
  "title.pickup_logistics": "pickup logistics",
1917
1917
  "title.please_select_generate_type": "please select generate type:",
1918
+ "text.please_select_order_with_status_deactivated_only": "please select order with status deactivated only",
1919
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "please select at least one order with status deactivated to proceed",
1920
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "please select maximum 50 worksheets with status deactivated to proceed",
1918
1921
  "title.preunload": "preunload",
1919
1922
  "title.preview": "preview",
1920
1923
  "title.print_location_label": "print location label",
@@ -1514,6 +1514,9 @@
1514
1514
  "text.please_select_transport_type": "차량유형을 선택해 주세요",
1515
1515
  "text.please_wait": "잠시만 기다려주세요",
1516
1516
  "text.please_write_down_full_name_clearly": "please write down full name clearly",
1517
+ "text.please_select_order_with_status_deactivated_only": " [ko] please select order with status deactivated only",
1518
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[ko] please select at least one order with status deactivated to proceed",
1519
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[ko] please select maximum 50 worksheets with status deactivated to proceed",
1517
1520
  "text.preunload_has_completed": "임시하차가 완료 되었습니다",
1518
1521
  "text.previous_picking_is_still_executing_please_wait": "[ko]Previous picking is still executing. Please wait",
1519
1522
  "text.previous_scan_is_executing": "[ko] previous scan is executing",
@@ -1459,6 +1459,9 @@
1459
1459
  "text.please_select_the_product": "[ms]please select the product",
1460
1460
  "text.please_select_transport_type": "sila pilih jenis kenderaan",
1461
1461
  "text.please_wait": "sila tunggu",
1462
+ "text.please_select_order_with_status_deactivated_only": " [ms] please select order with status deactivated only",
1463
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[ms] please select at least one order with status deactivated to proceed",
1464
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[ms] please select maximum 50 worksheets with status deactivated to proceed",
1462
1465
  "text.please_write_down_full_name_clearly": "sila pastikan nama anda tulis dengan jelas",
1463
1466
  "text.preunload_has_completed": "preunload has been completed",
1464
1467
  "text.previous_picking_is_still_executing_please_wait": "[ms] Previous picking is still executing. Please wait",
@@ -1427,6 +1427,9 @@
1427
1427
  "text.please_select_the_product": "[zh]please select the product",
1428
1428
  "text.please_select_transport_type": "please select transport type",
1429
1429
  "text.please_wait": "please wait",
1430
+ "text.please_select_order_with_status_deactivated_only": " [zh] please select order with status deactivated only",
1431
+ "text.please_select_at_least_one_order_with_status_deactivated_to_proceed": "[zh] please select at least one order with status deactivated to proceed",
1432
+ "text.please_select_maximum_50_worksheets_with_status_deactivated_to_proceed": "[zh] please select maximum 50 worksheets with status deactivated to proceed",
1430
1433
  "text.preunload_has_completed": "preunload has been completed",
1431
1434
  "text.previous_picking_is_still_executing_please_wait": "[zh]Previous picking is still executing. Please wait",
1432
1435
  "text.previous_scan_is_executing": "[zh] previous scan is executing",