@things-factory/operato-wms 4.3.113-alpha.0 → 4.3.114

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 (68) hide show
  1. package/client/pages/bulk-operation/bulk-operation.js +3 -23
  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 +24 -19
  6. package/client/pages/inbound/unload-product.js +67 -72
  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/check-inventory-popup.js +1 -4
  10. package/client/pages/inventory-check/create-cycle-count.js +3 -2
  11. package/client/pages/inventory-check/cycle-count-report.js +32 -19
  12. package/client/pages/inventory-check/inspecting-product.js +14 -30
  13. package/client/pages/inventory-check/inventory-check-list.js +0 -2
  14. package/client/pages/manifest/loading-manifest-detail.js +4 -7
  15. package/client/pages/master/generate-location-list.js +22 -30
  16. package/client/pages/master/location-list.js +71 -134
  17. package/client/pages/master/pallet-list.js +58 -137
  18. package/client/pages/master/product/product-details-popup.js +3 -3
  19. package/client/pages/master/tote-list.js +27 -40
  20. package/client/pages/master/transport-driver.js +41 -50
  21. package/client/pages/master/transport-vehicle.js +41 -45
  22. package/client/pages/master/warehouse-list.js +34 -56
  23. package/client/pages/order/arrival-notice/arrival-notice-detail.js +25 -36
  24. package/client/pages/order/arrival-notice/create-arrival-notice.js +32 -53
  25. package/client/pages/order/arrival-notice/duplicate-arrival-notice.js +0 -2
  26. package/client/pages/order/arrival-notice/edit-product-popup.js +7 -9
  27. package/client/pages/order/draft-release-good/draft-release-good-detail.js +2 -39
  28. package/client/pages/order/goods-received-note/received-note-list.js +32 -9
  29. package/client/pages/order/release-order/create-release-order.js +5 -22
  30. package/client/pages/order/release-order/release-extra-product-popup.js +1 -4
  31. package/client/pages/order/release-order/release-order-detail.js +0 -24
  32. package/client/pages/order/return-order/create-return-order.js +0 -5
  33. package/client/pages/order/return-order/return-order-inventory-popup.js +0 -1
  34. package/client/pages/order/transport-order/delivery-order-list.js +0 -26
  35. package/client/pages/outbound/inventory-reassign-popup.js +0 -6
  36. package/client/pages/outbound/packing-product.js +5 -5
  37. package/client/pages/outbound/packing-worksheet-list.js +1 -3
  38. package/client/pages/outbound/picking-product.js +7 -22
  39. package/client/pages/outbound/show-my-worksheet-list-popup.js +3 -12
  40. package/client/pages/outbound/show-ro-list-popup.js +0 -2
  41. package/client/pages/outbound/sorting-product.js +0 -6
  42. package/client/pages/report/custom-elccl/elccl-daily-collection-report.js +2 -5
  43. package/client/pages/report/custom-elccl/elccl-daily-order-inventory-report.js +2 -2
  44. package/client/pages/report/custom-elccl/elccl-delivery-order-summary.js +8 -48
  45. package/client/pages/vas/print-product-label.js +11 -13
  46. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +5 -4
  47. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +1 -1
  48. package/dist-server/graphql/resolvers/other/add-release-good-products.js +11 -7
  49. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +1 -1
  50. package/dist-server/graphql/resolvers/reports/costing-report.js +24 -18
  51. package/dist-server/graphql/resolvers/reports/costing-report.js.map +1 -1
  52. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +6 -6
  53. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +6 -5
  54. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +1 -1
  55. package/dist-server/graphql/resolvers/reports/release-inventory-report.js +3 -3
  56. package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +1 -1
  57. package/package.json +50 -50
  58. package/server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.ts +5 -4
  59. package/server/graphql/resolvers/other/add-release-good-products.ts +12 -8
  60. package/server/graphql/resolvers/reports/costing-report.ts +24 -18
  61. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +6 -6
  62. package/server/graphql/resolvers/reports/outbound-order-details-report.ts +6 -5
  63. package/server/graphql/resolvers/reports/release-inventory-report.ts +4 -6
  64. package/translations/en.json +5 -18
  65. package/translations/ko.json +4 -17
  66. package/translations/ms.json +4 -17
  67. package/translations/zh.json +4 -17
  68. package/config.development.js +0 -110
