@things-factory/operato-wms 4.3.105-alpha.0 → 4.3.105

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 (53) hide show
  1. package/client/pages/bulk-operation/bulk-operation.js +10 -8
  2. package/client/pages/components/select-inventory-popup.js +1 -7
  3. package/client/pages/components/select-product-popup.js +2 -31
  4. package/client/pages/inbound/undo-putaway-popup.js +9 -5
  5. package/client/pages/inbound/undo-unload-popup.js +2 -15
  6. package/client/pages/inbound/unload-product.js +67 -71
  7. package/client/pages/inventory/inventory-adjustment-approval.js +5 -4
  8. package/client/pages/inventory/inventory-adjustment.js +0 -7
  9. package/client/pages/inventory-check/create-cycle-count.js +3 -2
  10. package/client/pages/inventory-check/inventory-check-list.js +10 -94
  11. package/client/pages/manifest/loading-manifest-detail.js +4 -7
  12. package/client/pages/master/generate-location-list.js +22 -30
  13. package/client/pages/master/location-list.js +73 -114
  14. package/client/pages/master/pallet-list.js +58 -88
  15. package/client/pages/master/product/product-details-popup.js +3 -3
  16. package/client/pages/master/tote-list.js +27 -35
  17. package/client/pages/master/transport-driver.js +41 -50
  18. package/client/pages/master/transport-vehicle.js +41 -45
  19. package/client/pages/master/warehouse-list.js +34 -56
  20. package/client/pages/order/arrival-notice/arrival-notice-detail.js +25 -36
  21. package/client/pages/order/arrival-notice/create-arrival-notice.js +32 -53
  22. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +0 -2
  23. package/client/pages/order/arrival-notice/edit-product-popup.js +7 -9
  24. package/client/pages/order/draft-release-good/draft-release-good-detail.js +1 -7
  25. package/client/pages/order/goods-received-note/received-note-detail.js +1 -1
  26. package/client/pages/order/release-order/create-release-order.js +5 -24
  27. package/client/pages/order/release-order/release-extra-product-popup.js +1 -4
  28. package/client/pages/order/release-order/release-order-detail.js +0 -4
  29. package/client/pages/order/return-order/create-return-order.js +0 -1
  30. package/client/pages/order/return-order/return-order-inventory-popup.js +0 -1
  31. package/client/pages/outbound/inventory-reassign-popup.js +0 -6
  32. package/client/pages/outbound/packing-product.js +5 -5
  33. package/client/pages/outbound/picking-product.js +1 -11
  34. package/config.development.js +33 -27
  35. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +5 -4
  36. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
  37. package/dist-server/graphql/resolvers/other/add-release-good-products.js +11 -7
  38. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
  39. package/dist-server/graphql/resolvers/reports/costing-report.js +24 -18
  40. package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
  41. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
  42. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +6 -5
  43. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  44. package/package.json +50 -50
  45. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +5 -4
  46. package/server/graphql/resolvers/other/add-release-good-products.ts +12 -8
  47. package/server/graphql/resolvers/reports/costing-report.ts +24 -18
  48. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
  49. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -5
  50. package/translations/en.json +10 -11
  51. package/translations/ko.json +10 -11
  52. package/translations/ms.json +10 -11
  53. package/translations/zh.json +3 -4
