@things-factory/operato-wms 3.8.12 → 3.8.17
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/master/location-list.js +1 -0
- package/client/pages/master/print-location-label.js +142 -156
- package/client/pages/outbound/packing-product.js +6 -0
- package/client/pages/outbound/picking-product.js +4 -2
- package/package.json +3 -3
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -665,6 +665,7 @@ class LocationList extends connect(store)(localize(i18next)(PageView)) {
|
|
|
665
665
|
|
|
666
666
|
/* for location record mapping */
|
|
667
667
|
searchParams.append('location', record.name)
|
|
668
|
+
searchParams.append('originalName', record.originalName)
|
|
668
669
|
searchParams.append('label', record.indicator)
|
|
669
670
|
|
|
670
671
|
try {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html, LitElement } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
4
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
5
9
|
import { client } from '@things-factory/shell'
|
|
6
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
7
|
-
import {
|
|
8
|
-
import gql from 'graphql-tag'
|
|
9
|
-
import { css, html, LitElement } from 'lit-element'
|
|
11
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
10
12
|
|
|
11
13
|
export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
12
14
|
static get properties() {
|
|
@@ -91,27 +93,24 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
91
93
|
<fieldset>
|
|
92
94
|
<label>${i18next.t('label.label_format')}</label>
|
|
93
95
|
<select
|
|
94
|
-
name="labelFormat"
|
|
96
|
+
name="labelFormat"
|
|
95
97
|
@change="${e => {
|
|
96
|
-
this._fullLocationFormat =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (this._labelIndicator.value != '') {
|
|
101
|
-
this._getPrintPreview(this._labelIndicator.value)
|
|
102
|
-
}
|
|
103
|
-
}}">
|
|
98
|
+
this._fullLocationFormat = e.currentTarget.value === 'full_format' ? true : false
|
|
99
|
+
if (this._labelIndicator.value != '') this.dataGrist.fetch()
|
|
100
|
+
}}"
|
|
101
|
+
>
|
|
104
102
|
<option value="full_format">A-01-01-01 (${i18next.t('text.full_format')})</option>
|
|
105
103
|
<option value="partial_format">A-01-01 (${i18next.t('text.partial_format')})</option>
|
|
106
104
|
</select>
|
|
107
105
|
|
|
108
106
|
<label>${i18next.t('label.label_indicator')}</label>
|
|
109
|
-
<select
|
|
107
|
+
<select
|
|
108
|
+
name="labelIndicator"
|
|
110
109
|
@change="${e => {
|
|
111
110
|
let indicator = e.currentTarget.value
|
|
112
|
-
if (indicator !== '')
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
if (indicator !== '') this.dataGrist.fetch()
|
|
112
|
+
}}"
|
|
113
|
+
>
|
|
115
114
|
<option value="">-- ${i18next.t('text.please_select_label_indicator')} --</option>
|
|
116
115
|
<option value="zone">${i18next.t('label.zone')}</option>
|
|
117
116
|
<option value="row">${i18next.t('label.row')}</option>
|
|
@@ -151,6 +150,12 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
151
150
|
header: i18next.t('field.name'),
|
|
152
151
|
width: 250
|
|
153
152
|
},
|
|
153
|
+
{
|
|
154
|
+
type: 'string',
|
|
155
|
+
name: 'originalName',
|
|
156
|
+
header: i18next.t('field.original_name'),
|
|
157
|
+
width: 250
|
|
158
|
+
},
|
|
154
159
|
{
|
|
155
160
|
type: 'string',
|
|
156
161
|
name: 'indicator',
|
|
@@ -159,11 +164,6 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
159
164
|
}
|
|
160
165
|
]
|
|
161
166
|
}
|
|
162
|
-
|
|
163
|
-
if (this.selectedLocations && this.selectedLocations.length > 0) {
|
|
164
|
-
this._records = []
|
|
165
|
-
this._total = 0
|
|
166
|
-
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
get _labelIndicator() {
|
|
@@ -174,171 +174,157 @@ export class PrintLocationLabel extends localize(i18next)(LitElement) {
|
|
|
174
174
|
return this.shadowRoot.querySelector('data-grist')
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
async fetchHandler() {
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
}
|
|
177
|
+
async fetchHandler({ page, limit, sorters = [{ name: 'name' }] }) {
|
|
178
|
+
if (this._labelIndicator.value == '') return
|
|
179
|
+
const fetcherDetail = { page, limit, sorters }
|
|
180
|
+
const indicator = this._labelIndicator.value || ''
|
|
183
181
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
let filters = [
|
|
183
|
+
{
|
|
184
|
+
name: 'warehouse_id',
|
|
185
|
+
operator: 'eq',
|
|
186
|
+
value: this.warehouseId
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
let locations = [],
|
|
191
|
+
totalLocations = 0
|
|
187
192
|
|
|
188
|
-
if (this.selectedLocations && this.selectedLocations.length
|
|
189
|
-
|
|
193
|
+
if (this.selectedLocations && this.selectedLocations.length) {
|
|
194
|
+
filters.push({
|
|
195
|
+
name: 'name',
|
|
196
|
+
operator: 'in',
|
|
197
|
+
value: this.selectedLocations.map(location => location.name)
|
|
198
|
+
})
|
|
199
|
+
const { records, total } = await this._fetchLocations(filters, fetcherDetail)
|
|
200
|
+
locations = records
|
|
201
|
+
totalLocations = total
|
|
190
202
|
} else {
|
|
191
|
-
if (this.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
operator: 'noteq',
|
|
202
|
-
value: 'BUFFER'
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
locations = await this._fetchLocations(filters)
|
|
206
|
-
}
|
|
203
|
+
if (this._fullLocationFormat) {
|
|
204
|
+
filters.push({
|
|
205
|
+
name: 'type',
|
|
206
|
+
operator: 'noteq',
|
|
207
|
+
value: 'BUFFER'
|
|
208
|
+
})
|
|
209
|
+
const { records, total } = await this._fetchLocations(filters, fetcherDetail)
|
|
210
|
+
locations = records
|
|
211
|
+
totalLocations = total
|
|
212
|
+
} else {
|
|
207
213
|
// if partial format:
|
|
208
|
-
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
operator: 'eq',
|
|
220
|
-
value: this.warehouseId
|
|
221
|
-
}]
|
|
222
|
-
locations = await this._fetchLocationsByGroup(filters)
|
|
223
|
-
}
|
|
214
|
+
// prevent from printing same location label. eg: A-01-01-01, A-01-01-02 > will print A-01-01 twice{
|
|
215
|
+
if (indicator == 'shelf') {
|
|
216
|
+
this._showToast({
|
|
217
|
+
level: 'error',
|
|
218
|
+
message: i18next.t('text.shelf_is_not_allowed_as_an_indicator_for_partial_format')
|
|
219
|
+
})
|
|
220
|
+
return
|
|
221
|
+
} else {
|
|
222
|
+
const { records, total } = await this._fetchLocationsByGroup(filters, fetcherDetail)
|
|
223
|
+
locations = records
|
|
224
|
+
totalLocations = total
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
227
|
}
|
|
227
228
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
...location,
|
|
232
|
-
indicator: location[indicator]
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
else {
|
|
229
|
+
return {
|
|
230
|
+
total: totalLocations,
|
|
231
|
+
records: locations.map(location => {
|
|
237
232
|
return {
|
|
238
233
|
...location,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
:
|
|
242
|
-
|
|
234
|
+
indicator: location[indicator],
|
|
235
|
+
originalName: location.name,
|
|
236
|
+
name:
|
|
237
|
+
location.type === 'BUFFER'
|
|
238
|
+
? ''
|
|
239
|
+
: this._fullLocationFormat // check if full location format is true
|
|
240
|
+
? `${location.zone}-${location.row}-${location.column}-${location.shelf}`
|
|
241
|
+
: `${location.zone}-${location.row}-${location.column}`
|
|
243
242
|
}
|
|
244
|
-
}
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
this._records = locations
|
|
248
|
-
this._total = locations.length
|
|
249
|
-
|
|
250
|
-
this._config = {
|
|
251
|
-
...this._config,
|
|
252
|
-
pagination: { pages: [20, 50, 100, 200] }
|
|
243
|
+
})
|
|
253
244
|
}
|
|
254
|
-
|
|
255
|
-
this.dataGrist.fetch()
|
|
256
245
|
}
|
|
257
246
|
|
|
258
|
-
async _fetchLocations(filters) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
})}) {
|
|
272
|
-
items {
|
|
273
|
-
name
|
|
274
|
-
zone
|
|
275
|
-
row
|
|
276
|
-
column
|
|
277
|
-
shelf
|
|
278
|
-
}
|
|
279
|
-
total
|
|
247
|
+
async _fetchLocations(filters, fetcherDetail) {
|
|
248
|
+
try {
|
|
249
|
+
const response = await client.query({
|
|
250
|
+
query: gql`
|
|
251
|
+
query locations($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
252
|
+
locations(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
253
|
+
items {
|
|
254
|
+
name
|
|
255
|
+
zone
|
|
256
|
+
row
|
|
257
|
+
column
|
|
258
|
+
shelf
|
|
259
|
+
type
|
|
280
260
|
}
|
|
261
|
+
total
|
|
281
262
|
}
|
|
282
|
-
|
|
283
|
-
|
|
263
|
+
}
|
|
264
|
+
`,
|
|
265
|
+
variables: {
|
|
266
|
+
filters,
|
|
267
|
+
paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
|
|
268
|
+
sortings: fetcherDetail.sorters
|
|
269
|
+
}
|
|
270
|
+
})
|
|
284
271
|
|
|
285
|
-
|
|
286
|
-
|
|
272
|
+
if (!response.errors) {
|
|
273
|
+
return {
|
|
274
|
+
records: response.data.locations.items || [],
|
|
275
|
+
total: response.data.locations.total || 0
|
|
287
276
|
}
|
|
288
|
-
} catch (e) {
|
|
289
|
-
this._showToast({
|
|
290
|
-
level: 'error',
|
|
291
|
-
message: e
|
|
292
|
-
})
|
|
293
|
-
} finally {
|
|
294
|
-
this.dataGrist.hideSpinner()
|
|
295
277
|
}
|
|
278
|
+
} catch (e) {
|
|
279
|
+
this._showToast({
|
|
280
|
+
level: 'error',
|
|
281
|
+
message: e
|
|
282
|
+
})
|
|
296
283
|
}
|
|
297
284
|
}
|
|
298
285
|
|
|
299
|
-
async _fetchLocationsByGroup(filters) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
sortings: sorters
|
|
312
|
-
})}) {
|
|
313
|
-
items {
|
|
314
|
-
name
|
|
315
|
-
zone
|
|
316
|
-
row
|
|
317
|
-
column
|
|
318
|
-
}
|
|
319
|
-
total
|
|
286
|
+
async _fetchLocationsByGroup(filters, fetcherDetail) {
|
|
287
|
+
try {
|
|
288
|
+
const response = await client.query({
|
|
289
|
+
query: gql`
|
|
290
|
+
query locationsByGroup($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
291
|
+
locationsByGroup(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
292
|
+
items {
|
|
293
|
+
name
|
|
294
|
+
zone
|
|
295
|
+
row
|
|
296
|
+
column
|
|
297
|
+
type
|
|
320
298
|
}
|
|
299
|
+
total
|
|
321
300
|
}
|
|
322
|
-
|
|
323
|
-
|
|
301
|
+
}
|
|
302
|
+
`,
|
|
303
|
+
variables: {
|
|
304
|
+
filters,
|
|
305
|
+
paginations: { page: fetcherDetail.page, limit: fetcherDetail.limit },
|
|
306
|
+
sortings: fetcherDetail.sorters
|
|
307
|
+
}
|
|
308
|
+
})
|
|
324
309
|
|
|
325
|
-
|
|
326
|
-
|
|
310
|
+
if (!response.errors) {
|
|
311
|
+
return {
|
|
312
|
+
records: response.data.locationsByGroup.items || [],
|
|
313
|
+
total: response.data.locationsByGroup.total || 0
|
|
327
314
|
}
|
|
328
|
-
} catch (e) {
|
|
329
|
-
this._showToast({
|
|
330
|
-
level: 'error',
|
|
331
|
-
message: e
|
|
332
|
-
})
|
|
333
|
-
} finally {
|
|
334
|
-
this.dataGrist.hideSpinner()
|
|
335
315
|
}
|
|
316
|
+
} catch (e) {
|
|
317
|
+
this._showToast({
|
|
318
|
+
level: 'error',
|
|
319
|
+
message: e
|
|
320
|
+
})
|
|
336
321
|
}
|
|
337
322
|
}
|
|
338
323
|
|
|
339
324
|
_printLocations() {
|
|
340
|
-
|
|
341
|
-
|
|
325
|
+
const records = this.dataGrist.data && this.dataGrist.data.records
|
|
326
|
+
if (records && records.length) {
|
|
327
|
+
this.dispatchEvent(new CustomEvent(i18next.t('text.printing'), { detail: records }))
|
|
342
328
|
history.back()
|
|
343
329
|
} else {
|
|
344
330
|
this._showToast({
|
|
@@ -652,6 +652,12 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
652
652
|
var decodedHTML = atob(orderDocInfo[0].file)
|
|
653
653
|
this._callPrintDialog(decodedHTML)
|
|
654
654
|
break
|
|
655
|
+
|
|
656
|
+
default:
|
|
657
|
+
let url = new URL(window.location)
|
|
658
|
+
|
|
659
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${encodeURIComponent(orderDocInfo[0].airwayBill)}`
|
|
660
|
+
this._callPrintDialog(convertedPdfUrl)
|
|
655
661
|
}
|
|
656
662
|
}
|
|
657
663
|
}
|
|
@@ -849,7 +849,9 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
849
849
|
|
|
850
850
|
if (this._selectedOrderInventory) {
|
|
851
851
|
const record = this.data.records.find(
|
|
852
|
-
record =>
|
|
852
|
+
record =>
|
|
853
|
+
record.product.sku === this._selectedOrderInventory.product.sku &&
|
|
854
|
+
record.palletId === this._selectedOrderInventory.palletId
|
|
853
855
|
)
|
|
854
856
|
|
|
855
857
|
this.updateSelectedItemProp(record)
|
|
@@ -860,7 +862,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
860
862
|
this.productBarcodeInput.value = ''
|
|
861
863
|
// this._focusOnCartonNoInput()
|
|
862
864
|
}
|
|
863
|
-
this.inputForm
|
|
865
|
+
this.fillUpForm(this.inputForm, record)
|
|
864
866
|
} else {
|
|
865
867
|
// this._focusOnProductBarcodeInput()
|
|
866
868
|
this.fillUpForm(this.inputForm, record)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-wms",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.17",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
"@things-factory/transport-base": "^3.8.0",
|
|
104
104
|
"@things-factory/tutorial-ui": "^3.8.0",
|
|
105
105
|
"@things-factory/warehouse-base": "^3.8.12",
|
|
106
|
-
"@things-factory/worksheet-base": "^3.8.
|
|
106
|
+
"@things-factory/worksheet-base": "^3.8.16"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@things-factory/builder": "^3.7.5"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "8ecd441781a6f13992e9d5b5713b1b5a33122c7d"
|
|
112
112
|
}
|
package/translations/en.json
CHANGED
|
@@ -318,6 +318,7 @@
|
|
|
318
318
|
"field.order_status": "order status",
|
|
319
319
|
"field.order_type": "order type",
|
|
320
320
|
"field.origin_product": "origin product",
|
|
321
|
+
"field.original_name": "original name",
|
|
321
322
|
"field.ot": "O/T",
|
|
322
323
|
"field.other_target": "other target",
|
|
323
324
|
"field.out": "out",
|
package/translations/ko.json
CHANGED
package/translations/ms.json
CHANGED
|
@@ -332,6 +332,7 @@
|
|
|
332
332
|
"field.order_status": "status pesanan",
|
|
333
333
|
"field.order_type": "jenis pesanan",
|
|
334
334
|
"field.origin_product": "produk asal",
|
|
335
|
+
"field.original_name": "nama asal",
|
|
335
336
|
"field.ot": "O/T",
|
|
336
337
|
"field.other_target": "sasaran lain",
|
|
337
338
|
"field.out": "keluar",
|
package/translations/zh.json
CHANGED
|
@@ -315,6 +315,7 @@
|
|
|
315
315
|
"field.order_status": "[zh]order status",
|
|
316
316
|
"field.order_type": "[zh]order type",
|
|
317
317
|
"field.origin_product": "[zh]origin product",
|
|
318
|
+
"field.original_name": "[zh]original name",
|
|
318
319
|
"field.ot": "O/T",
|
|
319
320
|
"field.other_target": "[zh]other target",
|
|
320
321
|
"field.out": "out",
|