@@ -872,7 +872,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
872
872
 
873
873
  if (changedColumn === 'unitPrice') {
874
874
  let unitPrice = changeRecord.unitPrice
875
- if (typeof unitPrice === undefined || unitPrice < 0 || isNaN(unitPrice)) {
875
+ if (typeof unitPrice === undefined || unitPrice < 0) {
876
876
  throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.unit_price') } }))
877
877
  }
878
878
  }
@@ -1210,12 +1210,7 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1210
1210
  _validateForm() {
1211
1211
  if (!this.arrivalNoticeForm.checkValidity()) throw new Error(i18next.t('text.arrival_notice_form_invalid'))
1212
1212
 
1213
- if (this._hasContainer) {
1214
- if (!this.containerNo.value) throw new Error(i18next.t('text.container_no_is_empty'))
1215
-
1216
- if (!this.arrivalNoticeForm?.containerSize?.value || this.arrivalNoticeForm?.containerSize?.value == '')
1217
- throw new Error(i18next.t('text.please_select_container_size'))
1218
- }
1213
+ if (this._hasContainer) if (!this.containerNo.value) throw new Error(i18next.t('text.container_no_is_empty'))
1219
1214
 
1220
1215
  if (this._ownTransport && this._warehouseTransport)
1221
1216
  throw new Error(i18next.t('text.you_can_only_select_one_transport_type'))
@@ -1223,9 +1218,9 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1223
1218
  throw new Error(i18next.t('text.please_select_transport_type'))
1224
1219
  }
1225
1220
 
1226
- _validateProducts(records = []) {
1221
+ _validateProducts() {
1227
1222
  // no records
1228
- if (!records?.length) records = this.productGrist.dirtyData.records
1223
+ const records = this.productGrist.dirtyData.records
1229
1224
  if (!records?.length) throw new Error(i18next.t('text.no_products'))
1230
1225
 
1231
1226
  this._checkProductDuplication()
@@ -1238,10 +1233,6 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1238
1233
  throw new Error(i18next.t('text.empty_value_in_list'))
1239
1234
  }
1240
1235
 
1241
- if (records.some(({ unitPrice }) => unitPrice < 0)) {
1242
- throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.unit_price') } }))
1243
- }
1244
-
1245
1236
  if (records.some(({ packQty }) => packQty < 0)) {
1246
1237
  throw new Error(i18next.t('text.x_should_be_positive', { state: { x: i18next.t('label.pack_qty') } }))
1247
1238
  }
@@ -1361,7 +1352,6 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1361
1352
  batchId: record.batchId,
1362
1353
  batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
1363
1354
  product: { id: record.product.id },
1364
- productDetail: record?.productDetail?.id ? record.productDetail : { id: record.productDetailId },
1365
1355
  packingType: record.packingType,
1366
1356
  packingSize: record.packingSize || record.product.packingSize,
1367
1357
  uomValue: record?.uomValue ? record.uomValue : 0,
@@ -1708,9 +1698,6 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1708
1698
  primaryUnit
1709
1699
  primaryValue
1710
1700
  }
1711
- productDetail {
1712
- id
1713
- }
1714
1701
  }
1715
1702
  }