@@ -404,11 +404,8 @@ class BulkOperation extends localize(i18next)(PageView) {
404
404
  html`
405
405
  <validate-gan-popup
406
406
  .records=${records.map(raw => {
407
- // let etaDate = new Date((raw.etaDate - (25567 + 1)) * 86400 * 1000 || null)
408
- // let mfgDate = new Date((raw.manufactureDate - (25567 + 1)) * 86400 * 1000 || null)
409
-
410
- let etaDate = new Date(String(raw.etaDate || ''))
411
- let mfgDate = new Date(String(raw.manufactureDate || ''))
407
+ let etaDate = new Date((raw.etaDate - (25567 + 1)) * 86400 * 1000 || null)
408
+ let mfgDate = new Date((raw.manufactureDate - (25567 + 1)) * 86400 * 1000 || null)
412
409
 
413
410
  return {
414
411
  refNo: String(raw.refNo || ''),
@@ -429,8 +426,14 @@ class BulkOperation extends localize(i18next)(PageView) {
429
426
  packQty: parseInt(raw.packQty || 0),
430
427
  palletQty: parseInt(raw.palletQty || 0),
431
428
  unitPrice: Number(raw.unitPrice || 0),
432
- manufactureDate: this._getStdDateStr(mfgDate),
433
- etaDate: this._getStdDateStr(etaDate)
429
+ manufactureDate: `${mfgDate.getFullYear()}-${(mfgDate.getMonth() + 1).toString().padStart(2, 0)}-${mfgDate
430
+ .getDate()
431
+ .toString()
432
+ .padStart(2, 0)}`,
433
+ etaDate: `${etaDate.getFullYear()}-${(etaDate.getMonth() + 1).toString().padStart(2, 0)}-${etaDate
434
+ .getDate()
435
+ .toString()
436
+ .padStart(2, 0)}`
434
437
  }
435
438
  })}
436
439
  .ganProcessing=${this.ganProcessingSetting}
@@ -474,7 +477,6 @@ class BulkOperation extends localize(i18next)(PageView) {
474
477
  country: String(record.country || ''),
475
478
  sku: String(record.sku || ''),
476
479
  productId: String(record.productId || ''),
477
- productDetailId: String(record.productDetailId || ''),
478
480
  packingType: record.packingType && record.packingType != '' ? String(record.packingType) : null,
479
481
  packingSize: !isNaN(Number(record.packingSize || 'x')) ? Number(record.packingSize) : null,
480
482
  uom: record.uom && record.uom != '' ? String(record.uom) : null,
@@ -446,7 +446,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
446
446
  items {
447
447
  id
448
448
  productId
449
- productDetailId
450
449
  batchId
451
450
  batchIdRef
452
451
  groupType
@@ -494,7 +493,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
494
493
  palletId
495
494
  cartonId
496
495
  productId
497
- productDetailId
498
496
  productSKU
499
497
  productName
500
498
  productBrand
@@ -542,6 +540,7 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
542
540
  this.dispatchEvent(
543
541
  new CustomEvent('selected', {
544
542
  detail: {
543
+ productDetailId: selectedProduct.id,
545
544
  packingType: selectedProduct.packingType,
546
545
  uom: selectedProduct.uom,
547
546
  uomValue: selectedProduct.uomValue,
@@ -556,9 +555,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
556
555
  packingSize: selectedProduct.packingSize,
557
556
  primaryUnit: selectedProduct.uom,
558
557
  primaryValue: selectedProduct.uomValue
559
- },
560
- productDetail: {
561
- id: selectedProduct.productDetailId
562
558
  }
563
559
  }
564
560
  })
@@ -586,7 +582,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
586
582
  remainQty: itm.remainQty,
587
583
  remainUomValueWithUom: itm.remainUomValueWithUom,
588
584
  productId: itm.productId,
589
- productDetailId: itm.productDetailId,
590
585
  remainUomValue: itm.remainUomValue,
591
586
  batchId: itm.batchId,
592
587
  batchIdRef: itm.batchIdRef,
@@ -608,7 +603,6 @@ class SelectInventoryPopUp extends localize(i18next)(LitElement) {
608
603
  remainQty: itm.remainQty,
609
604
  remainUomValueWithUom: itm.remainUomValueWithUom,
610
605
  productId: itm.productId,
611
- productDetailId: itm.productDetailId,
612
606
  remainUomValue: itm.remainUomValue,
613
607
  batchId: itm.batchId,
614
608
  batchIdRef: itm.batchIdRef,
@@ -121,8 +121,7 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
121
121
  pagination: { pages: [10, 20, 50, 100] },
122
122
  rows: {
123
123
  appendable: false,
124
- selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false },
125
- handlers: { dblclick: this._dblClickHandler.bind(this) }
124
+ selectable: { multiple: this.selectMultipleProducts ? this.selectMultipleProducts : false }
126
125
  },
127
126
  columns: [
128
127
  { type: 'gutter', gutterName: 'sequence' },
@@ -230,7 +229,6 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
230
229
  response.data.productDetails.items.map(item => {
231
230
  return {
232
231
  ...item,
233
- productName: item.product.name,
234
232
  productId: item.product.id,
235
233
  sku: item.product.sku,
236
234
  brand: item.product.brand,
@@ -242,34 +240,7 @@ class SelectProductPopup extends localize(i18next)(LitElement) {
242
240
  }
243
241
  }
244
242
 
245
- _dblClickHandler(columns, data, column, record, rowIndex, target) {
246
- if (this.selectMultipleProducts) return
247
- this.dispatchEvent(
248
- new CustomEvent('selected', {
249
- detail: {
250
- productDetailId: record.id,
251
- packingType: record.packingType,
252
- uom: record.uom,
253
- uomValue: record.uomValue,
254
- productName: `${record.name}(${record.description}(${record.sku}))`,
255
- isError: false,
256
- productBrand: record.brand,
257
- product: {
258
- id: record.productId,
259
- name: record.name,
260
- sku: record.sku,
261
- packingType: record.packingType,
262
- packingSize: record.packingSize,
263
- primaryUnit: record.uom,
264
- primaryValue: record.uomValue
265
- }
266
- }
267
- })
268
- )
269
- history.back()
270
- }
271
-
272
- selectProduct(record) {
243
+ selectProduct() {
273
244
  if (this.selectMultipleProducts !== true) {
274
245
  const selectedProduct = this.productGrist.selected[0]
275
246
  if (selectedProduct) {
@@ -202,8 +202,11 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
202
202
  async _undoPutaway() {
203
203
  try {
204
204
  let selectedInventories = []
205
- selectedInventories = this.dataGrist.selected
206
-
205
+ if (this._autoSelectInventory?.length) {
206
+ selectedInventories = this._autoSelectInventory
207
+ } else {
208
+ selectedInventories = this.dataGrist.selected
209
+ }
207
210
  if (!selectedInventories?.length) throw new Error(i18next.t('text.select_at_least_one_inventory_to_undo'))
208
211
 
209
212
  this._validateScanInventory()
@@ -247,11 +250,12 @@ class UndoPutawayPopup extends connect(store)(localize(i18next)(LitElement)) {
247
250
  this.lotInput.value = ''
248
251
  }
249
252
  this._showToast({ message: i18next.t('text.no_matching_putaway_inventory_found') })
253
+ } else if (targetedUndoInventories?.length == 1) {
254
+ this.data = { records: targetedUndoInventories }
255
+ this._autoSelectInventory = targetedUndoInventories
256
+ this._undoPutaway()
250
257
  } else {
251
258
  this.data = { records: targetedUndoInventories }
252
- if (targetedUndoInventories?.length == 1) {
253
- this.data.records[0].__selected__ = true
254
- }
255
259
  }
256
260
  }
257
261
  }
@@ -6,7 +6,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
6
6
 
7
7
  import { SingleColumnFormStyles } from '@things-factory/form-ui'
8
8
  import { i18next, localize } from '@things-factory/i18n-base'
9
- import { client, store, CustomAlert } from '@things-factory/shell'
9
+ import { client, store } from '@things-factory/shell'
10
10
  import { isMobileDevice } from '@things-factory/utils'
11
11
 
12
12
  class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
@@ -214,16 +214,6 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
214
214
 
215
215
  async _undoUnloading() {
216
216
  try {
217
- if (this.dataGrist.selected.some(s => s.inventoryItems?.length > 0)) {
218
- const result = await CustomAlert({
219
- title: i18next.t('title.are_you_sure'),
220
- text: i18next.t('text.all_related_serial_number_will_be_deleted'),
221
- confirmButton: { text: i18next.t('button.confirm') },
222
- cancelButton: { text: i18next.t('button.cancel') }
223
- })
224
-
225
- if (!result.value) return
226
- }
227
217
  let selectedInventoryIds = []
228
218
  selectedInventoryIds = this.dataGrist.selected.map(inventory => inventory.id)
229
219
 
@@ -277,10 +267,7 @@ class UndoUnloadPopup extends connect(store)(localize(i18next)(LitElement)) {
277
267
  return { ...itm, sku: itm.product.sku }
278
268
  })
279
269
  }
280
- if (targetedUndoInventories?.length == 1) {
281
- this._selectedRecords = targetedUndoInventories
282
- this.data.records[0].__selected__ = true
283
- }
270
+ this._selectedRecords = targetedUndoInventories?.length == 1 ? targetedUndoInventories : []
284
271
  }
285
272
  } catch (e) {
286
273
  this._showToast(e)
@@ -576,7 +576,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
576
576
  description
577
577
  isRequiredCheckExpiry
578
578
  isRequireSerialNumberScanningInbound
579
- expirationPeriod
580
579
  }
581
580
  name
582
581
  targetName
@@ -700,7 +699,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
700
699
  sku
701
700
  isRequiredCheckExpiry
702
701
  isRequireSerialNumberScanningInbound
703
- expirationPeriod
704
702
  }
705
703
  inventory {
706
704
  id
@@ -786,9 +784,6 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
786
784
  id
787
785
  name
788
786
  }
789
- inventoryItems {
790
- serialNumber
791
- }
792
787
  }
793
788
  }
794
789
  `,
@@ -872,19 +867,16 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
872
867
  try {
873
868
  if (!this._enableCartonLabel) return this._unloadSelected()
874
869
  let orderProducts = await this._validateUnloading()
875
-
876
- if (!orderProducts || !orderProducts.errors) {
877
- if (orderProducts?.length > 1) {
878
- this.selectOrderProduct(orderProducts)
870
+ if (orderProducts?.length > 1) {
871
+ this.selectOrderProduct(orderProducts)
872
+ } else {
873
+ if (this._isRequireSerialNumberScanningInbound) {
874
+ return this._scanSerialNumberUnload()
879
875
  } else {
880
- if (this._isRequireSerialNumberScanningInbound) {
881
- return this._scanSerialNumberUnload()
882
- } else {
883
- if (!(this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)))
884
- return this._qtyUnload()
885
- }
886
- this._scanProductUnload()
876
+ if (!(this._enableProductScanning && (this._enableInputQty < 0 || this._enableInputQty > 3)))
877
+ return this._qtyUnload()
887
878
  }
879
+ this._scanProductUnload()
888
880
  }
889
881
  } catch (e) {
890
882
  this._showToast(e)
@@ -1116,72 +1108,74 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1116
1108
  }
1117
1109
 
1118
1110
  async _checkedScannedProduct() {
1119
- //fetch any product details that has entered gtin
1120
- const response = await this.fetchProductDetails(this.productBarcodeInput?.value.trim() || '', '')
1111
+ try {
1112
+ //fetch any product details that has entered gtin
1113
+ const response = await this.fetchProductDetails(this.productBarcodeInput?.value || '', '')
1121
1114
 
1122
- if (!response.errors) {
1123
- let orderProductData = this.orderProductData.records
1124
- let checkedProductDetails = response.data.checkGtin.items
1125
-
1126
- //check from grist if any is matched
1127
- const foundOrderProducts = orderProductData.filter(op => {
1128
- return checkedProductDetails.some(
1129
- itm =>
1130
- itm.product.id == op.product.id && itm.packingType == op.packingType && itm.packingSize == op.packingSize
1131
- )
1132
- })
1115
+ if (!response.errors) {
1116
+ let orderProductData = this.orderProductData.records
1117
+ let checkedProductDetails = response.data.checkGtin.items
1118
+
1119
+ //check from grist if any is matched
1120
+ const foundOrderProducts = orderProductData.filter(op => {
1121
+ return checkedProductDetails.some(
1122
+ itm =>
1123
+ itm.product.id == op.product.id && itm.packingType == op.packingType && itm.packingSize == op.packingSize
1124
+ )
1125
+ })
1133
1126
 
1134
- const foundParentProducts = orderProductData.filter(op => {
1135
- return checkedProductDetails.some(itm => itm.product.id == op.product.id)
1136
- })
1127
+ const foundParentProducts = orderProductData.filter(op => {
1128
+ return checkedProductDetails.some(itm => itm.product.id == op.product.id)
1129
+ })
1137
1130
 
1138
- if (!foundOrderProducts?.length) {
1139
- if (!foundParentProducts?.length) {
1140
- if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
1141
- if (this.actualQtyInput?.value) this.actualQtyInput.value = ''
1142
- }
1131
+ if (!foundOrderProducts?.length) {
1132
+ if (!foundParentProducts?.length) {
1133
+ if (this._enableInputQty >= 0 && this._enableInputQty < 4 && !this._isRequireSerialNumberScanningInbound) {
1134
+ if (this.actualQtyInput?.value) this.actualQtyInput.value = ''
1135
+ }
1143
1136
 
1144
- if (this._isRequireSerialNumberScanningInbound) {
1145
- if (this.serialNumberInput?.value) this.serialNumberInput.value = ''
1146
- }
1137
+ if (this._isRequireSerialNumberScanningInbound) {
1138
+ if (this.serialNumberInput?.value) this.serialNumberInput.value = ''
1139
+ }
1147
1140
 
1148
- this.productBarcodeInput.value = ''
1149
- this._focusOnProductBarcodeInput()
1150
- throw new Error(i18next.t('text.no_matching_product_found'))
1141
+ this.productBarcodeInput.value = ''
1142
+ this._focusOnProductBarcodeInput()
1143
+ throw new Error(i18next.t('text.no_matching_product_found'))
1144
+ }
1151
1145
  }
1152
- }
1153
1146
 
1154
- const product =
1155
- foundOrderProducts?.length >= 1
1156
- ? foundOrderProducts[0].product
1157
- : foundOrderProducts?.length == 0 && foundParentProducts?.length > 0
1158
- ? foundParentProducts[0].product
1159
- : null
1147
+ const product =
1148
+ foundOrderProducts?.length >= 1
1149
+ ? foundOrderProducts[0].product
1150
+ : foundOrderProducts?.length == 0 && foundParentProducts?.length > 0
1151
+ ? foundParentProducts[0].product
1152
+ : null
1160
1153
 
1161
- if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
1162
- this._selectedOrderProduct = null
1154
+ if (this._selectedOrderProduct && this._selectedOrderProduct.product.sku !== product.sku)
1155
+ this._selectedOrderProduct = null
1163
1156
 
1164
- if (foundOrderProducts?.length > 1) {
1165
- if (this._isRequireSerialNumberScanningInbound) {
1166
- if (!this._selectedOrderProduct) {
1157
+ if (foundOrderProducts?.length > 1) {
1158
+ if (this._isRequireSerialNumberScanningInbound) {
1159
+ if (!this._selectedOrderProduct) {
1160
+ return foundOrderProducts
1161
+ }
1162
+ } else {
1167
1163
  return foundOrderProducts
1168
1164
  }
1169
- } else {
1170
- return foundOrderProducts
1165
+ } else if (foundOrderProducts?.length == 1) {
1166
+ this._expirationPeriod = product.expirationPeriod
1167
+ this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
1168
+ this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
1169
+ this._selectedOrderProduct = foundOrderProducts[0]
1170
+ } else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
1171
+ this._expirationPeriod = product.expirationPeriod
1172
+ this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
1173
+ this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
1174
+ this._selectedOrderProduct = foundParentProducts[0]
1171
1175
  }
1172
- } else if (foundOrderProducts?.length == 1) {
1173
- this._expirationPeriod = product.expirationPeriod
1174
- this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
1175
- this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
1176
- this._selectedOrderProduct = foundOrderProducts[0]
1177
- } else if (foundOrderProducts?.length == 0 && foundParentProducts?.length > 0) {
1178
- this._expirationPeriod = product.expirationPeriod
1179
- this._isRequiredCheckExpiry = product.isRequiredCheckExpiry
1180
- this._isRequireSerialNumberScanningInbound = product.isRequireSerialNumberScanningInbound
1181
- this._selectedOrderProduct = foundParentProducts[0]
1182
1176
  }
1183
- } else {
1184
- return response
1177
+ } catch (e) {
1178
+ this._showToast(e)
1185
1179
  }
1186
1180
  }
1187
1181
 
@@ -1298,7 +1292,9 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1298
1292
  }
1299
1293
  }
1300
1294
 
1301
- return orderProducts
1295
+ if (orderProducts?.length > 1) {
1296
+ return orderProducts
1297
+ }
1302
1298
  }
1303
1299
  }
1304
1300
 
@@ -1497,7 +1493,7 @@ class UnloadProduct extends connect(store)(localize(i18next)(PageView)) {
1497
1493
  await this._validateUnloading()
1498
1494
  await this._checkedLotScannedProduct()
1499
1495
 
1500
- if (this._isRequireSerialNumberScanningInbound) return this._scanSerialNumberUnload()
1496
+ if (this._isRequireSerialNumberScanningInbound) this._scanSerialNumberUnload()
1501
1497
  this._qtyUnload()
1502
1498
  } catch (e) {
1503
1499
  this._showToast(e)
@@ -8,7 +8,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
8
8
 
9
9
  import { getCodeByName } from '@things-factory/code-base'
10
10
  import { i18next, localize } from '@things-factory/i18n-base'
11
- import { client, PageView, store, gqlContext } from '@things-factory/shell'
11
+ import { client, PageView, store,gqlContext } from '@things-factory/shell'
12
12
  import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
13
13
  import { isMobileDevice } from '@things-factory/utils'
14
14
  import { openPopup } from '@things-factory/layout-base'
@@ -142,7 +142,8 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
142
142
  { column: 'manufactureDate', name: 'Mfg. Date' },
143
143
  { column: 'unitCost', name: 'Unit Cost' },
144
144
  { column: 'inventoryItemChange', name: 'Inventory Item Changes' },
145
- { column: 'status', name: 'Status' }
145
+ { column: 'status', name: 'Status' },
146
+
146
147
  ]
147
148
 
148
149
  this.config = {
@@ -199,7 +200,7 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
199
200
 
200
201
  if (item.column == 'status' && record.transactionType == 'MISSING') {
201
202
  updatedVal = record.transactionType || '[N/A]'
202
- } else if (item.column == 'status') {
203
+ }else if(item.column == 'status'){
203
204
  updatedVal = '[N/A]'
204
205
  }
205
206
 
@@ -691,4 +692,4 @@ class InventoryAdjustmentApproval extends connect(store)(localize(i18next)(PageV
691
692
  }
692
693
  }
693
694
 
694
- window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
695
+ window.customElements.define('inventory-adjustment-approval', InventoryAdjustmentApproval)
@@ -586,9 +586,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
586
586
  isRequireSerialNumberScanningOutbound
587
587
  isRequireSerialNumberScanningInbound
588
588
  }
589
- productDetail {
590
- id
591
- }
592
589
  qty
593
590
  lockedQty
594
591
  warehouse {
@@ -657,9 +654,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
657
654
  description
658
655
  productInformation
659
656
  }
660
- productDetail {
661
- id
662
- }
663
657
  qty
664
658
  lockedQty
665
659
  warehouse {
@@ -904,7 +898,6 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
904
898
 
905
899
  row.bizplace = row.bizplace ? { id: row.bizplace.id } : undefined
906
900
  row.location = row.location ? { id: row.location.id } : undefined
907
- row.productDetailId = row.product ? row.product.id : undefined
908
901
  row.product = row.product ? { id: row.product.productId } : undefined
909
902
  row.uomValue = row.uomValue ? parseFloat(row.uomValue) : undefined
910
903
  row.unitCost = row.unitCost ? parseFloat(row.unitCost) : undefined
@@ -166,7 +166,6 @@ class CreateCycleCount extends localize(i18next)(PageView) {
166
166
  descriptionField: 'productName',
167
167
  select: [
168
168
  { name: 'productId', hidden: true },
169
- { name: 'productDetailId', hidden: true },
170
169
  { name: 'remainUomValue', hidden: true },
171
170
  { name: 'uom', hidden: true },
172
171
  { name: 'batchId', header: i18next.t('field.batch_id') },
@@ -554,7 +553,9 @@ class CreateCycleCount extends localize(i18next)(PageView) {
554
553
  return {
555
554
  batchId: itm.batchId,
556
555
  batchIdRef: itm.batchIdRef,
557
- productDetailId: itm.productDetailId
556
+ packingSize: itm.packingSize,
557
+ packingType: itm.packingType,
558
+ productId: itm.productId
558
559
  }
559
560
  }) || []
560
561
 
@@ -170,105 +170,56 @@ class InventoryCheckList extends localize(i18next)(PageView) {
170
170
  name: 'inventoryCheck',
171
171
  header: i18next.t('field.inventory_check_no'),
172
172
  sortable: true,
173
- width: 150,
174
- imex: {
175
- header: i18next.t('field.inventory_check_no'),
176
- key: 'inventoryCheck.name',
177
- width: 50,
178
- type: 'string'
179
- }
173
+ width: 150
180
174
  },
181
175
  {
182
176
  type: 'object',
183
177
  name: 'bizplace',
184
178
  header: i18next.t('field.company'),
185
179
  sortable: true,
186
- width: 250,
187
- imex: {
188
- header: i18next.t('field.company'),
189
- key: 'bizplace.name',
190
- width: 30,
191
- type: 'array',
192
- arrData: []
193
- }
180
+ width: 250
194
181
  },
195
182
  {
196
183
  type: 'date',
197
184
  name: 'executionDate',
198
185
  header: i18next.t('field.execution_date'),
199
186
  sortable: true,
200
- width: 120,
201
- imex: {
202
- header: i18next.t('field.execution_date'),
203
- key: 'executionDate',
204
- width: 30,
205
- type: 'date'
206
- }
187
+ width: 120
207
188
  },
208
189
  {
209
190
  type: 'string',
210
191
  name: 'inventoryCheckStatus',
211
192
  header: i18next.t('field.order_status'),
212
193
  sortable: true,
213
- width: 120,
214
- imex: {
215
- header: i18next.t('field.order_status'),
216
- key: 'inventoryCheckStatus',
217
- width: 20,
218
- type: 'string'
219
- }
194
+ width: 120
220
195
  },
221
196
  {
222
197
  type: 'string',
223
198
  name: 'status',
224
199
  header: i18next.t('field.task_status'),
225
200
  sortable: true,
226
- width: 120,
227
- imex: {
228
- header: i18next.t('field.task_status'),
229
- key: 'status',
230
- width: 20,
231
- type: 'string'
232
- }
201
+ width: 120
233
202
  },
234
203
  {
235
204
  type: 'datetime',
236
205
  name: 'startedAt',
237
206
  header: i18next.t('field.started_at'),
238
207
  sortable: true,
239
- width: 160,
240
- imex: {
241
- header: i18next.t('field.started_at'),
242
- key: 'startedAt',
243
- width: 30,
244
- type: 'datetime'
245
- }
208
+ width: 160
246
209
  },
247
210
  {
248
211
  type: 'datetime',
249
212
  name: 'endedAt',
250
213
  header: i18next.t('field.ended_at'),
251
214
  sortable: true,
252
- width: 160,
253
- imex: {
254
- header: i18next.t('field.ended_at'),
255
- key: 'endedAt',
256
- width: 30,
257
- type: 'datetime'
258
- }
215
+ width: 160
259
216
  },
260
217
  {
261
218
  type: 'object',
262
219
  name: 'updater',
263
220
  header: i18next.t('field.updater'),
264
221
  sortable: true,
265
- width: 150,
266
- imex: {
267
- header: i18next.t('field.updater'),
268
- key: 'updater.name',
269
- width: 30,
270
- type: 'object'
271
- }
222
+ width: 150
272
223
  }
273
224
  ]
274
225
  }
@@ -422,43 +373,8 @@ class InventoryCheckList extends localize(i18next)(PageView) {
422
373
  return this.config.columns
423
374
  }
424
375
 
425
- async _exportableData() {
426
- let records = []
427
- records = this.dataGrist.data.records
428
-
429
- const fetchBizplaces = await this._fetchBizplaceList()
430
-
431
- var headerSetting = this.dataGrist._config.columns
432
- .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
433
- .map(column => {
434
- if (column.imex.key == 'bizplace.name') {
435
- column.imex.arrData = fetchBizplaces.map(item => {
436
- return {
437
- id: item.id,
438
- name: item.name
439
- }
440
- })
441
- }
442
- return column.imex
443
- })
444
-
445
- var data = records.map(item => {
446
- return {
447
- id: item.id,
448
- ...this.config.columns
449
- .filter(column => column.type !== 'gutter' /* && column.record !== undefined */ && column.imex !== undefined)
450
- .reduce((record, column) => {
451
- record[column.imex.key] = column.imex.key
452
- .split('.')
453
- .reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
454
- if (column.type === 'datetime') {
455
- record[column.imex.key] = new Date(parseInt(record[column.imex.key])).toLocaleString()
456
- }
457
- return record
458
- }, {})
459
- }
460
- })
461
- return { header: headerSetting, data: data }
376
+ _exportableData() {
377
+ return this.dataGrist.exportRecords()
462
378
  }
463
379
  }
464
380