@things-factory/operato-wms 4.3.361 → 4.3.362

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.
@@ -1,12 +1,22 @@
1
1
  import '@things-factory/grist-ui'
2
2
 
3
3
  import gql from 'graphql-tag'
4
- import { css, html, LitElement } from 'lit-element'
4
+ import {
5
+ css,
6
+ html,
7
+ LitElement
8
+ } from 'lit-element'
5
9
  import { connect } from 'pwa-helpers/connect-mixin'
6
10
 
7
11
  import { DirectPrinter } from '@things-factory/barcode-base'
8
- import { i18next, localize } from '@things-factory/i18n-base'
9
- import { client, store } from '@things-factory/shell'
12
+ import {
13
+ i18next,
14
+ localize
15
+ } from '@things-factory/i18n-base'
16
+ import {
17
+ client,
18
+ store
19
+ } from '@things-factory/shell'
10
20
  import { isMobileDevice } from '@things-factory/utils'
11
21
 
12
22
  import { PALLET_LABEL_SETTING_KEY } from '../constants'
@@ -115,17 +125,16 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
115
125
  if (changeProps.has('pallets')) {
116
126
  if (this.pallets && this.pallets.records && this.pallets.records.length) {
117
127
  this.data = {
118
- records: this.pallets.records.map(record => {
119
- return {
120
- ...record,
121
- startSeq: 1
122
- }
123
- })
124
- }
128
+ records: this.pallets.records
129
+ .map(record => ({ ...record, startSeq: 1 }))
130
+ .sort((a, b) => a.product.sku.localeCompare(b.product.sku))
131
+ };
132
+ //console.log(this.data.records)
125
133
  }
126
134
  }
127
135
  }
128
136
 
137
+
129
138
  async _printLabel() {
130
139
  try {
131
140
  let labelId = this._palletLabel && this._palletLabel.id
@@ -248,6 +257,8 @@ class PalletLabelPopup extends connect(store)(localize(i18next)(LitElement)) {
248
257
  })
249
258
  )
250
259
  }
260
+
261
+
251
262
  }
252
263
 
253
264
  window.customElements.define('pallet-label-popup', PalletLabelPopup)
@@ -8,16 +8,30 @@ import './pallet-label-popup'
8
8
  import './putaway-worksheet-generate-popup'
9
9
 
10
10
  import gql from 'graphql-tag'
11
- import { css, html } from 'lit-element'
11
+ import {
12
+ css,
13
+ html
14
+ } from 'lit-element'
12
15
 
13
16
  import { getCodeByName } from '@things-factory/code-base'
14
17
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
15
18
  import { getRenderer } from '@things-factory/grist-ui'
16
- import { i18next, localize } from '@things-factory/i18n-base'
19
+ import {
20
+ i18next,
21
+ localize
22
+ } from '@things-factory/i18n-base'
17
23
  import { openPopup } from '@things-factory/layout-base'
18
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
24
+ import {
25
+ client,
26
+ CustomAlert,
27
+ navigate,
28
+ PageView
29
+ } from '@things-factory/shell'
19
30
  import { CommonButtonStyles } from '@things-factory/styles'
20
- import { isMobileDevice, sleep } from '@things-factory/utils'
31
+ import {
32
+ isMobileDevice,
33
+ sleep
34
+ } from '@things-factory/utils'
21
35
 
22
36
  import { fetchSettingRule } from '../../fetch-setting-value'
23
37
  import {
@@ -583,7 +597,7 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
583
597
  targetProduct && targetProduct.palletQty && Number(targetProduct.palletQty) > 0 ? true : false,
584
598
  isLooseItem: worksheet.arrivalNotice.looseItem ? true : false
585
599
  }
586
- })
600
+ }).sort((a, b) => a.product.sku.localeCompare(b.product.sku))
587
601
  }
588
602
 
589
603
  const orderVass = worksheet.orderVass
@@ -597,7 +611,7 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
597
611
  set: orderVas.set ? `Set ${orderVas.set}` : ''
598
612
  }
599
613
  })
600
- }
614
+ };
601
615
  }
602
616
 