1716
1703
  `,
@@ -1740,46 +1727,40 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1740
1727
  }
1741
1728
 
1742
1729
  this.productGrist.fetch()
1743
- } else {
1744
- throw response.errors
1745
1730
  }
1746
1731
  }
1747
1732
 
1748
1733
  async importHandler(patches) {
1749
- try {
1750
- patches.map(itm => {
1751
- itm.unitPrice = parseFloat(itm.unitPrice) || ''
1752
- if (itm.manufactureDate) {
1753
- let mdt = new Date(itm.manufactureDate)
1754
- itm.manufactureDate =
1755
- mdt < new Date() ? `${mdt.getFullYear()}-${mdt.getMonth() + 1}-${mdt.getDate()}` || '' : ''
1756
- } else {
1757
- delete itm.manufactureDate
1758
- }
1759
- itm.uomValue = parseFloat(itm.uomValue) || ''
1760
- itm.packQty = parseInt(itm.packQty) || ''
1761
- itm.palletQty = parseInt(itm.palletQty) || ''
1762
- })
1763
-
1764
- const orderProducts = patches.map(patch => {
1765
- delete patch.cuFlag
1766
- return {
1767
- ...patch,
1768
- unitPrice: parseFloat(patch.unitPrice) || 0,
1769
- uomValue: parseFloat(patch.uomValue) || 0,
1770
- packQty: parseInt(patch.packQty) || 0,
1771
- palletQty: parseInt(patch.palletQty) || 0
1772
- }
1773
- })
1774
- this.productData = {
1775
- records: [...patches]
1734
+ patches.map(itm => {
1735
+ itm.unitPrice = parseFloat(itm.unitPrice) || ''
1736
+ if (itm.manufactureDate) {
1737
+ let mdt = new Date(itm.manufactureDate)
1738
+ itm.manufactureDate =
1739
+ mdt < new Date() ? `${mdt.getFullYear()}-${mdt.getMonth() + 1}-${mdt.getDate()}` || '' : ''
1740
+ } else {
1741
+ delete itm.manufactureDate
1776
1742
  }
1777
- await this.bulkUploadValidateOrderProducts(orderProducts)
1778
- history.back()
1779
- } catch (e) {
1780
- history.back()
1781
- return
1743
+ itm.uomValue = parseFloat(itm.uomValue) || ''
1744
+ itm.packQty = parseFloat(itm.packQty) || ''
1745
+ itm.palletQty = parseFloat(itm.palletQty) || ''
1746
+ })
1747
+
1748
+ this.productData = {
1749
+ records: [...patches]
1782
1750
  }
1751
+
1752
+ const orderProducts = patches.map(patch => {
1753
+ delete patch.cuFlag
1754
+ return {
1755
+ ...patch,
1756
+ unitPrice: parseFloat(patch.unitPrice) || 0,
1757
+ uomValue: parseFloat(patch.uomValue) || 0,
1758
+ packQty: parseFloat(patch.packQty) || 0,
1759
+ palletQty: parseFloat(patch.palletQty) || 0
1760
+ }
1761
+ })
1762
+ await this.bulkUploadValidateOrderProducts(orderProducts)
1763
+ history.back()
1783
1764
  }
1784
1765
 
1785
1766
  async _importableData(records) {
@@ -1793,8 +1774,6 @@ class CreateArrivalNotice extends localize(i18next)(PageView) {
1793
1774
  }
1794
1775
  })
1795
1776
 
1796
- this._validateProducts(records)
1797
-
1798
1777
  openPopup(
1799
1778
  html`
1800
1779
  <import-pop-up
@@ -1425,7 +1425,6 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
1425
1425
  batchId: record.batchId,
1426
1426
  batchIdRef: record?.batchIdRef ? record.batchIdRef : null,
1427
1427
  product: { id: record.product.id },
1428
- productDetail: { id: record.productDetailId },
1429
1428
  packingType: record.packingType,
1430
1429
  packingSize: record?.product?.packingSize ? record.product.packingSize : record.packingSize,
1431
1430
  uomValue: record?.uomValue ? record.uomValue : 0,
@@ -1481,7 +1480,6 @@ class DuplicateArrivalNotice extends localize(i18next)(PageView) {
1481
1480
  } else if (record.targetType === VAS_BATCH_AND_PRODUCT_TYPE) {
1482
1481
  result.targetBatchId = record.target.batchId
1483
1482
  result.targetProduct = { id: record.target.productId }
1484
- result.targetProductDetail = { id: record.target.productDetailId }
1485
1483
  result.packingType = record.packingType
1486
1484
  result.qty = record.qty
1487
1485
  result.uomValue = record.uomValue
@@ -406,7 +406,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
406
406
  return this.shadowRoot.querySelector('data-grist#addProduct')
407
407
  }
408
408
 
