@things-factory/operato-wms 4.3.450 → 4.3.452

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.
Files changed (27) hide show
  1. package/client/constants/order.js +2 -1
  2. package/client/pages/order/draft-release-good/draft-release-good-card.js +292 -0
  3. package/client/pages/order/draft-release-good/draft-release-good-detail.js +24 -5
  4. package/client/pages/order/draft-release-good/draft-release-good-list.js +79 -27
  5. package/client/pages/order/draft-release-good/draft-release-good-popup.js +366 -0
  6. package/client/pages/order/release-order/b2b/b2b-order-list.js +33 -5
  7. package/client/pages/order/release-order/b2c/b2c-order-requests.js +12 -0
  8. package/client/pages/order/release-order/create-release-order.js +63 -27
  9. package/client/pages/order/release-order/release-order-detail.js +90 -27
  10. package/client/pages/order/vas-order/popup/order-vas-popup.js +236 -0
  11. package/client/pages/report/order-vas-report.js +101 -39
  12. package/client/pages/report/vas-report.js +2 -25
  13. package/client/pages/vas/add-vas-order-level.js +383 -0
  14. package/client/pages/vas/vas-execution-page.js +41 -5
  15. package/client/pages/vas/worksheet-ref-vas.js +20 -18
  16. package/dist-server/graphql/resolvers/reports/shortage-report.js +3 -2
  17. package/dist-server/graphql/resolvers/reports/shortage-report.js.map +1 -1
  18. package/dist-server/graphql/resolvers/reports/vas-report.js +199 -88
  19. package/dist-server/graphql/resolvers/reports/vas-report.js.map +1 -1
  20. package/helps/release-note.md +9 -6
  21. package/package.json +21 -21
  22. package/server/graphql/resolvers/reports/shortage-report.ts +3 -2
  23. package/server/graphql/resolvers/reports/vas-report.ts +203 -95
  24. package/translations/en.json +13 -0
  25. package/translations/ko.json +13 -0
  26. package/translations/ms.json +13 -0
  27. package/translations/zh.json +13 -0
@@ -29,8 +29,11 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
29
29
  _searchFields: Object,
30
30
  _config: Object,
31
31
  _partners: Object,
32
+ _vasList: Object,
32
33
  _partnerId: String,
33
34
  _partnerName: String,
35
+ _vassId: String,
36
+ _vassName: String,
34
37
  data: Object
35
38
  }
36
39
  }
@@ -141,6 +144,23 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
141
144
  name: 'orderNo',
142
145
  type: 'string',
143
146
  props: { searchOper: 'i_like' }
147
+ },
148
+ {
149
+ label: i18next.t('field.vas'),
150
+ name: 'vass',
151
+ type: 'select',
152
+ options: [
153
+ { value: '' },
154
+ ...this._vasList
155
+ .map(vass => {
156
+ return {
157
+ name: `${vass.name} ${vass.description ? `(${vass.description})` : ''}`,
158
+ value: vass.id
159
+ }
160
+ })
161
+ .sort(this._compareValues('name', 'asc'))
162
+ ],
163
+ props: { searchOper: 'eq' }
144
164
  }
145
165
  ]
146
166
  }
@@ -162,6 +182,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
162
182
  { column: 'releaseQty' },
163
183
  { column: 'orderVasName' },
164
184
  { column: 'qty' },
185
+ { column: 'newBatchId' },
165
186
  { column: 'newSku' },
166
187
  { column: 'newPackingType' },
167
188
  { column: 'newUom' },
@@ -233,7 +254,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
233
254
  header: i18next.t('field.unit_uom_value'),
234
255
  sortable: false,
235
256
  imex: { header: i18next.t('field.unit_uom_value'), key: 'uomValue', width: 10, type: 'string' },
236
- width: 80
257
+ width: 100
237
258
  },
238
259
  {
239
260
  type: 'number',
@@ -241,7 +262,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
241
262
  header: i18next.t('field.release_qty'),
242
263
  sortable: false,
243
264
  imex: { header: i18next.t('field.release_qty'), key: 'releaseQty', width: 10, type: 'number' },
244
- width: 80
265
+ width: 90
245
266
  },
246
267
  {
247
268
  type: 'string',
@@ -249,7 +270,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
249
270
  header: i18next.t('field.set'),
250
271
  sortable: false,
251
272
  imex: { header: i18next.t('field.set'), key: 'orderVasName', width: 10, type: 'string' },
252
- width: 80
273
+ width: 150
253
274
  },
254
275
  {
255
276
  type: 'number',
@@ -259,6 +280,19 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
259
280
  imex: { header: i18next.t('field.qty'), key: 'qty', width: 10, type: 'number' },
260
281
  width: 80
261
282
  },
