@things-factory/operato-wms 4.1.35 → 4.1.38
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/inbound/unload-product.js +2 -2
- package/client/pages/inventory/non-loaded-inventory.js +120 -48
- package/client/pages/order/release-order/b2c/b2c-order-requests.js +67 -13
- package/client/pages/outbound/packing-product.js +14 -11
- package/client/pages/outbound/picking-product.js +54 -16
- package/client/pages/report/outbound-serial-number-report.js +11 -4
- package/dist-server/graphql/resolvers/dashboard/index.js +3 -1
- package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +51 -0
- package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +1 -0
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +58 -0
- package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +1 -0
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js +5 -1
- package/dist-server/graphql/resolvers/extra/add-release-good-products.js.map +1 -1
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js +4 -2
- package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js.map +1 -1
- package/dist-server/graphql/types/dashboard/index.js +5 -1
- package/dist-server/graphql/types/dashboard/index.js.map +1 -1
- package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +16 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +1 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-status.js +14 -0
- package/dist-server/graphql/types/dashboard/inventory-expiry-status.js.map +1 -0
- package/dist-server/graphql/types/reports/outbound-serial-number-report.js +2 -1
- package/dist-server/graphql/types/reports/outbound-serial-number-report.js.map +1 -1
- package/helps/release-note.ko.md +37 -2
- package/helps/release-note.md +12 -41
- package/helps/release-note.ms.md +36 -1
- package/helps/release-note.zh.md +36 -1
- package/package.json +7 -7
- package/server/graphql/resolvers/dashboard/index.ts +5 -1
- package/server/graphql/resolvers/dashboard/inventory-expiry-monitor.ts +49 -0
- package/server/graphql/resolvers/dashboard/outbound-order-by-status.ts +65 -0
- package/server/graphql/resolvers/extra/add-release-good-products.ts +7 -2
- package/server/graphql/resolvers/reports/outbound-serial-number-report.ts +4 -2
- package/server/graphql/types/dashboard/index.ts +5 -1
- package/server/graphql/types/dashboard/inventory-expiry-counter.ts +10 -0
- package/server/graphql/types/dashboard/inventory-expiry-status.ts +8 -0
- package/server/graphql/types/reports/outbound-serial-number-report.ts +2 -1
- package/translations/en.json +2 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -859,7 +859,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
859
859
|
this._showToast(e)
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
|
-
|
|
863
862
|
async _scanProductUnload() {
|
|
864
863
|
if (this._scanning) return this._showToast({ message: i18next.t('text.previous_scan_is_executing') })
|
|
865
864
|
this._scanning = true
|
|
@@ -1011,8 +1010,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1011
1010
|
}
|
|
1012
1011
|
} catch (e) {
|
|
1013
1012
|
this._showToast(e)
|
|
1013
|
+
} finally {
|
|
1014
|
+
this._scanning = false
|
|
1014
1015
|
}
|
|
1015
|
-
this._scanning = false
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
1018
|
async fetchProductDetail(gtin, productId) {
|
|
@@ -8,7 +8,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
8
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
9
|
import { client, PageView, store } from '@things-factory/shell'
|
|
10
10
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
11
|
-
import {
|
|
11
|
+
import { isMobileDevice } from '@things-factory/utils'
|
|
12
12
|
|
|
13
13
|
class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
14
14
|
static get styles() {
|
|
@@ -65,7 +65,11 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
65
65
|
|
|
66
66
|
get context() {
|
|
67
67
|
return {
|
|
68
|
-
title: i18next.t('title.non_loaded_inventory')
|
|
68
|
+
title: i18next.t('title.non_loaded_inventory'),
|
|
69
|
+
exportable: {
|
|
70
|
+
name: i18next.t('title.non_loaded_inventory'),
|
|
71
|
+
data: this._exportableData.bind(this)
|
|
72
|
+
}
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -73,45 +77,51 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
73
77
|
this.config = {
|
|
74
78
|
list: {
|
|
75
79
|
fields: [
|
|
76
|
-
'
|
|
80
|
+
'releaseOrderNo',
|
|
77
81
|
'palletId',
|
|
78
82
|
'cartonId',
|
|
79
83
|
'batchId',
|
|
80
84
|
'productSku',
|
|
81
|
-
'
|
|
82
|
-
'
|
|
85
|
+
'productName',
|
|
86
|
+
'productBrand',
|
|
83
87
|
'packingType',
|
|
84
|
-
'
|
|
85
|
-
'
|
|
88
|
+
'pickedQty',
|
|
89
|
+
'pickedUomValue',
|
|
86
90
|
'uom',
|
|
87
91
|
'binLocation'
|
|
88
92
|
]
|
|
89
93
|
},
|
|
90
|
-
pagination: { pages: [
|
|
91
|
-
rows: {
|
|
92
|
-
appendable: false
|
|
93
|
-
},
|
|
94
|
+
pagination: { pages: [50, 100, 200, 500] },
|
|
95
|
+
rows: { appendable: false },
|
|
94
96
|
columns: [
|
|
95
97
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
96
98
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
97
99
|
{
|
|
98
100
|
type: 'string',
|
|
99
|
-
name: '
|
|
101
|
+
name: 'releaseOrderNo',
|
|
100
102
|
header: i18next.t('field.ro_no'),
|
|
101
|
-
|
|
103
|
+
label: true,
|
|
104
|
+
width: 150
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'string',
|
|
108
|
+
name: 'refNo',
|
|
109
|
+
header: i18next.t('field.ref_no'),
|
|
110
|
+
label: true,
|
|
102
111
|
width: 150
|
|
103
112
|
},
|
|
104
113
|
{
|
|
105
114
|
type: 'string',
|
|
106
115
|
name: 'palletId',
|
|
107
116
|
header: i18next.t('field.lot_id'),
|
|
108
|
-
|
|
117
|
+
label: true,
|
|
109
118
|
width: 150
|
|
110
119
|
},
|
|
111
120
|
{
|
|
112
121
|
type: 'string',
|
|
113
122
|
name: 'cartonId',
|
|
114
123
|
header: i18next.t('field.carton_id'),
|
|
124
|
+
label: true,
|
|
115
125
|
sortable: true,
|
|
116
126
|
width: 120
|
|
117
127
|
},
|
|
@@ -119,55 +129,60 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
119
129
|
type: 'string',
|
|
120
130
|
name: 'batchId',
|
|
121
131
|
header: i18next.t('field.batch_id'),
|
|
122
|
-
|
|
123
|
-
sortable: true,
|
|
132
|
+
label: true,
|
|
124
133
|
width: 120
|
|
125
134
|
},
|
|
126
135
|
{
|
|
127
136
|
type: 'string',
|
|
128
|
-
name: '
|
|
137
|
+
name: 'productSku',
|
|
129
138
|
header: i18next.t('field.sku'),
|
|
139
|
+
label: true,
|
|
130
140
|
sortable: true,
|
|
131
141
|
width: 150
|
|
132
142
|
},
|
|
133
143
|
{
|
|
134
144
|
type: 'string',
|
|
135
|
-
name: '
|
|
145
|
+
name: 'productName',
|
|
136
146
|
header: i18next.t('field.product'),
|
|
147
|
+
label: true,
|
|
137
148
|
sortable: true,
|
|
138
149
|
width: 250
|
|
139
150
|
},
|
|
140
151
|
{
|
|
141
152
|
type: 'string',
|
|
142
|
-
name: '
|
|
153
|
+
name: 'productBrand',
|
|
143
154
|
header: i18next.t('field.brand'),
|
|
155
|
+
label: true,
|
|
144
156
|
sortable: true,
|
|
145
157
|
width: 150
|
|
146
158
|
},
|
|
147
159
|
{
|
|
148
|
-
type: '
|
|
160
|
+
type: 'string',
|
|
149
161
|
name: 'packingType',
|
|
150
162
|
header: i18next.t('field.packing_type'),
|
|
151
|
-
|
|
163
|
+
label: true,
|
|
152
164
|
sortable: true,
|
|
153
165
|
width: 150
|
|
154
166
|
},
|
|
155
167
|
{
|
|
156
168
|
type: 'number',
|
|
157
|
-
name: '
|
|
169
|
+
name: 'pickedQty',
|
|
158
170
|
header: i18next.t('field.qty'),
|
|
171
|
+
label: true,
|
|
159
172
|
width: 80
|
|
160
173
|
},
|
|
161
174
|
{
|
|
162
175
|
type: 'float',
|
|
163
|
-
name: '
|
|
176
|
+
name: 'pickedUomValue',
|
|
164
177
|
header: i18next.t('field.total_uom_value'),
|
|
178
|
+
label: true,
|
|
165
179
|
width: 110
|
|
166
180
|
},
|
|
167
181
|
{
|
|
168
182
|
type: 'string',
|
|
169
183
|
name: 'uom',
|
|
170
184
|
header: i18next.t('field.uom'),
|
|
185
|
+
label: true,
|
|
171
186
|
sortable: true,
|
|
172
187
|
width: 80
|
|
173
188
|
},
|
|
@@ -175,6 +190,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
175
190
|
type: 'string',
|
|
176
191
|
name: 'binLocation',
|
|
177
192
|
header: i18next.t('field.bin_location'),
|
|
193
|
+
label: true,
|
|
178
194
|
sortable: true,
|
|
179
195
|
width: 120
|
|
180
196
|
}
|
|
@@ -184,7 +200,7 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
184
200
|
this._searchFields = [
|
|
185
201
|
{
|
|
186
202
|
label: i18next.t('field.product_info'),
|
|
187
|
-
name: '
|
|
203
|
+
name: 'productInfo',
|
|
188
204
|
type: 'text',
|
|
189
205
|
props: { searchOper: 'eq' }
|
|
190
206
|
},
|
|
@@ -208,13 +224,19 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
208
224
|
},
|
|
209
225
|
{
|
|
210
226
|
label: i18next.t('field.ro_no'),
|
|
211
|
-
name: '
|
|
227
|
+
name: 'roNo',
|
|
228
|
+
type: 'text',
|
|
229
|
+
props: { searchOper: 'i_like' }
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
label: i18next.t('field.ref_no'),
|
|
233
|
+
name: 'refNo',
|
|
212
234
|
type: 'text',
|
|
213
235
|
props: { searchOper: 'i_like' }
|
|
214
236
|
},
|
|
215
237
|
{
|
|
216
238
|
label: i18next.t('field.bin_location'),
|
|
217
|
-
name: '
|
|
239
|
+
name: 'binLocation',
|
|
218
240
|
type: 'text',
|
|
219
241
|
props: { searchOper: 'i_like' }
|
|
220
242
|
}
|
|
@@ -239,17 +261,21 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
239
261
|
const filters = await this.searchForm.getQueryFilters()
|
|
240
262
|
const response = await client.query({
|
|
241
263
|
query: gql`
|
|
242
|
-
query
|
|
243
|
-
|
|
264
|
+
query nonLoadedOrderInventories($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
265
|
+
nonLoadedOrderInventories(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
244
266
|
items {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
267
|
+
releaseGood {
|
|
268
|
+
name
|
|
269
|
+
refNo
|
|
270
|
+
}
|
|
271
|
+
inventory {
|
|
272
|
+
palletId
|
|
273
|
+
cartonId
|
|
274
|
+
}
|
|
250
275
|
packingType
|
|
251
|
-
|
|
252
|
-
|
|
276
|
+
batchId
|
|
277
|
+
pickedQty
|
|
278
|
+
pickedUomValue
|
|
253
279
|
uom
|
|
254
280
|
product {
|
|
255
281
|
sku
|
|
@@ -257,7 +283,9 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
257
283
|
brand
|
|
258
284
|
description
|
|
259
285
|
}
|
|
260
|
-
binLocation
|
|
286
|
+
binLocation {
|
|
287
|
+
name
|
|
288
|
+
}
|
|
261
289
|
updatedAt
|
|
262
290
|
}
|
|
263
291
|
total
|
|
@@ -272,22 +300,66 @@ class NonLoadedInventory extends connect(store)(localize(i18next)(PageView)) {
|
|
|
272
300
|
})
|
|
273
301
|
|
|
274
302
|
return {
|
|
275
|
-
total: response.data.
|
|
303
|
+
total: response.data.nonLoadedOrderInventories.total || 0,
|
|
276
304
|
records:
|
|
277
|
-
response.data.
|
|
278
|
-
return
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
305
|
+
response.data.nonLoadedOrderInventories.items.map(item => {
|
|
306
|
+
return {
|
|
307
|
+
...item,
|
|
308
|
+
productName: `${item.product.name} ${item.product.description}`,
|
|
309
|
+
productSku: item.product.sku,
|
|
310
|
+
productBrand: item.product.brand,
|
|
311
|
+
binLocation: item.binLocation.name,
|
|
312
|
+
palletId: item.inventory.palletId,
|
|
313
|
+
cartonId: item.inventory.cartonId,
|
|
314
|
+
releaseOrderNo: item.releaseGood.name,
|
|
315
|
+
refNo: item.releaseGood.refNo
|
|
316
|
+
}
|
|
288
317
|
}) || []
|
|
289
318
|
}
|
|
290
319
|
}
|
|
320
|
+
|
|
321
|
+
async _exportableData() {
|
|
322
|
+
try {
|
|
323
|
+
let data = []
|
|
324
|
+
|
|
325
|
+
var headerSetting = [
|
|
326
|
+
{ header: i18next.t('field.ro_no'), key: 'releaseOrderNo', width: 50, type: 'string' },
|
|
327
|
+
{ header: i18next.t('field.ref_no'), key: 'refNo', width: 50, type: 'string' },
|
|
328
|
+
{ header: i18next.t('field.lot_id'), key: 'palletId', width: 50, type: 'string' },
|
|
329
|
+
{ header: i18next.t('field.carton_id'), key: 'cartonId', width: 50, type: 'string' },
|
|
330
|
+
{ header: i18next.t('field.batch_id'), key: 'batchId', width: 25, type: 'string' },
|
|
331
|
+
{ header: i18next.t('field.sku'), key: 'productSku', width: 25, type: 'string' },
|
|
332
|
+
{ header: i18next.t('field.product'), key: 'productName', width: 25, type: 'string' },
|
|
333
|
+
{ header: i18next.t('field.brand'), key: 'productBrand', width: 25, type: 'string' },
|
|
334
|
+
{ header: i18next.t('field.packing_type'), key: 'packingType', width: 25, type: 'string' },
|
|
335
|
+
{ header: i18next.t('field.qty'), key: 'pickedQty', width: 25, type: 'string' },
|
|
336
|
+
{ header: i18next.t('field.total_uom_value'), key: 'pickedUomValue', width: 25, type: 'float' },
|
|
337
|
+
{ header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'string' },
|
|
338
|
+
{ header: i18next.t('field.bin_location'), key: 'binLocation', width: 25, type: 'string' }
|
|
339
|
+
]
|
|
340
|
+
|
|
341
|
+
if (this.dataGrist.selected && this.dataGrist.selected.length > 0) {
|
|
342
|
+
data = this.dataGrist.selected
|
|
343
|
+
} else {
|
|
344
|
+
data = (await this.fetchHandler({ page: 1, limit: 9999999 })).records
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return { header: headerSetting, data }
|
|
348
|
+
} catch (e) {
|
|
349
|
+
this._showToast(e)
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
_showToast({ type, message }) {
|
|
354
|
+
document.dispatchEvent(
|
|
355
|
+
new CustomEvent('notify', {
|
|
356
|
+
detail: {
|
|
357
|
+
type,
|
|
358
|
+
message
|
|
359
|
+
}
|
|
360
|
+
})
|
|
361
|
+
)
|
|
362
|
+
}
|
|
291
363
|
}
|
|
292
364
|
|
|
293
365
|
window.customElements.define('non-loaded-inventory', NonLoadedInventory)
|
|
@@ -3,19 +3,38 @@ import '@things-factory/grist-ui'
|
|
|
3
3
|
import '../batch-picking-popup'
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
css,
|
|
8
|
+
html
|
|
9
|
+
} from 'lit-element'
|
|
7
10
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
8
11
|
|
|
9
|
-
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
10
12
|
import { GhostPrint } from '@operato/ghost-print'
|
|
13
|
+
import { DirectPrinter } from '@things-factory/barcode-base'
|
|
11
14
|
import { getCodeByName } from '@things-factory/code-base'
|
|
12
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
i18next,
|
|
17
|
+
localize
|
|
18
|
+
} from '@things-factory/i18n-base'
|
|
13
19
|
import { openPopup } from '@things-factory/layout-base'
|
|
14
|
-
import {
|
|
15
|
-
|
|
20
|
+
import {
|
|
21
|
+
client,
|
|
22
|
+
CustomAlert,
|
|
23
|
+
navigate,
|
|
24
|
+
PageView,
|
|
25
|
+
store
|
|
26
|
+
} from '@things-factory/shell'
|
|
27
|
+
import {
|
|
28
|
+
CommonButtonStyles,
|
|
29
|
+
ScrollbarStyles
|
|
30
|
+
} from '@things-factory/styles'
|
|
16
31
|
import { isMobileDevice } from '@things-factory/utils'
|
|
17
32
|
|
|
18
|
-
import {
|
|
33
|
+
import { fetchSettingRule } from '../../../../fetch-setting-value'
|
|
34
|
+
import {
|
|
35
|
+
INTENALIZED_AWB_SETTING_KEY,
|
|
36
|
+
ORDER_STATUS
|
|
37
|
+
} from '../../../constants'
|
|
19
38
|
|
|
20
39
|
const HEADER_JSON = {
|
|
21
40
|
'Content-Type': 'application/json',
|
|
@@ -123,6 +142,7 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
123
142
|
}
|
|
124
143
|
|
|
125
144
|
async pageInitialized() {
|
|
145
|
+
const _enablePrintSCAwb = await fetchSettingRule('enable-print-sellercraft-airway-bill')
|
|
126
146
|
const _orderStatus = await getCodeByName('RO_REQUESTS_STATUS')
|
|
127
147
|
const _partners = await this._fetchPartners()
|
|
128
148
|
const _shippingProviders = await this._fetchShippingProviders()
|
|
@@ -260,6 +280,29 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
260
280
|
}
|
|
261
281
|
}
|
|
262
282
|
},
|
|
283
|
+
{
|
|
284
|
+
type: 'gutter',
|
|
285
|
+
gutterName: 'button',
|
|
286
|
+
icon: 'receipt',
|
|
287
|
+
hidden: !_enablePrintSCAwb,
|
|
288
|
+
handlers: {
|
|
289
|
+
click: async (columns, data, column, record, rowIndex) => {
|
|
290
|
+
if (record.airwayBill) {
|
|
291
|
+
let convertedPdfUrl = ''
|
|
292
|
+
if (record.airwayBill.includes('partner.shopeemobile.com')) {
|
|
293
|
+
convertedPdfUrl = `/pdf/merge?urls=${record.airwayBill}`
|
|
294
|
+
} else {
|
|
295
|
+
let url = new URL(window.location)
|
|
296
|
+
convertedPdfUrl = `${url.origin}/proxy?url=${record.airwayBill}`
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
this._callPrintDialog(convertedPdfUrl, true)
|
|
300
|
+
} else {
|
|
301
|
+
this._showToast({ message: i18next.t('text.there_is_no_airway_bill_for_this_ro') })
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
263
306
|
{
|
|
264
307
|
type: 'string',
|
|
265
308
|
name: 'name',
|
|
@@ -417,6 +460,8 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
417
460
|
name
|
|
418
461
|
description
|
|
419
462
|
}
|
|
463
|
+
airwayBill
|
|
464
|
+
trackingNo
|
|
420
465
|
}
|
|
421
466
|
total
|
|
422
467
|
}
|
|
@@ -621,13 +666,22 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
|
|
|
621
666
|
}
|
|
622
667
|
}
|
|
623
668
|
|
|
624
|
-
async _callPrintDialog(contentSource) {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
669
|
+
async _callPrintDialog(contentSource, isSellerCraft = false) {
|
|
670
|
+
if (isSellerCraft) {
|
|
671
|
+
GhostPrint.print({
|
|
672
|
+
src: contentSource,
|
|
673
|
+
onfinish: () => {
|
|
674
|
+
this._showToast({ message: i18next.t('text.document_has_been_generated') })
|
|
675
|
+
}
|
|
676
|
+
})
|
|
677
|
+
} else {
|
|
678
|
+
GhostPrint.print({
|
|
679
|
+
srcdoc: contentSource,
|
|
680
|
+
onfinish: () => {
|
|
681
|
+
this._showToast({ message: i18next.t('text.document_has_been_generated') })
|
|
682
|
+
}
|
|
683
|
+
})
|
|
684
|
+
}
|
|
631
685
|
}
|
|
632
686
|
|
|
633
687
|
_compareValues(key, order = 'asc') {
|
|
@@ -698,19 +698,22 @@ class PackingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
//find product match with input barcode
|
|
701
|
-
const foundOrderInventory = this.data.records.
|
|
702
|
-
itm
|
|
703
|
-
|
|
704
|
-
detail
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
701
|
+
const foundOrderInventory = this.data.records.find(
|
|
702
|
+
itm =>
|
|
703
|
+
itm.product.productDetails.find(
|
|
704
|
+
detail =>
|
|
705
|
+
detail.gtin === this.productBarcodeInput.value.trim() &&
|
|
706
|
+
detail.packingType == itm.packingType &&
|
|
707
|
+
detail.packingSize == itm.packingSize
|
|
708
|
+
) != undefined
|
|
708
709
|
)
|
|
709
710
|
|
|
710
|
-
if (foundOrderInventory
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
711
|
+
if (foundOrderInventory) {
|
|
712
|
+
if (foundOrderInventory?.status === WORKSHEET_STATUS.EXECUTING.value) {
|
|
713
|
+
this._selectedOrderInventory = foundOrderInventory
|
|
714
|
+
} else if (foundOrderInventory?.status === WORKSHEET_STATUS.DONE.value) {
|
|
715
|
+
throw new Error(i18next.t('text.scanned_product_status_is_done'))
|
|
716
|
+
}
|
|
714
717
|
} else {
|
|
715
718
|
throw new Error(i18next.t('text.incorrect_product_barcode'))
|
|
716
719
|
}
|
|
@@ -38,6 +38,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
38
38
|
_locationName: String,
|
|
39
39
|
_reusablePalletList: Object,
|
|
40
40
|
_worksheetInfo: Object,
|
|
41
|
+
_locationName: String,
|
|
42
|
+
_scannable: Boolean,
|
|
41
43
|
config: Object,
|
|
42
44
|
data: Object,
|
|
43
45
|
isWholePicking: Boolean,
|
|
@@ -166,12 +168,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
166
168
|
?.shadowRoot?.querySelector('input')
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
get scannable() {
|
|
170
|
-
let result =
|
|
171
|
-
this._selectedOrderInventory && this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
|
|
172
|
-
return result
|
|
173
|
-
}
|
|
174
|
-
|
|
175
171
|
get taskNoInput() {
|
|
176
172
|
return this.shadowRoot.querySelector('barcode-scanable-input[name=taskNo]')?.shadowRoot.querySelector('input')
|
|
177
173
|
}
|
|
@@ -266,6 +262,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
266
262
|
this._hasBinPicking = false
|
|
267
263
|
this._reusablePalletList = { records: [] }
|
|
268
264
|
this._selectedOrderInventory = null
|
|
265
|
+
this.scannable = false
|
|
269
266
|
}
|
|
270
267
|
|
|
271
268
|
render() {
|
|
@@ -298,6 +295,12 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
298
295
|
@keypress="${async e => {
|
|
299
296
|
if (e.keyCode === 13) {
|
|
300
297
|
e.preventDefault()
|
|
298
|
+
if (this.binLocationInput) this.binLocationInput.value = ''
|
|
299
|
+
if (this.productBarcodeInput) this.productBarcodeInput.value = ''
|
|
300
|
+
if (this.cartonInput) this.cartonInput.value = ''
|
|
301
|
+
if (this.palletInput) this.palletInput.value = ''
|
|
302
|
+
if (this.serialInput) this.serialInput.value = ''
|
|
303
|
+
this._selectedOrderInventory = null
|
|
301
304
|
this._currentBinLocation = null
|
|
302
305
|
if (this.refPickingType === PICKING_TYPES.PICKING.value) {
|
|
303
306
|
if (this.releaseGoodNoInput.value) {
|
|
@@ -664,7 +667,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
664
667
|
})
|
|
665
668
|
|
|
666
669
|
if (!response.errors) {
|
|
667
|
-
if (!this._selectedOrderInventory) this.clearView()
|
|
668
670
|
this.releaseGoodNo = response.data.pickingWorksheet.worksheetInfo.releaseGood.name
|
|
669
671
|
this.releaseGoodId = response.data.pickingWorksheet.worksheetInfo.releaseGood.id
|
|
670
672
|
if (!response.data?.pickingWorksheet) return
|
|
@@ -676,10 +678,23 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
676
678
|
this._worksheetInfo = worksheetInfo
|
|
677
679
|
this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
678
680
|
|
|
681
|
+
if (!this._selectedOrderInventory) {
|
|
682
|
+
this._selectedOrderInventory = this.data.records[0]
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
if (
|
|
686
|
+
this._selectedOrderInventory &&
|
|
687
|
+
this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
|
|
688
|
+
) {
|
|
689
|
+
this.scannable = true
|
|
690
|
+
}
|
|
691
|
+
|
|
679
692
|
if (this._selectedOrderInventory) {
|
|
680
693
|
const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
|
|
694
|
+
this._selectedOrderInventory = record
|
|
681
695
|
this.updateSelectedItemProp(record)
|
|
682
696
|
await this.updateComplete
|
|
697
|
+
await this.grist.reset()
|
|
683
698
|
this.fillUpForm(this.inputForm, {
|
|
684
699
|
...record,
|
|
685
700
|
binLocation: record?.binLocation ? record.binLocation : ''
|
|
@@ -768,6 +783,17 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
768
783
|
this._worksheetInfo = worksheetInfo
|
|
769
784
|
this.data = { records: this.formatWorksheetDetailInfos(worksheetDetailInfos) }
|
|
770
785
|
|
|
786
|
+
if (!this._selectedOrderInventory) {
|
|
787
|
+
this._selectedOrderInventory = this.data.records[0]
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
if (
|
|
791
|
+
this._selectedOrderInventory &&
|
|
792
|
+
this._selectedOrderInventory.pickedQty != this._selectedOrderInventory.releaseQty
|
|
793
|
+
) {
|
|
794
|
+
this.scannable = true
|
|
795
|
+
}
|
|
796
|
+
|
|
771
797
|
this._enableProductScanning = await fetchSettingRule('enable-product-scanning', worksheetInfo.partnerDomainId)
|
|
772
798
|
|
|
773
799
|
if (this._selectedOrderInventory) {
|
|
@@ -777,6 +803,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
777
803
|
record.palletId === this._selectedOrderInventory.palletId
|
|
778
804
|
)
|
|
779
805
|
|
|
806
|
+
this._selectedOrderInventory = record
|
|
780
807
|
this.updateSelectedItemProp(record)
|
|
781
808
|
|
|
782
809
|
if (record.pickedQty == record.releaseQty) {
|
|
@@ -933,17 +960,29 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
933
960
|
|
|
934
961
|
if (!this._isCartonLabel && !this._isRequireSerialNumberScanningOutbound) {
|
|
935
962
|
this.palletInput.value = ''
|
|
936
|
-
// this._selectedTaskStatus = null
|
|
937
|
-
this._selectedOrderInventory = null
|
|
938
963
|
}
|
|
939
964
|
|
|
940
965
|
if (!this.isWholePicking && !this._crossDocking && !this._isCartonLabel && this.locationInput)
|
|
941
966
|
this.locationInput.value = ''
|
|
942
967
|
if (this.refPickingType === PICKING_TYPES.PICKING.value) {
|
|
943
|
-
this.fetchInventories(this.releaseGoodNo)
|
|
968
|
+
await this.fetchInventories(this.releaseGoodNo)
|
|
944
969
|
} else {
|
|
945
|
-
this.fetchInventories(this.taskNo)
|
|
970
|
+
await this.fetchInventories(this.taskNo)
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
if (
|
|
974
|
+
this._selectedOrderInventory &&
|
|
975
|
+
this._selectedOrderInventory.pickedQty == this._selectedOrderInventory.releaseQty
|
|
976
|
+
) {
|
|
977
|
+
this._selectedOrderInventory = null
|
|
978
|
+
if (this.refPickingType === PICKING_TYPES.PICKING.value) {
|
|
979
|
+
await this.fetchInventories(this.releaseGoodNo)
|
|
980
|
+
} else {
|
|
981
|
+
await this.fetchInventories(this.taskNo)
|
|
982
|
+
}
|
|
946
983
|
}
|
|
984
|
+
|
|
985
|
+
this.focusOnInput()
|
|
947
986
|
}
|
|
948
987
|
|
|
949
988
|
this.isReplacement = false
|
|
@@ -960,6 +999,8 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
960
999
|
.refPickingType="${this.refPickingType}"
|
|
961
1000
|
.replacePalletId="${this.palletInput.value}"
|
|
962
1001
|
@completed="${() => {
|
|
1002
|
+
this._selectedOrderInventory = null
|
|
1003
|
+
let a = this._selectedOrderInventory
|
|
963
1004
|
if (this.refPickingType === PICKING_TYPES.PICKING.value) {
|
|
964
1005
|
this.fetchInventories(this.releaseGoodNoInput.value)
|
|
965
1006
|
this.fetchPalletsHandler(this.releaseGoodNoInput.value)
|
|
@@ -968,8 +1009,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
968
1009
|
this.fetchPalletsHandler(this.taskNoInput.value)
|
|
969
1010
|
}
|
|
970
1011
|
// this._selectedTaskStatus = null
|
|
971
|
-
this.
|
|
972
|
-
this.isReplacement = false
|
|
1012
|
+
this._isReplacement = false
|
|
973
1013
|
this._isExecuting = false
|
|
974
1014
|
}}"
|
|
975
1015
|
></picking-replacement-popup>
|
|
@@ -1204,8 +1244,6 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1204
1244
|
|
|
1205
1245
|
async validatePicking() {
|
|
1206
1246
|
// validate for order selection
|
|
1207
|
-
if (!this._selectedOrderInventory) throw new Error(i18next.t('text.target_is_not_selected'))
|
|
1208
|
-
|
|
1209
1247
|
// pallet id existing
|
|
1210
1248
|
if (!this._isCartonLabel) {
|
|
1211
1249
|
if (!this.palletInput.value) {
|
|
@@ -1603,7 +1641,7 @@ class PickingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
1603
1641
|
if (this._selectedOrderInventory) {
|
|
1604
1642
|
const record = this.data.records.find(record => record.name === this._selectedOrderInventory.name)
|
|
1605
1643
|
if (record.pickedQty == record.releaseQty) {
|
|
1606
|
-
if (this._isCartonLabel
|
|
1644
|
+
if (this._isCartonLabel) {
|
|
1607
1645
|
this.cartonInput.value = ''
|
|
1608
1646
|
this._focusOnCartonNoInput()
|
|
1609
1647
|
}
|