409
- async _onProductChangeHandler(event) {
409
+ _onProductChangeHandler(event) {
410
410
  try {
411
411
  this._checkProductDuplication()
412
412
  let changeRecord = event.detail.after
@@ -423,9 +423,9 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
423
423
 
424
424
  const amountRelatedColumns = ['uomValue', 'uom', 'packQty']
425
425
  if (amountRelatedColumns.indexOf(changedColumn) >= 0) {
426
- const calcedAmount = await this._calcAmount(changedColumn, changeRecord)
426
+ const calcedAmount = this._calcAmount(changedColumn, changeRecord)
427
427
  for (let key in calcedAmount) {
428
- changeRecord[key] = key == 'packQty' ? Math.ceil(calcedAmount[key]) : calcedAmount[key]
428
+ changeRecord[key] = calcedAmount[key]
429
429
  }
430
430
  }
431
431
 
@@ -596,8 +596,8 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
596
596
  let existingOrderProducts = []
597
597
  let newOrderProducts = []
598
598
 
599
- existingOrderProducts = await this._getExistingOrderProducts()
600
- newOrderProducts = await this._getNewOrderProducts()
599
+ existingOrderProducts = this._getExistingOrderProducts()
600
+ newOrderProducts = this._getNewOrderProducts()
601
601
 
602
602
  if (existingOrderProducts?.length || newOrderProducts?.length) {
603
603
  const result = await CustomAlert({
@@ -624,8 +624,8 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
624
624
  `,
625
625
  variables: {
626
626
  ganNo: this.ganNo,
627
- newOrderProducts,
628
- existingOrderProducts
627
+ newOrderProducts: this._getNewOrderProducts(),
628
+ existingOrderProducts: this._getExistingOrderProducts()
629
629
  }
630
630
  })
631
631
 
@@ -650,7 +650,6 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
650
650
  palletQty: 0,
651
651
  adjustedPalletQty: record?.palletQty ? record.palletQty : null,
652
652
  product: { id: record.product.id },
653
- productDetail: { id: record.productDetailId },
654
653
  packingType: 'N/A',
655
654
  adjustedPackingType: record.packingType,
656
655
  uomValue: 0,
@@ -683,7 +682,6 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
683
682
  adjustedBatchIdRef: record.batchIdRef === record.__origin__.batchIdRef ? null : record.batchIdRef,
684
683
  adjustedPalletQty: record.palletQty == record.__origin__.palletQty ? null : record.palletQty,
685
684
  product: { id: record.product.id },
686
- productDetail: { id: record.productDetail.id },
687
685
  adjustedPackingType: record.packingType === record.__origin__.packingType ? null : record.packingType,
688
686
  adjustedUomValue: record.uomValue == record.__origin__.uomValue ? null : record.uomValue,
689
687
  adjustedUom: record.uom === record.__origin__.uom ? null : record.uom,
@@ -14,7 +14,6 @@ import { fetchSettingRule } from '@things-factory/setting-ui'
14
14
  import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
15
15
  import { CommonButtonStyles } from '@things-factory/styles'
16
16
  import { flattenObject, isMobileDevice } from '@things-factory/utils'
17
- import isEmpty from 'lodash-es/isEmpty'
18
17
 
19
18
  import { DRAFT_RELEASE_ORDER_STATUS, PRODUCT_GROUP_TYPES } from '../../../constants'
20
19
 
@@ -224,7 +223,6 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
224
223
  get context() {
225
224
  let actions = []
226
225
 
227
- // first time getting the draft order data
228
226
  if (this._draftOrderData) {
229
227
  actions = [
230
228
  {
@@ -482,7 +480,6 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
482
480
 
483
481
  if (!this._packingTypes) this._packingTypes = await getCodeByName('PACKING_TYPES')
484
482
 
485
- // getting orderNo and see whether it's enw or existing draft order
486
483
  let orderNo = changes.resourceId || this._orderNo
487
484
  this._orderNo = orderNo == 'new' ? '' : orderNo
488
485
  await this._fetchOrder()
@@ -546,8 +543,7 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
546
543
  let returnObj = {
547
544
  ...record,
548
545
  ...record.product,
549
- product: { ...record.product, id: record.product?.id || record.product.productId },
550
- productDetail: { id: record.productDetail?.id || record.product.productDetailId },
546
+ product: { ...record.product, id: record.product.id || record.product.productId },
551
547
  name: record.name ? record.name : idx,
552
548
  releaseQty: record.releaseQty < 0 ? 0 : record.releaseQty,
553
549
  id: record.id
@@ -601,7 +597,6 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
601
597
  select: [
602
598
  { name: 'id', hidden: true },
603
599
  { name: 'productId', hidden: true },
604
- { name: 'productDetailId', hidden: true },
605
600
  { name: 'remainUomValue', hidden: true },
606
601
  {
607
602
  name: 'groupType',
@@ -821,9 +816,6 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
821
816
  sku
822
817
  description
823
818
  }
824
- productDetail {
825
- id
826
- }
827
819
  packingType
828
820
  packingSize
829
821
  uomValue
@@ -863,10 +855,10 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
863
855
 
864
856
  if (!response.errors) {
865
857
  this._draftOrderData = {
866
- // this is where data is
867
858
  ...response.data.draftReleaseGoodByName
868
859
  // shippingOrder: this._exportOption ? this._serializeForm(this._shippingOrderForm) : null
869
860
  }
861
+
870
862
  this._productData = {
871
863
  records: response.data.draftReleaseGoodByName.orderProducts.map(itm => {
872
864
  return {
@@ -1036,17 +1028,6 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
1036
1028
  if (this._productGrist.dirtyData.records.some(record => !record.releaseQty))
1037
1029
  throw new Error(i18next.t('text.invalid_release_qty'))
1038
1030
 
1039
-
1040
- if (this._draftOrderData.bizplace.id != null)
1041
- {
1042
- // check changes in form info
1043
- let checkFormInfoChange = this._serializeForm(this._draftReleaseOrderForm).refNo == this._draftOrderData.refNo && this._serializeForm(this._draftReleaseOrderForm).refNo2 == this._draftOrderData.refNo2 && this._serializeForm(this._draftReleaseOrderForm).refNo3 == this._draftOrderData.refNo3 && this._serializeForm(this._draftReleaseOrderForm).releaseDate == this._draftOrderData.releaseDate && this._serializeForm(this._draftReleaseOrderForm).collectionOrderNo == this._draftOrderData.collectionOrderNo
1044
-
1045
- // check changes in product
1046
- let checkProductDataChange = this._compareArray(this._productGrist.dirtyData.records, this.___draftOrderData.orderProducts)
1047
- if (checkFormInfoChange == true && checkProductDataChange != true)
1048
- throw new Error(i18next.t('text.nothing_changed'))
1049
- }
1050
1031
  return true
1051
1032
  }
1052
1033
 
@@ -1055,30 +1036,12 @@ class DraftReleaseGoodDetail extends connect(store)(localize(i18next)(PageView))
1055
1036
  return formData
1056
1037
  }
1057
1038
 
1058
- _compareArray(a, b) {
1059
- // Comparing the length of each array
1060
- if (a.length != b.length) return true
1061
- else {
1062
- for (var i = 0; i < a.length; i++) {
1063
- // compare releaseQty of both array
1064
- if (a[i].releaseQty != b[i].releaseQty) {
1065
- return true
1066
- }
1067
- // compare product of both array
1068
- if (a[i].product.id != b[i].product.id) {
1069
- return true
1070
- }
1071
- }
1072
- }
1073
- }
1074
-
1075
1039
  _getOrderProducts() {
1076
1040
  return this._productGrist.dirtyData.records.map(record => {
1077
1041
  let orderProduct = {
1078
1042
  id: record.id ? record.id.toString() : null,
1079
1043
  name: record.name ? record.name.toString() : null,
1080
1044
  product: { id: record.product.id },
1081
- productDetail: { id: record.productDetail.id },
1082
1045
  packingType: record.packingType,
1083
1046
  uomValue: record?.uomValue ? record.uomValue : 0,
1084
1047
  uom: record.uom,
@@ -2,11 +2,21 @@ import '@things-factory/form-ui'
2
2
  import '@things-factory/grist-ui'
3
3
 
4
4
  import gql from 'graphql-tag'
5
- import { css, html } from 'lit-element'
5
+ import {
6
+ css,
7
+ html
8
+ } from 'lit-element'
6
9
 
7
10
  import { getCodeByName } from '@things-factory/code-base'
8
- import { i18next, localize } from '@things-factory/i18n-base'
9
- import { client, navigate, PageView } from '@things-factory/shell'
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
15
+ import {
16
+ client,
17
+ navigate,
18
+ PageView
19
+ } from '@things-factory/shell'
10
20
  import { ScrollbarStyles } from '@things-factory/styles'
11
21
  import { isMobileDevice } from '@things-factory/utils'
12
22
 
@@ -212,7 +222,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
212
222
  type: 'object',
213
223
  name: 'bizplace',
214
224
  header: i18next.t('field.company'),
215
- imex: { header: i18next.t('field.company'), key: 'bizplace.name', width: 25, type: 'string' },
225
+ imex: { header: i18next.t('field.company'), key: 'bizplace', width: 25, type: 'string' },
216
226
  sortable: true,
217
227
  width: 230
218
228
  },
@@ -244,7 +254,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
244
254
  type: 'object',
245
255
  name: 'arrivalNotice',
246
256
  header: i18next.t('field.gan'),
247
- imex: { header: i18next.t('field.arrivalNotice'), key: 'arrivalNotice.name', width: 25, type: 'string' },
257
+ imex: { header: i18next.t('field.gan'), key: 'arrivalNotice', width: 25, type: 'string' },
248
258
  sortable: true,
249
259
  width: 180
250
260
  },
@@ -268,7 +278,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
268
278
  type: 'datetime',
269
279
  name: 'updatedAt',
270
280
  header: i18next.t('field.updated_at'),
271
- imex: { header: i18next.t('field.updated_at'), key: 'updatedAt', width: 25, type: 'datetime' },
281
+ imex: { header: i18next.t('field.updated_at'), key: 'updatedAt', width: 25, type: 'date' },
272
282
  sortable: true,
273
283
  width: 160
274
284
  },
@@ -276,7 +286,7 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
276
286
  type: 'object',
277
287
  name: 'updater',
278
288
  header: i18next.t('field.updater'),
279
- imex: { header: i18next.t('field.updater'), key: 'updater.name', width: 25, type: 'string' },
289
+ imex: { header: i18next.t('field.updater'), key: 'updater', width: 25, type: 'string' },
280
290
  sortable: true,
281
291
  width: 160
282
292
  }
@@ -440,7 +450,6 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
440
450
 
441
451
  var data = records.map(item => {
442
452
  return {
443
- id: item.id,
444
453
  ...this._columns
445
454
  .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
446
455
  .reduce((record, column) => {
@@ -451,11 +460,25 @@ class ReceivedNoteList extends localize(i18next)(PageView) {
451
460
  record[column.imex.key] = new Date(parseInt(record[column.imex.key])).toLocaleString()
452
461
  }
453
462
  return record
454
- }, {})
463
+ }, {}),
464
+ id: item.id,
465
+ name:item.name,
466
+ bizplace:item.bizplace.name,
467
+ refNo:item.refNo,
468
+ refNo2:item.refNo2,
469
+ refNo3:item.refNo3,
470
+ arrivalNotice:item.arrivalNotice.name,
471
+ ganStatus:item.ganStatus,
472
+ status:item.status,
473
+ updatedAt:item.updatedAt,
474
+ updater:item.updater.name
475
+
476
+
455
477
  }
456
478
  })
457
479
  return { header: headerSetting, data: data }
458
480
  }
481
+
459
482
  }
460
483
 
461
484
  window.customElements.define('received-note-list', ReceivedNoteList)
@@ -1202,10 +1202,14 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1202
1202
  this.matchDeliveryAddressInput.checked = false
1203
1203
  this.quickFindContent.currentTabKey = i18next.t('label.order')
1204
1204
 
1205
- // this.initProperties()
1205
+ this.initProperties()
1206
1206
  this._clearGristConditions()
1207
1207
  this._validateTransport()
1208
1208
  this._getAllPostCode()
1209
+
1210
+ if (this._exportOptionInput.checked === true && this._recallInput.checked === false) {
1211
+ this._exportOption = true
1212
+ }
1209
1213
  }
1210
1214
 
1211
1215
  async switchPickingType() {
@@ -1550,9 +1554,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1550
1554
  product: {
1551
1555
  id: record?.inventory?.productId,
1552
1556
  name: record?.inventory?.productName
1553
- },
1554
- productDetail: {
1555
- id: record?.inventory?.productDetailId
1556
1557
  }
1557
1558
  }
1558
1559
  }
@@ -1785,7 +1786,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1785
1786
  bundleId
1786
1787
  bundleQty
1787
1788
  productId
1788
- productDetailId
1789
1789
  productSku
1790
1790
  productName
1791
1791
  productDescription
@@ -2116,7 +2116,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2116
2116
  packingType: record?.inventory?.packingType,
2117
2117
  packingSize: record?.inventory?.packingSize,
2118
2118
  productId: record?.inventory?.productId,
2119
- productDetailId: record?.inventory?.productDetailId,
2120
2119
  groupType: record?.inventory?.groupType,
2121
2120
  releaseQty: record.releaseQty || 0,
2122
2121
  releaseUomValue: record.releaseUomValue || 0
@@ -2291,7 +2290,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2291
2290
  bundleReleaseDetail = bundleReleaseDetail.records.map(item => {
2292
2291
  return {
2293
2292
  product: { id: item.productId, name: item.productName },
2294
- productDetail: { id: item.productDetailId },
2295
2293
  batchId: item.batchId,
2296
2294
  packingType: item.packingType,
2297
2295
  packingSize: item.packingSize,
@@ -2328,17 +2326,11 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2328
2326
  id: record.inventory.productId,
2329
2327
  name: record.inventory.productName
2330
2328
  }
2331
- newRecord.productDetail = {
2332
- id: record.inventory.productDetailId
2333
- }
2334
2329
  } else {
2335
2330
  newRecord.product = {
2336
2331
  id: record.inventory.productId || record.inventory.product.id,
2337
2332
  name: record.inventory.productName || record.inventory.product.name
2338
2333
  }
2339
- newRecord.productDetail = {
2340
- id: record.inventory.productDetailId || record.inventory.productDetail.id
2341
- }
2342
2334
  newRecord.inventory = { id: record.id }
2343
2335
  }
2344
2336
 
@@ -2633,9 +2625,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2633
2625
  name
2634
2626
  description
2635
2627
  }
2636
- productDetail {
2637
- id
2638
- }
2639
2628
  }
2640
2629
  }
2641
2630
  }
@@ -2655,7 +2644,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2655
2644
  op.inventory = {
2656
2645
  batchId: op.batchId,
2657
2646
  productId: op.product.id,
2658
- productDetailId: op.productDetail.id,
2659
2647
  product: op.product,
2660
2648
  productName: op.product.name,
2661
2649
  palletId: i18next.t('label.cross_docking'),
@@ -2740,7 +2728,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2740
2728
  batchId
2741
2729
  batchIdRef
2742
2730
  productId
2743
- productDetailId
2744
2731
  productSKU
2745
2732
  productName
2746
2733
  remainQty
@@ -2757,7 +2744,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2757
2744
  batchId
2758
2745
  batchIdRef
2759
2746
  productId
2760
- productDetailId
2761
2747
  productSKU
2762
2748
  productName
2763
2749
  remainQty
@@ -2772,9 +2758,6 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2772
2758
  name
2773
2759
  sku
2774
2760
  }
2775
- productDetail {
2776
- id
2777
- }
2778
2761
  }
2779
2762
  }
2780
2763
  `,
@@ -356,7 +356,6 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
356
356
  { name: 'palletId', header: i18next.t('field.lot_id') },
357
357
  { name: 'cartonId', header: i18next.t('field.carton_id') },
358
358
  { name: 'product', type: 'object', queryName: 'products' },
359
- { name: 'productDetail', type: 'object', queryName: 'products', hidden: true },
360
359
  { name: 'batchId', header: i18next.t('field.batch_id') },
361
360
  {
362
361
  name: 'location',
@@ -847,7 +846,6 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
847
846
  } else {
848
847
  newRecord.product = { id: record.inventory.product.id, name: record.inventory.product.name }
849
848
  newRecord.inventory = { id: record.id }
850
- newRecord.productDetail = { id: record.inventory.productDetail.id }
851
849
  }
852
850
 
853
851
  return newRecord
@@ -867,14 +865,13 @@ export class ReleaseExtraProductPopup extends localize(i18next)(LitElement) {
867
865
  status: ORDER_INVENTORY_STATUS.PENDING.value
868
866
  }
869
867
 
870
- if (record.isCrossDocking) existRecord.crossDocking = true
868
+ if (record.isCrossDocking) newRecord.crossDocking = true
871
869
 
872
870
  if (this._pickingStd === PICKING_STANDARD.SELECT_BY_PRODUCT.value) {
873
871
  existRecord.product = { id: record.inventory.productId, name: record.inventory.productName }
874
872
  } else {
875
873
  existRecord.product = { id: record.inventory.product.id, name: record.inventory.product.name }
876
874
  existRecord.inventory = { id: record.id }
877
- existRecord.productDetail = { id: record.inventory.productDetail.id }
878
875
  }
879
876
 
880
877
  return existRecord
@@ -1270,9 +1270,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1270
1270
  name
1271
1271
  description
1272
1272
  }
1273
- productDetail {
1274
- id
1275
- }
1276
1273
  productName
1277
1274
  packingType
1278
1275
  packingSize
@@ -1359,7 +1356,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1359
1356
  name: inventoryInfo.name,
1360
1357
  palletId: inventoryInfo.palletId,
1361
1358
  product: inventoryInfo.product,
1362
- productDetail: inventoryInfo.productDetail,
1363
1359
  batchId: inventoryInfo.batchId,
1364
1360
  batchIdRef: inventoryInfo.batchIdRef,
1365
1361
  location: inventoryInfo.location,
@@ -1920,7 +1916,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1920
1916
  this._validateForm()
1921
1917
 
1922
1918
  let releaseOrder = this._getFormInfo()
1923
-
1924
1919
  delete releaseOrder.warehouseTransport
1925
1920
  delete releaseOrder.bizplaceId
1926
1921
  delete releaseOrder.bizplaceName
@@ -1928,25 +1923,6 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
1928
1923
  delete releaseOrder.ganNo
1929
1924
  delete releaseOrder.recall
1930
1925
 
1931
- let formChanged
1932
- for (const key in releaseOrder) {
1933
- if (releaseOrder.hasOwnProperty(key) && releaseOrder[key] !== this._releaseOrder[key]) {
1934
- if (
1935
- !(
1936
- (releaseOrder[key] == '' || releaseOrder[key] == null) &&
1937
- (this._releaseOrder[key] == '' || this._releaseOrder[key] == null)
1938
- )
1939
- ) {
1940
- formChanged = true
1941
- break
1942
- }
1943
- }
1944
- }
1945
-
1946
- if (!formChanged) {
1947
- throw new Error(i18next.t('text.there_is_nothing_changed'))
1948
- }
1949
-
1950
1926
  let shippingOrderInfo = {}
1951
1927
 
1952
1928
  let contactPointInfo = this._serializeForm(this.shippingInfoForm)
@@ -301,10 +301,6 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
301
301
  }
302
302
  }
303
303
 
304
- get _document() {
305
- return this.shadowRoot.querySelector('#uploadDocument')
306
- }
307
-
308
304
  pageInitialized() {
309
305
  this._configureInventoryGrist()
310
306
  }
@@ -796,7 +792,6 @@ class CreateReturnOrder extends localize(i18next)(PageView) {
796
792
  status: ORDER_INVENTORY_STATUS.PENDING.value
797
793
  }
798
794
  newRecord.product = { id: record?.productId, name: record?.productName }
799
- newRecord.productDetail = { id: record?.productDetailId }
800
795
  newRecord.inventory = { id: record.id }
801
796
  return newRecord
802
797
  })
@@ -247,7 +247,6 @@ class ReturnOrderInventoryPopup extends localize(i18next)(LitElement) {
247
247
  releaseUomValue
248
248
  palletId
249
249
  productId
250
- productDetailId
251
250
  releaseGoodName
252
251
  }
253
252
  total