283
+ {
284
+ type: 'string',
285
+ name: 'newBatchId',
286
+ header: i18next.t('field.batch_no_sku', { sku: 'NEW SKU' }),
287
+ sortable: false,
288
+ imex: {
289
+ header: i18next.t('field.batch_no_sku', { sku: 'NEW SKU' }),
290
+ key: 'newBatchId',
291
+ width: 20,
292
+ type: 'string'
293
+ },
294
+ width: 150
295
+ },
262
296
  {
263
297
  type: 'string',
264
298
  name: 'newSku',
@@ -270,26 +304,36 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
270
304
  {
271
305
  type: 'string',
272
306
  name: 'newPackingType',
273
- header: i18next.t('field.packing_type'),
307
+ header: i18next.t('field.packing_type_sku', { sku: 'NEW SKU' }),
274
308
  sortable: false,
275
- imex: { header: i18next.t('field.packing_type'), key: 'newPackingType', width: 10, type: 'string' },
276
- width: 90
309
+ imex: {
310
+ header: i18next.t('field.packing_type_sku', { sku: 'NEW SKU' }),
311
+ key: 'newPackingType',
312
+ width: 10,
313
+ type: 'string'
314
+ },
315
+ width: 130
277
316
  },
278
317
  {
279
318
  type: 'string',
280
319
  name: 'newUom',
281
- header: i18next.t('field.uom'),
320
+ header: i18next.t('field.uom_sku', { sku: 'NEW SKU' }),
282
321
  sortable: false,
283
- imex: { header: i18next.t('field.uom'), key: 'newUom', width: 5, type: 'string' },
284
- width: 70
322
+ imex: { header: i18next.t('field.uom_sku', { sku: 'NEW SKU' }), key: 'newUom', width: 5, type: 'string' },
323
+ width: 130
285
324
  },
286
325
  {
287
326
  type: 'number',
288
327
  name: 'newUomValue',
289
- header: i18next.t('field.uom_value'),
328
+ header: i18next.t('field.uom_value_sku', { sku: 'NEW SKU' }),
290
329
  sortable: false,
291
- imex: { header: i18next.t('field.uom_value'), key: 'newUomValue', width: 10, type: 'string' },
292
- width: 80
330
+ imex: {
331
+ header: i18next.t('field.uom_value_sku', { sku: 'NEW SKU' }),
332
+ key: 'newUomValue',
333
+ width: 10,
334
+ type: 'string'
335
+ },
336
+ width: 130
293
337
  },
294
338
  {
295
339
  type: 'number',
@@ -305,6 +349,14 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
305
349
  header: i18next.t('field.vas'),
306
350
  sortable: false,
307
351
  imex: { header: i18next.t('field.vas'), key: 'vas', width: 15, type: 'string' },
352
+ width: 130
353
+ },
354
+ {
355
+ type: 'string',
356
+ name: 'vasRemark',
357
+ header: i18next.t('field.remark'),
358
+ sortable: false,
359
+ imex: { header: i18next.t('field.remark'), key: 'vasRemark', width: 15, type: 'string' },
308
360
  width: 100
309
361
  },
310
362
  {
@@ -314,14 +366,6 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
314
366
  sortable: false,
315
367
  imex: { header: i18next.t('field.vas_qty'), key: 'vasQty', width: 10, type: 'string' },
316
368
  width: 70
317
- },
318
- {
319
- type: 'datetime',
320
- name: 'executedAt',
321
- header: i18next.t('field.executed_at'),
322
- sortable: false,
323
- imex: { header: i18next.t('field.executed_at'), key: 'executedAt', width: 20, type: 'string' },
324
- width: 160
325
369
  }
326
370
  ]
327
371
  }
@@ -330,6 +374,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
330
374
  async pageInitialized() {
331
375
  this._releaseOrders = []
332
376
  this._partners = [...(await this._fetchPartners())]
377
+ this._vasList = [...(await this._fetchVas())]
333
378
  this._orderVass = []
334
379
 
335
380
  this._searchFields = this.searchFields
@@ -376,6 +421,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
376
421
  newProduct {
377
422
  sku
378
423
  }
424
+ remark
379
425
  }
380
426
  orderVasItem {
381
427
  vas {
@@ -383,7 +429,7 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
383
429
  description
384
430
  }
385
431
  vasQty
386
- executedAt
432
+ vasRemark
387
433
  }
388
434
  orderInventory {
389
435
  releaseQty
@@ -439,13 +485,14 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
439
485
  releaseQty: item.orderInventory.releaseQty,
440
486
  vas: `${item.orderVasItem.vas.name}(${item.orderVasItem.vas.description})`,
441
487
  vasQty: item.orderVasItem.vasQty,
488
+ vasRemark: item.orderVasItem.vasRemark,
442
489
  newSku: item.orderVas.newProduct.sku,
443
490
  newPackingType: item.orderVas.newPackingType,
444
491
  newUom: item.orderVas.newUom,
445
492
  outputQty: item.orderVas.outputQty,
446
493
  newUomValue: item.orderVas.newUomValue,
447
494
  completionDate: item.worksheet.endedAt,
448
- executedAt: item.orderVasItem.executedAt
495
+ remark: item.orderVas.remark
449
496
  }
450
497
  })
451
498
  }
@@ -485,6 +532,37 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
485
532
  }
