@things-factory/operato-wms 4.3.592 → 4.3.595
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/components/list-view/product-list-view.js +378 -0
- package/client/pages/constants/picking-standard.js +1 -0
- package/client/pages/constants/worksheet.js +12 -0
- package/client/pages/inventory-check/cycle-count-inventory-details-popup.js +12 -12
- package/client/pages/inventory-check/cycle-count-report.js +181 -91
- package/client/pages/inventory-check/inspecting-product.js +56 -12
- package/client/pages/order/release-order/b2b/b2b-order-list.js +91 -39
- package/client/pages/outbound/generate-worksheet-popup.js +188 -25
- package/client/pages/outbound/loading-v2/delivery-order-info.js +205 -0
- package/client/pages/outbound/loading-v2/load-by-qty.js +151 -0
- package/client/pages/outbound/loading-v2/loading-execution-base.js +514 -0
- package/client/pages/outbound/loading-v2/loading-execution.js +392 -0
- package/client/pages/outbound/loading-v2/loading.js +419 -0
- package/client/pages/outbound/loading-v2/release-good-info.js +93 -0
- package/client/pages/outbound/loading-v2/show-my-loading-worksheet-list-popup.js +93 -0
- package/client/pages/outbound/loading-v2/warehouse-return-popup.js +194 -0
- package/client/pages/outbound/picking-v2/issue-details-popup.js +163 -0
- package/client/pages/outbound/picking-v2/picking-execution-base.js +482 -0
- package/client/pages/outbound/picking-v2/picking-execution.js +379 -0
- package/client/pages/outbound/picking-v2/picking.js +387 -0
- package/client/pages/outbound/picking-v2/report-issue-popup.js +139 -0
- package/client/pages/outbound/picking-v2/scan-bin-no-popup.js +126 -0
- package/client/pages/outbound/picking-v2/worksheet-info.js +200 -0
- package/client/pages/outbound/select-operator-popup.js +6 -3
- package/client/pages/outbound/show-my-worksheet-list-popup.js +6 -2
- package/client/pages/outbound/worksheet-zone-picking.js +507 -0
- package/client/pages/outbound/zone-worksheet.js +574 -0
- package/client/route.js +15 -0
- package/dist-server/graphql/resolvers/index.js +11 -2
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/outbound/complete-load.js +96 -0
- package/dist-server/graphql/resolvers/outbound/complete-load.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js +58 -0
- package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js +29 -0
- package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/get-loading-task.js +86 -0
- package/dist-server/graphql/resolvers/outbound/get-loading-task.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/index.js +16 -0
- package/dist-server/graphql/resolvers/outbound/index.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/load-by-qty.js +112 -0
- package/dist-server/graphql/resolvers/outbound/load-by-qty.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js +122 -0
- package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/my-loading-assignment-status.js +32 -0
- package/dist-server/graphql/resolvers/outbound/my-loading-assignment-status.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/sort-item.js +65 -0
- package/dist-server/graphql/resolvers/outbound/sort-item.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/undo-load.js +72 -0
- package/dist-server/graphql/resolvers/outbound/undo-load.js.map +1 -0
- package/dist-server/graphql/resolvers/outbound/warehouse-return.js +101 -0
- package/dist-server/graphql/resolvers/outbound/warehouse-return.js.map +1 -0
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js +119 -86
- package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +53 -25
- package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +1 -1
- package/dist-server/graphql/resolvers/zone-worksheet/activate-zone-worksheet.js +91 -0
- package/dist-server/graphql/resolvers/zone-worksheet/activate-zone-worksheet.js.map +1 -0
- package/dist-server/graphql/resolvers/zone-worksheet/assign-sorter.js +36 -0
- package/dist-server/graphql/resolvers/zone-worksheet/assign-sorter.js.map +1 -0
- package/dist-server/graphql/resolvers/zone-worksheet/generate-zone-worksheet.js +103 -0
- package/dist-server/graphql/resolvers/zone-worksheet/generate-zone-worksheet.js.map +1 -0
- package/dist-server/graphql/resolvers/zone-worksheet/get-zone-picking-task.js +98 -0
- package/dist-server/graphql/resolvers/zone-worksheet/get-zone-picking-task.js.map +1 -0
- package/dist-server/graphql/resolvers/zone-worksheet/index.js +12 -0
- package/dist-server/graphql/resolvers/zone-worksheet/index.js.map +1 -0
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +327 -0
- package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +1 -0
- package/dist-server/graphql/resolvers/zone-worksheet/zone-worksheet.js +146 -0
- package/dist-server/graphql/resolvers/zone-worksheet/zone-worksheet.js.map +1 -0
- package/dist-server/graphql/types/index.js +11 -3
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/outbound/delivery-order-info-list.js +14 -0
- package/dist-server/graphql/types/outbound/delivery-order-info-list.js.map +1 -0
- package/dist-server/graphql/types/outbound/index.js +23 -0
- package/dist-server/graphql/types/outbound/index.js.map +1 -0
- package/dist-server/graphql/types/outbound/loading-assignment.js +15 -0
- package/dist-server/graphql/types/outbound/loading-assignment.js.map +1 -0
- package/dist-server/graphql/types/outbound/loading-worksheet-type.js +25 -0
- package/dist-server/graphql/types/outbound/loading-worksheet-type.js.map +1 -0
- package/dist-server/graphql/types/reports/cycle-count-report.js +2 -0
- package/dist-server/graphql/types/reports/cycle-count-report.js.map +1 -1
- package/dist-server/graphql/types/reports/index.js +1 -1
- package/dist-server/graphql/types/reports/index.js.map +1 -1
- package/dist-server/graphql/types/zone-worksheet/index.js +22 -0
- package/dist-server/graphql/types/zone-worksheet/index.js.map +1 -0
- package/dist-server/graphql/types/zone-worksheet/zone-picking-worksheet.js +18 -0
- package/dist-server/graphql/types/zone-worksheet/zone-picking-worksheet.js.map +1 -0
- package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview-list.js +13 -0
- package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview-list.js.map +1 -0
- package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview.js +16 -0
- package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview.js.map +1 -0
- package/helps/release-note.md +20 -12
- package/package.json +8 -8
- package/server/graphql/resolvers/index.ts +11 -2
- package/server/graphql/resolvers/outbound/complete-load.ts +126 -0
- package/server/graphql/resolvers/outbound/find-loadable-release-good.ts +61 -0
- package/server/graphql/resolvers/outbound/get-delivery-orders.ts +32 -0
- package/server/graphql/resolvers/outbound/get-loading-task.ts +105 -0
- package/server/graphql/resolvers/outbound/index.ts +26 -0
- package/server/graphql/resolvers/outbound/load-by-qty.ts +176 -0
- package/server/graphql/resolvers/outbound/loading-worksheet-v2.ts +131 -0
- package/server/graphql/resolvers/outbound/my-loading-assignment-status.ts +35 -0
- package/server/graphql/resolvers/outbound/sort-item.ts +81 -0
- package/server/graphql/resolvers/outbound/undo-load.ts +83 -0
- package/server/graphql/resolvers/outbound/warehouse-return.ts +129 -0
- package/server/graphql/resolvers/reports/cycle-count-report.ts +125 -87
- package/server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.ts +77 -35
- package/server/graphql/resolvers/zone-worksheet/activate-zone-worksheet.ts +124 -0
- package/server/graphql/resolvers/zone-worksheet/assign-sorter.ts +49 -0
- package/server/graphql/resolvers/zone-worksheet/generate-zone-worksheet.ts +133 -0
- package/server/graphql/resolvers/zone-worksheet/get-zone-picking-task.ts +118 -0
- package/server/graphql/resolvers/zone-worksheet/index.ts +20 -0
- package/server/graphql/resolvers/zone-worksheet/zone-picking.ts +458 -0
- package/server/graphql/resolvers/zone-worksheet/zone-worksheet.ts +183 -0
- package/server/graphql/types/index.ts +11 -3
- package/server/graphql/types/outbound/delivery-order-info-list.ts +8 -0
- package/server/graphql/types/outbound/index.ts +22 -0
- package/server/graphql/types/outbound/loading-assignment.ts +9 -0
- package/server/graphql/types/outbound/loading-worksheet-type.ts +20 -0
- package/server/graphql/types/reports/cycle-count-report.ts +2 -0
- package/server/graphql/types/reports/index.ts +3 -9
- package/server/graphql/types/zone-worksheet/index.ts +21 -0
- package/server/graphql/types/zone-worksheet/zone-picking-worksheet.ts +12 -0
- package/server/graphql/types/zone-worksheet/zone-worksheet-overview-list.ts +7 -0
- package/server/graphql/types/zone-worksheet/zone-worksheet-overview.ts +10 -0
- package/things-factory.config.js +16 -0
- package/translations/en.json +31 -1
- package/translations/ko.json +28 -0
- package/translations/ms.json +30 -2
- package/translations/zh.json +28 -0
|
@@ -21,11 +21,15 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
21
21
|
_worksheetNo: String,
|
|
22
22
|
_reportStatus: String,
|
|
23
23
|
_cycleCountNo: String,
|
|
24
|
+
_orgInventoryAccuracy: Number,
|
|
24
25
|
_enableCartonLabel: Boolean,
|
|
25
26
|
_countData: Array,
|
|
27
|
+
_countUomData: Array,
|
|
28
|
+
_searchFields: Array,
|
|
26
29
|
cycleCountType: String,
|
|
27
30
|
customerId: String,
|
|
28
31
|
inventoryAccuracy: String,
|
|
32
|
+
_firstItem: Object,
|
|
29
33
|
config: Object,
|
|
30
34
|
data: Object
|
|
31
35
|
}
|
|
@@ -137,6 +141,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
137
141
|
</fieldset>
|
|
138
142
|
</form>
|
|
139
143
|
</div>
|
|
144
|
+
<search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.dataGrist.fetch()}></search-form>
|
|
140
145
|
<div class="grist">
|
|
141
146
|
<h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.inventory')}</h2>
|
|
142
147
|
<data-grist
|
|
@@ -152,6 +157,8 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
152
157
|
constructor() {
|
|
153
158
|
super()
|
|
154
159
|
this._enableCartonLabel = false
|
|
160
|
+
this._firstItem = {}
|
|
161
|
+
this._orgInventoryAccuracy = null
|
|
155
162
|
}
|
|
156
163
|
|
|
157
164
|
async pageUpdated(changes) {
|
|
@@ -163,25 +170,64 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
163
170
|
await this.fetchCycleCountReport()
|
|
164
171
|
this.config = { ...this.cycleCountConfig }
|
|
165
172
|
}
|
|
173
|
+
|
|
174
|
+
this.resetSearchForm()
|
|
175
|
+
this._clearView()
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
async pageInitialized() {
|
|
169
179
|
this.isUserBelongsDomain = await this._checkUserBelongsDomain()
|
|
170
180
|
this.config = this.cycleCountConfig
|
|
181
|
+
|
|
182
|
+
this._searchFields = [
|
|
183
|
+
{
|
|
184
|
+
name: 'batchNoVariance',
|
|
185
|
+
label: i18next.t('field.batch_no_variance'),
|
|
186
|
+
type: 'checkbox',
|
|
187
|
+
value: false,
|
|
188
|
+
props: { searchOper: 'eq' }
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'expirationDateVariance',
|
|
192
|
+
label: i18next.t('field.expiration_date_variance'),
|
|
193
|
+
type: 'checkbox',
|
|
194
|
+
value: false,
|
|
195
|
+
props: { searchOper: 'eq' }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'locationVariance',
|
|
199
|
+
label: i18next.t('field.location_variance'),
|
|
200
|
+
type: 'checkbox',
|
|
201
|
+
value: false,
|
|
202
|
+
props: { searchOper: 'eq' }
|
|
203
|
+
}
|
|
204
|
+
]
|
|
171
205
|
}
|
|
172
206
|
|
|
173
207
|
get cycleCountConfig() {
|
|
174
|
-
let data = this._countData
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
208
|
+
let data = this._countData || {}
|
|
209
|
+
// Generate UOM Count Columns
|
|
210
|
+
const countColumns = Object.keys(data)
|
|
211
|
+
.filter(key => key.startsWith('count ') && data[key] !== null && data[key] !== undefined)
|
|
212
|
+
.map(key => ({
|
|
213
|
+
type: 'integer',
|
|
214
|
+
name: key,
|
|
215
|
+
header: key,
|
|
216
|
+
width: 120
|
|
217
|
+
}))
|
|
218
|
+
|
|
219
|
+
// Generate UOM Value Columns
|
|
220
|
+
const uomValueColumns = Object.keys(data)
|
|
221
|
+
.filter(key => key.startsWith('count ') && data[key] !== null && data[key] !== undefined)
|
|
222
|
+
.map((key, index) => {
|
|
223
|
+
const inspectedValueKey = `uom count ${index + 1}`
|
|
224
|
+
return {
|
|
225
|
+
type: 'integer',
|
|
226
|
+
name: inspectedValueKey,
|
|
227
|
+
header: `UOM Value ${key}`,
|
|
228
|
+
width: 150
|
|
229
|
+
}
|
|
230
|
+
})
|
|
185
231
|
|
|
186
232
|
let columns = [
|
|
187
233
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -226,58 +272,35 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
226
272
|
},
|
|
227
273
|
{
|
|
228
274
|
type: 'string',
|
|
229
|
-
name: '
|
|
230
|
-
header: i18next.t('field.
|
|
275
|
+
name: 'packingType',
|
|
276
|
+
header: i18next.t('field.packing_type'),
|
|
231
277
|
width: 100
|
|
232
278
|
},
|
|
233
279
|
{
|
|
234
|
-
type: '
|
|
235
|
-
name: '
|
|
236
|
-
header: i18next.t('field.
|
|
280
|
+
type: 'integer',
|
|
281
|
+
name: 'systemQty',
|
|
282
|
+
header: i18next.t('field.system_qty'),
|
|
237
283
|
width: 100
|
|
238
284
|
},
|
|
285
|
+
...countColumns,
|
|
239
286
|
{
|
|
240
287
|
type: 'string',
|
|
241
|
-
name: '
|
|
242
|
-
header: i18next.t('field.
|
|
288
|
+
name: 'finalCount',
|
|
289
|
+
header: i18next.t('field.final_count'),
|
|
243
290
|
width: 100
|
|
244
291
|
},
|
|
245
292
|
{
|
|
246
|
-
type: '
|
|
247
|
-
name: '
|
|
248
|
-
header: i18next.t('field.
|
|
249
|
-
width: 150
|
|
250
|
-
renderer: value => {
|
|
251
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
type: 'boolean',
|
|
256
|
-
name: 'expirationDateVariance',
|
|
257
|
-
header: i18next.t('field.expiration_date_variance'),
|
|
258
|
-
width: 150,
|
|
259
|
-
renderer: value => {
|
|
260
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
type: 'boolean',
|
|
265
|
-
name: 'locationVariance',
|
|
266
|
-
header: i18next.t('field.location_variance'),
|
|
267
|
-
width: 150,
|
|
268
|
-
renderer: value => {
|
|
269
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
270
|
-
}
|
|
293
|
+
type: 'string',
|
|
294
|
+
name: 'systemUomValue',
|
|
295
|
+
header: i18next.t('field.system_uom_value'),
|
|
296
|
+
width: 150
|
|
271
297
|
},
|
|
298
|
+
...uomValueColumns,
|
|
272
299
|
{
|
|
273
|
-
type: '
|
|
274
|
-
name: '
|
|
275
|
-
header: i18next.t('field.
|
|
276
|
-
width: 150
|
|
277
|
-
renderer: value => {
|
|
278
|
-
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
279
|
-
},
|
|
280
|
-
hidden: this._enableCartonLabel
|
|
300
|
+
type: 'string',
|
|
301
|
+
name: 'finalUom',
|
|
302
|
+
header: i18next.t('field.final_uom_value'),
|
|
303
|
+
width: 150
|
|
281
304
|
},
|
|
282
305
|
{
|
|
283
306
|
type: 'string',
|
|
@@ -285,25 +308,22 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
285
308
|
header: i18next.t('field.uom'),
|
|
286
309
|
width: 80
|
|
287
310
|
},
|
|
288
|
-
{
|
|
289
|
-
type: 'integer',
|
|
290
|
-
name: 'systemQty',
|
|
291
|
-
header: i18next.t('field.system_qty'),
|
|
292
|
-
width: 100
|
|
293
|
-
},
|
|
294
|
-
...countColumns,
|
|
295
|
-
{
|
|
296
|
-
type: 'string',
|
|
297
|
-
name: 'finalCount',
|
|
298
|
-
header: i18next.t('field.final_count'),
|
|
299
|
-
width: 100
|
|
300
|
-
},
|
|
301
311
|
{
|
|
302
312
|
type: 'string',
|
|
303
313
|
name: 'countVariance',
|
|
304
314
|
header: i18next.t('field.count_variance'),
|
|
305
315
|
width: 120
|
|
306
316
|
},
|
|
317
|
+
{
|
|
318
|
+
type: 'boolean',
|
|
319
|
+
name: 'uomValueVariance',
|
|
320
|
+
header: i18next.t('field.uom_value_variance'),
|
|
321
|
+
width: 150,
|
|
322
|
+
renderer: value => {
|
|
323
|
+
return `<input type="checkbox" ${value ? 'checked' : ''} disabled/>`
|
|
324
|
+
},
|
|
325
|
+
hidden: this._enableCartonLabel
|
|
326
|
+
},
|
|
307
327
|
{
|
|
308
328
|
type: 'string',
|
|
309
329
|
name: 'countStatus',
|
|
@@ -336,18 +356,27 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
336
356
|
return this.shadowRoot.querySelector('form')
|
|
337
357
|
}
|
|
338
358
|
|
|
339
|
-
get
|
|
359
|
+
get dataGrist() {
|
|
340
360
|
return this.shadowRoot.querySelector('data-grist')
|
|
341
361
|
}
|
|
342
362
|
|
|
363
|
+
get searchForm() {
|
|
364
|
+
return this.shadowRoot.querySelector('search-form')
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
_clearView() {
|
|
368
|
+
this._orgInventoryAccuracy = null
|
|
369
|
+
}
|
|
370
|
+
|
|
343
371
|
async fetchCycleCountReport() {
|
|
344
372
|
if (!this._cycleCountNo) return
|
|
345
373
|
let total
|
|
374
|
+
let filters = await this.searchForm.getQueryFilters()
|
|
346
375
|
try {
|
|
347
376
|
const response = await client.query({
|
|
348
377
|
query: gql`
|
|
349
|
-
query cycleCountReport($name: String!) {
|
|
350
|
-
cycleCountReport(name: $name) {
|
|
378
|
+
query cycleCountReport($filters: [Filter], $pagination: Pagination, $sortings: [Sorting], $name: String!) {
|
|
379
|
+
cycleCountReport(filters: $filters, pagination: $pagination, sortings: $sortings, name: $name) {
|
|
351
380
|
items {
|
|
352
381
|
inventoryCheck {
|
|
353
382
|
name
|
|
@@ -393,6 +422,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
393
422
|
originLocationId
|
|
394
423
|
inspectedLocationId
|
|
395
424
|
countData
|
|
425
|
+
countUomData
|
|
396
426
|
batchNoVariance
|
|
397
427
|
locationVariance
|
|
398
428
|
uomValueVariance
|
|
@@ -401,6 +431,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
401
431
|
countStatus
|
|
402
432
|
company
|
|
403
433
|
finalCount
|
|
434
|
+
finalUom
|
|
404
435
|
partnerDomainId
|
|
405
436
|
}
|
|
406
437
|
total
|
|
@@ -408,12 +439,15 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
408
439
|
}
|
|
409
440
|
`,
|
|
410
441
|
variables: {
|
|
442
|
+
filters: filters,
|
|
443
|
+
pagination: null,
|
|
444
|
+
sortings: [],
|
|
411
445
|
name: this._cycleCountNo
|
|
412
446
|
}
|
|
413
447
|
})
|
|
414
448
|
|
|
415
449
|
if (!response.errors) {
|
|
416
|
-
const firstItem = response.data.cycleCountReport
|
|
450
|
+
const firstItem = response.data.cycleCountReport?.items[0] || this._firstItem
|
|
417
451
|
if (!firstItem) return
|
|
418
452
|
|
|
419
453
|
const {
|
|
@@ -422,6 +456,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
422
456
|
partnerDomainId
|
|
423
457
|
} = firstItem
|
|
424
458
|
|
|
459
|
+
this._firstItem = firstItem
|
|
425
460
|
this._enableCartonLabel = await fetchSettingRule('enable-carton-label', partnerDomainId)
|
|
426
461
|
await this.updateComplete
|
|
427
462
|
|
|
@@ -437,21 +472,35 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
437
472
|
|
|
438
473
|
// Parsing countData from string to object & convert to int or replace with "-"
|
|
439
474
|
let countData = JSON.parse(item.countData)
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
475
|
+
let countUomData = JSON.parse(item.countUomData)
|
|
476
|
+
|
|
477
|
+
const mapCountData = (data, prefix) => {
|
|
478
|
+
return Object.keys(data).reduce((acc, key) => {
|
|
479
|
+
if (key.startsWith(prefix)) {
|
|
480
|
+
acc[key] = !isNaN(parseFloat(data[key])) && isFinite(data[key]) ? parseFloat(data[key], 10) : '-'
|
|
481
|
+
}
|
|
482
|
+
return acc
|
|
483
|
+
}, {})
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
const findLatestCount = (data, prefix) => {
|
|
487
|
+
return [...Object.keys(data)]
|
|
488
|
+
.filter(key => key.startsWith(prefix) && data[key] !== '-')
|
|
489
|
+
.pop()
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
this._countData = mapCountData(countData, 'count')
|
|
493
|
+
this._countUomData = mapCountData(countUomData, 'uom count')
|
|
494
|
+
|
|
495
|
+
// Calculate the latest count key and finalCount
|
|
496
|
+
const latestCountKey = findLatestCount(this._countData, 'count ')
|
|
497
|
+
const latestUomCountKey = findLatestCount(this._countUomData, 'uom count ')
|
|
498
|
+
|
|
447
499
|
|
|
448
|
-
// Calculate the latest count key and finalCount
|
|
449
|
-
const latestCountKey = [...Object.keys(countData)]
|
|
450
|
-
.filter(key => key.startsWith('count ') && countData[key] !== '-')
|
|
451
|
-
.pop()
|
|
452
500
|
|
|
453
501
|
// Calculate finalCount based on the latest count
|
|
454
|
-
const finalCount = latestCountKey ?
|
|
502
|
+
const finalCount = latestCountKey ? this._countData[latestCountKey] : item.systemQty
|
|
503
|
+
const finalUom = latestUomCountKey ? this._countUomData[latestUomCountKey] : item.systemUomValue
|
|
455
504
|
|
|
456
505
|
// Calculate countVariance
|
|
457
506
|
let countVariance = finalCount - item.systemQty
|
|
@@ -498,7 +547,8 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
498
547
|
}
|
|
499
548
|
|
|
500
549
|
return {
|
|
501
|
-
...
|
|
550
|
+
...this._countData,
|
|
551
|
+
...this._countUomData,
|
|
502
552
|
inventoryId,
|
|
503
553
|
cartonId,
|
|
504
554
|
palletId,
|
|
@@ -514,6 +564,7 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
514
564
|
systemBatchNo: item.systemBatchNo,
|
|
515
565
|
systemLocationName: item.systemLocationName,
|
|
516
566
|
systemUomValue: item.systemUomValue,
|
|
567
|
+
finalUom: item.finalUom,
|
|
517
568
|
originLocationId: item.originLocationId,
|
|
518
569
|
originLocationName,
|
|
519
570
|
inspectedLocationId: item.inspectedLocationId,
|
|
@@ -532,7 +583,8 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
532
583
|
countVariance,
|
|
533
584
|
countStatus,
|
|
534
585
|
company: item.company,
|
|
535
|
-
finalCount
|
|
586
|
+
finalCount,
|
|
587
|
+
finalUom
|
|
536
588
|
}
|
|
537
589
|
}) || []
|
|
538
590
|
|
|
@@ -540,12 +592,16 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
540
592
|
const totalSKUInCycleCount = records.length
|
|
541
593
|
const inventoryAccuracy = (totalSKUWithHIT / totalSKUInCycleCount) * 100
|
|
542
594
|
|
|
595
|
+
if (!this._orgInventoryAccuracy) {
|
|
596
|
+
this._orgInventoryAccuracy = inventoryAccuracy
|
|
597
|
+
}
|
|
598
|
+
|
|
543
599
|
this._fillupForm({
|
|
544
600
|
company,
|
|
545
601
|
cycleCountNo: inventoryCheckName,
|
|
546
602
|
executionDate,
|
|
547
603
|
status,
|
|
548
|
-
inventoryAccuracy:
|
|
604
|
+
inventoryAccuracy: this._orgInventoryAccuracy.toFixed(2) + '%'
|
|
549
605
|
})
|
|
550
606
|
|
|
551
607
|
total = records.length
|
|
@@ -674,9 +730,6 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
674
730
|
.pallet="${record.palletId}"
|
|
675
731
|
.cycleCountNo="${this._cycleCountNo}"
|
|
676
732
|
.enableCartonLabel="${this._enableCartonLabel}"
|
|
677
|
-
@saved="${e => {
|
|
678
|
-
this.dataGrist.fetch()
|
|
679
|
-
}}"
|
|
680
733
|
></cycle-count-inventory-details-popup>
|
|
681
734
|
`,
|
|
682
735
|
{
|
|
@@ -716,18 +769,18 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
716
769
|
{ header: i18next.t('field.sku'), key: 'sku', width: 25, type: 'string' },
|
|
717
770
|
{ header: i18next.t('field.product'), key: 'productName', width: 60, type: 'string' },
|
|
718
771
|
{ header: i18next.t('field.product_description'), key: 'description', width: 60, type: 'string' },
|
|
719
|
-
{ header: i18next.t('field.brand'), key: 'brand', width: 20, type: 'string' },
|
|
720
772
|
{ header: i18next.t('field.packing_type'), key: 'packingType', width: 20, type: 'string' },
|
|
721
773
|
{ header: i18next.t('field.system_batch_no'), key: 'systemBatchNo', width: 25, type: 'string' },
|
|
722
774
|
{ header: i18next.t('field.inspected_batch_no'), key: 'inspectedBatchNo', width: 25, type: 'string' },
|
|
723
775
|
{ header: i18next.t('field.system_location'), key: 'systemLocationName', width: 25, type: 'string' },
|
|
724
776
|
{ header: i18next.t('field.inspected_location'), key: 'inspectedLocationName', width: 25, type: 'string' },
|
|
725
|
-
{ header: i18next.t('field.system_uom_value'), key: 'systemUomValue', width: 25, type: 'string' },
|
|
726
|
-
{ header: i18next.t('field.inspected_uom_value'), key: 'inspectedUomValue', width: 25, type: 'string' },
|
|
727
|
-
{ header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'string' },
|
|
728
777
|
{ header: i18next.t('field.system_qty'), key: 'systemQty', width: 20, type: 'string' },
|
|
729
778
|
{ header: i18next.t('field.final_count'), key: 'finalCount', width: 20, type: 'string' },
|
|
779
|
+
{ header: i18next.t('field.system_uom_value'), key: 'systemUomValue', width: 25, type: 'string' },
|
|
780
|
+
{ header: i18next.t('field.final_uom_value'), key: 'finalUom', width: 25, type: 'string' },
|
|
781
|
+
{ header: i18next.t('field.uom'), key: 'uom', width: 25, type: 'string' },
|
|
730
782
|
{ header: i18next.t('field.count_variance'), key: 'countVariance', width: 20, type: 'string' },
|
|
783
|
+
{ header: i18next.t('field.uom_value_variance'), key: 'uomValueVariance', width: 20, type: 'string' },
|
|
731
784
|
{ header: i18next.t('field.count_status'), key: 'countStatus', width: 20, type: 'string' }
|
|
732
785
|
]
|
|
733
786
|
|
|
@@ -753,12 +806,33 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
753
806
|
headerSetting.splice(indexToInsert + 1, 0, ...dynamicHeaders)
|
|
754
807
|
}
|
|
755
808
|
|
|
809
|
+
const indexToInsertUOM = headerSetting.findIndex(header => header.key === 'finalUom')
|
|
810
|
+
if (indexToInsertUOM === -1) {
|
|
811
|
+
console.error('finalUom header not found in headerSetting')
|
|
812
|
+
return
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
const uomValueColumns = Object.keys(data[0] || {}).filter(
|
|
816
|
+
key => key.startsWith('count ') && data[0][key] !== null && data[0][key] !== undefined
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
const uomHeaders = uomValueColumns.map((column, index) => {
|
|
820
|
+
const inspectedValueKey = `uom count ${index + 1}`
|
|
821
|
+
return {
|
|
822
|
+
header: `UOM Value Count ${index + 1}`,
|
|
823
|
+
key: inspectedValueKey,
|
|
824
|
+
width: 25,
|
|
825
|
+
type: 'string'
|
|
826
|
+
}
|
|
827
|
+
})
|
|
828
|
+
|
|
829
|
+
headerSetting.splice(indexToInsertUOM, 0, ...uomHeaders)
|
|
830
|
+
|
|
756
831
|
return { header: headerSetting, data }
|
|
757
832
|
} catch (e) {
|
|
758
833
|
this._showToast(e)
|
|
759
834
|
}
|
|
760
835
|
}
|
|
761
|
-
|
|
762
836
|
async _exportInventoryAuditOverview() {
|
|
763
837
|
try {
|
|
764
838
|
let data = []
|
|
@@ -796,6 +870,22 @@ class CycleCountReport extends connect(store)(localize(i18next)(PageView)) {
|
|
|
796
870
|
})
|
|
797
871
|
)
|
|
798
872
|
}
|
|
873
|
+
|
|
874
|
+
//to reset search-form values when exit page
|
|
875
|
+
resetSearchForm() {
|
|
876
|
+
const searchForm = this.shadowRoot.querySelector('#search-form')
|
|
877
|
+
if (searchForm) {
|
|
878
|
+
searchForm.formFields.forEach(field => {
|
|
879
|
+
if (field.type === 'checkbox') {
|
|
880
|
+
field.checked = false
|
|
881
|
+
field.removeAttribute('indeterminate')
|
|
882
|
+
field._value = undefined
|
|
883
|
+
} else {
|
|
884
|
+
field.value = ''
|
|
885
|
+
}
|
|
886
|
+
})
|
|
887
|
+
}
|
|
888
|
+
}
|
|
799
889
|
}
|
|
800
890
|
|
|
801
891
|
window.customElements.define('cycle-count-report', CycleCountReport)
|
|
@@ -360,7 +360,9 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
360
360
|
<form id="input-form" class="single-column-form">
|
|
361
361
|
<label>${i18next.t('label.location')}</label><br />
|
|
362
362
|
<!-- fetch inspected location first. If an invetories location is changed, it will fetch the new location. -->
|
|
363
|
-
<label class="input-font">${
|
|
363
|
+
<label class="input-font">${
|
|
364
|
+
this._currentCard.inspectedLocation || this._currentCard.originLocation
|
|
365
|
+
}</label><br />
|
|
364
366
|
<!-- validation lot id, carton id -->
|
|
365
367
|
${
|
|
366
368
|
this._enableCartonLabel
|
|
@@ -409,7 +411,11 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
409
411
|
</label>
|
|
410
412
|
<br />
|
|
411
413
|
<span class="input-font" ?hidden=${this._editMode.inspectedBatchNo}>${
|
|
412
|
-
this._currentCard.inspectedBatchNo
|
|
414
|
+
this._currentCard.inspectedBatchNo
|
|
415
|
+
? this._currentCard.inspectedBatchNo
|
|
416
|
+
: this._hideCCColumnSetting && !this._enableCartonLabel
|
|
417
|
+
? ''
|
|
418
|
+
: this._currentCard.originBatchNo
|
|
413
419
|
}
|
|
414
420
|
<mwc-icon-button
|
|
415
421
|
icon="edit"
|
|
@@ -446,7 +452,13 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
446
452
|
</span>
|
|
447
453
|
<span ?hidden=${!this._editMode.inspectedExpirationDate}>
|
|
448
454
|
<input type="date"
|
|
449
|
-
.value=${
|
|
455
|
+
.value=${
|
|
456
|
+
this._editedCard?.inspectedExpirationDate
|
|
457
|
+
? this._editedCard?.inspectedExpirationDate
|
|
458
|
+
: this._hideCCColumnSetting
|
|
459
|
+
? ''
|
|
460
|
+
: this._currentCard.originExpirationDate
|
|
461
|
+
}
|
|
450
462
|
@input=${e => this._handleEditInput('inspectedExpirationDate', e.target.value)}
|
|
451
463
|
/>
|
|
452
464
|
<mwc-icon-button icon="save" @click=${() =>
|
|
@@ -470,7 +482,13 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
470
482
|
</span>
|
|
471
483
|
<span ?hidden=${!this._editMode.inspectedQty}>
|
|
472
484
|
<input type="text"
|
|
473
|
-
.value=${
|
|
485
|
+
.value=${
|
|
486
|
+
this._editedCard?.inspectedQty
|
|
487
|
+
? this._editedCard?.inspectedQty
|
|
488
|
+
: this._hideCCColumnSetting
|
|
489
|
+
? ''
|
|
490
|
+
: this._currentCard.originQty
|
|
491
|
+
}
|
|
474
492
|
@input=${e => this._handleEditInput('inspectedQty', e.target.value)}
|
|
475
493
|
/>
|
|
476
494
|
<mwc-icon-button icon="save" @click=${() => this._saveEdit('inspectedQty')}></mwc-icon-button>
|
|
@@ -497,7 +515,11 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
497
515
|
<input
|
|
498
516
|
class="input-font"
|
|
499
517
|
type="text"
|
|
500
|
-
.value=${this._editedCard
|
|
518
|
+
.value=${this._editedCard?.inspectedUomValue
|
|
519
|
+
? this._editedCard?.inspectedUomValue
|
|
520
|
+
: this._hideCCColumnSetting
|
|
521
|
+
? ''
|
|
522
|
+
: this._currentCard.originUomValue}
|
|
501
523
|
@input=${e => this._handleEditInput('inspectedUomValue', e.target.value)}
|
|
502
524
|
/>
|
|
503
525
|
<mwc-icon-button
|
|
@@ -706,6 +728,9 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
706
728
|
id
|
|
707
729
|
name
|
|
708
730
|
}
|
|
731
|
+
originQty
|
|
732
|
+
originUomValue
|
|
733
|
+
originExpirationDate
|
|
709
734
|
inspectedBatchNo
|
|
710
735
|
inspectedQty
|
|
711
736
|
inspectedUomValue
|
|
@@ -767,7 +792,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
767
792
|
|
|
768
793
|
if (!response.errors) {
|
|
769
794
|
const worksheetData = response.data[worksheetQuery]
|
|
770
|
-
const { worksheetInfo, worksheetDetailInfos
|
|
795
|
+
const { worksheetInfo, worksheetDetailInfos } = worksheetData
|
|
771
796
|
const partnerDomainId = worksheetInfo.partnerDomainId
|
|
772
797
|
this.worksheetName = worksheetInfo.name
|
|
773
798
|
this.bizplaceName = worksheetInfo.bizplace.name
|
|
@@ -812,11 +837,13 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
812
837
|
if (!acc[key])
|
|
813
838
|
acc[key] = {
|
|
814
839
|
items: [],
|
|
840
|
+
totalOriginQty: 0,
|
|
815
841
|
totalInspectedQty: 0,
|
|
816
842
|
totalLockedQty: 0
|
|
817
843
|
}
|
|
818
844
|
acc[key].items.push(item)
|
|
819
845
|
acc[key].totalInspectedQty += item.inspectedQty
|
|
846
|
+
acc[key].totalOriginQty += item.qty
|
|
820
847
|
acc[key].totalLockedQty += item.relatedInvCheckItem?.inventory?.lockedQty || 0
|
|
821
848
|
return acc
|
|
822
849
|
}, {})
|
|
@@ -831,7 +858,11 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
831
858
|
|
|
832
859
|
return {
|
|
833
860
|
qty: group.reduce((sum, item) => sum + item.qty, 0),
|
|
834
|
-
inspectedQty: groupObj.totalInspectedQty
|
|
861
|
+
inspectedQty: groupObj.totalInspectedQty
|
|
862
|
+
? groupObj.totalInspectedQty
|
|
863
|
+
: this._hideCCColumnSetting
|
|
864
|
+
? null
|
|
865
|
+
: groupObj.totalOriginQty,
|
|
835
866
|
lockedQty: groupObj.totalLockedQty,
|
|
836
867
|
...worksheetDetails,
|
|
837
868
|
totalItems: totalItems,
|
|
@@ -845,7 +876,8 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
845
876
|
}
|
|
846
877
|
|
|
847
878
|
this.fillUpForm(this.infoForm, worksheetInfo)
|
|
848
|
-
this._arrayIndex =
|
|
879
|
+
this._arrayIndex =
|
|
880
|
+
this._arrayIndex < this.formatWorksheetDetailInfos(worksheetDetailInfos).length ? this._arrayIndex : 0
|
|
849
881
|
this._currentCard = this.data.records[this._arrayIndex]
|
|
850
882
|
this.updateCurrentCard()
|
|
851
883
|
this.missingInventoryData = { records: this.formatMissingInventories(worksheetDetailInfos) }
|
|
@@ -870,6 +902,10 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
870
902
|
product,
|
|
871
903
|
productDetail,
|
|
872
904
|
originLocation,
|
|
905
|
+
originQty,
|
|
906
|
+
originUomValue,
|
|
907
|
+
originExpirationDate,
|
|
908
|
+
inspectedQty,
|
|
873
909
|
inspectedBatchNo,
|
|
874
910
|
inspectedUomValue,
|
|
875
911
|
inspectedExpirationDate,
|
|
@@ -887,8 +923,15 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
887
923
|
productDetailId: productDetail?.id || '',
|
|
888
924
|
originLocation: originLocation?.name || null,
|
|
889
925
|
inspectedBatchNo: inspectedBatchNo || '',
|
|
890
|
-
inspectedUomValue: inspectedUomValue,
|
|
891
|
-
|
|
926
|
+
inspectedUomValue: inspectedUomValue ? inspectedUomValue : this._hideCCColumnSetting ? null : originUomValue,
|
|
927
|
+
inspectedQty: inspectedQty ? inspectedQty : this._hideCCColumnSetting ? null : originQty,
|
|
928
|
+
inspectedExpirationDate: inspectedExpirationDate
|
|
929
|
+
? inspectedExpirationDate
|
|
930
|
+
: this._hideCCColumnSetting
|
|
931
|
+
? null
|
|
932
|
+
: !inspectedUomValue && !inspectedQty //to handle if inspectedExpirationDate is null
|
|
933
|
+
? originExpirationDate
|
|
934
|
+
: inspectedExpirationDate,
|
|
892
935
|
inspectedLocation: inspectedLocation?.name || null,
|
|
893
936
|
inventoryCheckItemStatus: relatedInvCheckItem?.status,
|
|
894
937
|
countNo: relatedInvCheckItem?.countNo,
|
|
@@ -896,7 +939,8 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
896
939
|
locationName: location?.name || '',
|
|
897
940
|
wsdStatus: status,
|
|
898
941
|
lockedQty: relatedInvCheckItem?.inventory?.lockedQty || 0,
|
|
899
|
-
originBatchNo:
|
|
942
|
+
originBatchNo:
|
|
943
|
+
this._hideCCColumnSetting && !this._enableCartonLabel ? null : relatedInvCheckItem?.originBatchNo || null
|
|
900
944
|
}
|
|
901
945
|
}
|
|
902
946
|
|
|
@@ -954,7 +998,7 @@ class InspectingProduct extends connect(store)(localize(i18next)(PageView)) {
|
|
|
954
998
|
const variables = {
|
|
955
999
|
inspectedBatchNo: currentCard.inspectedBatchNo,
|
|
956
1000
|
inspectedQty,
|
|
957
|
-
inspectedExpirationDate,
|
|
1001
|
+
inspectedExpirationDate: inspectedExpirationDate == '' ? null : inspectedExpirationDate,
|
|
958
1002
|
inspectedUomValue
|
|
959
1003
|
}
|
|
960
1004
|
|