603
617
  this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
@@ -981,6 +995,27 @@ class WorksheetUnloading extends localize(i18next)(PageView) {
981
995
  })
982
996
  )
983
997
  }
998
+
999
+ //sort values
1000
+ _compareValues(key, order = 'asc') {
1001
+ return function innerSort(a, b) {
1002
+ if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
1003
+ return 0
1004
+ }
1005
+
1006
+ const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
1007
+ const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
1008
+
1009
+ let comparison = 0
1010
+ if (varA > varB) {
1011
+ comparison = 1
1012
+ } else if (varA < varB) {
1013
+ comparison = -1
1014
+ }
1015
+ return order === 'desc' ? comparison * -1 : comparison
1016
+ }
1017
+ }
1018
+
984
1019
  }
985
1020
 
986
1021
  window.customElements.define('worksheet-unloading', WorksheetUnloading)
@@ -10,14 +10,25 @@ import './proceed-edit-product-popup'
10
10
  import './view-product-changes-popup'
11
11
 
12
12
  import gql from 'graphql-tag'
13
- import { css, html } from 'lit-element'
13
+ import {
14
+ css,
15
+ html
16
+ } from 'lit-element'
14
17
 
15
18
  import { getCodeByName } from '@things-factory/code-base'
16
19
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
17
20
  import { getRenderer } from '@things-factory/grist-ui'
18
- import { i18next, localize } from '@things-factory/i18n-base'
21
+ import {
22
+ i18next,
23
+ localize
24
+ } from '@things-factory/i18n-base'
19
25
  import { openPopup } from '@things-factory/layout-base'
20
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
26
+ import {
27
+ client,
28
+ CustomAlert,
29
+ navigate,
30
+ PageView
31
+ } from '@things-factory/shell'
21
32
  import { CommonButtonStyles } from '@things-factory/styles'
22
33
  import { isMobileDevice } from '@things-factory/utils'
23
34
 
@@ -931,12 +942,12 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
931
942
  id
932
943
  }
933
944
  remark
934
- unitPrice
935
945
  adjustedUnitPrice
936
946
  status
937
947
  packingType
938
948
  adjustedPackingType
939
949
  packingSize
950
+ unitPrice
940
951
  uomValue
941
952
  adjustedUomValue
942
953
  uom
@@ -1013,13 +1024,14 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1013
1024
 
1014
1025
  this.setProductGristConfig()
1015
1026
  this.productData = {
1016
- records: orderProducts.map(record => {
1027
+ records: orderProducts
1028
+ .map(record => {
1017
1029
  return {
1018
1030
  ...record,
1019
1031
  productSku: record.product.sku,
1020
1032
  productBrand: record.product.brand
1021
1033
  }
1022
- })
1034
+ }).sort((a, b) => a.product.sku.localeCompare(b.product.sku))
1023
1035
  }
1024
1036
  this.vasData = {
1025
1037
  records: orderVass
@@ -1651,6 +1663,7 @@ class ArrivalNoticeDetail extends localize(i18next)(PageView) {
1651
1663
  })
1652
1664
  )
1653
1665
  }
1666
+
1654
1667
  }
1655
1668
 
1656
1669
  window.customElements.define('arrival-notice-detail', ArrivalNoticeDetail)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.361",
3
+ "version": "4.3.362",
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.357",
93
93
  "@things-factory/resource-ui": "^4.3.281",
94
- "@things-factory/sales-ui": "^4.3.358",
94
+ "@things-factory/sales-ui": "^4.3.362",
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",
@@ -108,7 +108,7 @@
108
108
  "@things-factory/transport-base": "^4.3.344",
109
109
  "@things-factory/tutorial-ui": "^4.3.281",
110
110
  "@things-factory/warehouse-base": "^4.3.358",
111
- "@things-factory/worksheet-base": "^4.3.361"
111
+ "@things-factory/worksheet-base": "^4.3.362"
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": "eb645ca1eb035324f0c2eec4084e5410ccee0ee9"
120
+ "gitHead": "7ee78b7c4901c96c01209e579b8c4912c541e484"
121
121
  }