486
533
  }
487
534
 
535
+ async _fetchVas() {
536
+ const filters = []
537
+ const response = await client.query({
538
+ query: gql`
539
+ query vass($filters: [Filter!]) {
540
+ vass(filters: $filters) {
541
+ items {
542
+ id
543
+ name
544
+ description
545
+ }
546
+ }
547
+ }
548
+ `,
549
+ variables: { filters }
550
+ })
551
+
552
+ if (!response.errors) {
553
+ const vass = response.data.vass.items
554
+ if (vass.length == 1) {
555
+ this._vassId = vass[0].id
556
+ this._vassName = vass[0].name
557
+ } else {
558
+ this._vassId = ''
559
+ this._vassName = ''
560
+ }
561
+
562
+ return vass
563
+ }
564
+ }
565
+
488
566
  _validate() {
489
567
  if (this._fromDateInput.value === '') {
490
568
  throw new Error(i18next.t('text.from_date_is_empty'))
@@ -498,9 +576,6 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
498
576
 
499
577
  if (!this.searchForm.shadowRoot.querySelector('form').checkValidity())
500
578
  throw new Error(i18next.t('text.invalid_form_value'))
501
- if (!this._bizplaceSelector.value) throw new Error(i18next.t('text.no_company_selected'))
502
- // if (!this._fromDateInput.value) throw new Error(i18next.t('text.from_date_is_empty'))
503
- // if (!this._toDateInput.value) throw new Error(i18next.t('text.to_date_is_empty'))
504
579
  }
505
580
 
506
581
  _modifyDateRange(e) {
@@ -549,21 +624,8 @@ class OrderVasReport extends connect(store)(localize(i18next)(PageView)) {
549
624
  return {
550
625
  header: headerSetting,
551
626
  data: this.report.data.records.map(record => {
552
- let date = new Date(parseInt(record.worksheet.endedAt))
553
627
  return flattenObject({
554
- ...record,
555
- executedAt:
556
- record.orderVasItem.executedAt !== null
557
- ? date.getDate().toString() +
558
- '/' +
559
- (date.getMonth() + 1).toString() +
560
- '/' +
561
- date.getFullYear().toString() +
562
- ' ' +
563
- date.getHours().toString() +
564
- ':' +
565
- date.getMinutes().toString()
566
- : ' '
628
+ ...record
567
629
  })
568
630
  }),
569
631
  groups: this.report._config.rows.groups,
@@ -172,7 +172,7 @@ class VasReport extends connect(store)(localize(i18next)(PageView)) {
172
172
  header: i18next.t('field.company'),
173
173
  sortable: false,
174
174
  imex: { header: i18next.t('field.company'), key: 'bizplaceName', width: 30, type: 'string' },
175
- width: 150
175
+ width: 200
176
176
  },
177
177
  {
178
178
  type: 'string',
@@ -197,14 +197,6 @@ class VasReport extends connect(store)(localize(i18next)(PageView)) {
197
197
  sortable: false,
198
198
  imex: { header: i18next.t('field.vas_qty'), key: 'vasQty', width: 10, type: 'string' },
199
199
  width: 70
200
- },
201
- {
202
- type: 'datetime',
203
- name: 'executedAt',
204
- header: i18next.t('field.latest_execution'),
205
- sortable: false,
206
- imex: { header: i18next.t('field.latest_execution'), key: 'executedAt', width: 20, type: 'string' },
207
- width: 160
208
200
  }
209
201
  ]
210
202
  }
@@ -244,7 +236,6 @@ class VasReport extends connect(store)(localize(i18next)(PageView)) {
244
236
  type
245
237
  }
246
238
  vasQty
247
- executedAt
248
239
  }
249
240
  }
250
241
  }
@@ -283,7 +274,6 @@ class VasReport extends connect(store)(localize(i18next)(PageView)) {
283
274
  bizplaceName: item.bizplace.name,
284
275
  vas: `${item.orderVasItem.vas.name}(${item.orderVasItem.vas.description})`,
285
276
  vasQty: item.orderVasItem.vasQty,
286
- executedAt: item.orderVasItem.executedAt,
287
277
  type: item.orderVasItem.vas.type
288
278
  }
289
279
  })
@@ -371,21 +361,8 @@ class VasReport extends connect(store)(localize(i18next)(PageView)) {
371
361
  return {
372
362
  header: headerSetting,
373
363
  data: this.report.data.records.map(record => {
374
- let date = new Date(parseInt(record.orderVasItem.executedAt))
375
364
  return flattenObject({
376
- ...record,
377
- executedAt:
378
- record.orderVasItem.executedAt !== null
379
- ? date.getDate().toString() +
380
- '/' +
381
- (date.getMonth() + 1).toString() +
382
- '/' +
383
- date.getFullYear().toString() +
384
- ' ' +
385
- date.getHours().toString() +
386
- ':' +
387
- date.getMinutes().toString()
388
- : ' '
365
+ ...record
389
366
  })
390
367
  }),
391
368
  groups: this.report._config.rows.groups,