@things-factory/operato-wms 4.3.452 → 4.3.456

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.
@@ -448,8 +448,10 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
448
448
 
449
449
  let response = await client.mutate({
450
450
  mutation: gql`
451
- mutation generateReleaseGoodsFromDraft($releaseInfo: [DraftReleaseGoodInfos!]!) {
452
- generateReleaseGoodsFromDraft(releaseInfo: $releaseInfo)
451
+ mutation generateReleaseGoodsfromDraft($releaseInfo: [DraftReleaseGoodInfos!]!) {
452
+ generateReleaseGoodsfromDraft(releaseInfo: $releaseInfo) {
453
+ draftName
454
+ }
453
455
  }
454
456
  `,
455
457
  variables: {
@@ -459,6 +461,7 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
459
461
 
460
462
  if (!response.errors) {
461
463
  this.dataGrist.fetch()
464
+
462
465
  this._showToast({ message: i18next.t('text.release_order(s)_has_been_generated') })
463
466
  }
464
467
  } catch (e) {
@@ -489,7 +492,7 @@ class DraftReleaseGoodList extends localize(i18next)(PageView) {
489
492
  selectedOrders = selectedGristData.filter(itm => selectedStatuses.includes(itm.status))
490
493
 
491
494
  if (submittedOrders) {
492
- this._showToast({message:i18next.t('text.submitted_draft_orders_will_not_be_displayed')})
495
+ this._showToast({ message: i18next.t('text.submitted_draft_orders_will_not_be_displayed') })
493
496
  }
494
497
 
495
498
  if (selectedOrders.length < 1) {
@@ -5,21 +5,40 @@ import '../print-airway-bill-popup'
5
5
  import '../../../outbound/generate-worksheet-popup'
6
6
 
7
7
  import gql from 'graphql-tag'
8
- import { css, html } from 'lit-element'
8
+ import {
9
+ css,
10
+ html
11
+ } from 'lit-element'
9
12
  import { connect } from 'pwa-helpers/connect-mixin'
10
13
 
11
14
  import { GhostPrint } from '@operato/ghost-print'
12
15
  import { DirectPrinter } from '@things-factory/barcode-base'
13
16
  import { getCodeByName } from '@things-factory/code-base'
14
- import { i18next, localize } from '@things-factory/i18n-base'
17
+ import {
18
+ i18next,
19
+ localize
20
+ } from '@things-factory/i18n-base'
15
21
  import { openPopup } from '@things-factory/layout-base'
16
- import { client, navigate, PageView, store } from '@things-factory/shell'
17
- import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
18
- import { isMobileDevice, sleep } from '@things-factory/utils'
22
+ import {
23
+ client,
24
+ navigate,
25
+ PageView,
26
+ store
27
+ } from '@things-factory/shell'
28
+ import {
29
+ CommonButtonStyles,
30
+ ScrollbarStyles
31
+ } from '@things-factory/styles'
32
+ import {
33
+ isMobileDevice,
34
+ sleep
35
+ } from '@things-factory/utils'
19
36
 
20
37
  import { fetchSettingRule } from '../../../../fetch-setting-value'
21
- import { INTENALIZED_AWB_SETTING_KEY, ORDER_STATUS } from '../../../constants'
22
- import { error } from 'console'
38
+ import {
39
+ INTENALIZED_AWB_SETTING_KEY,
40
+ ORDER_STATUS
41
+ } from '../../../constants'
23
42
 
24
43
  const HEADER_JSON = {
25
44
  'Content-Type': 'application/json',
@@ -404,6 +423,14 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
404
423
  sortable: true,
405
424
  width: 100
406
425
  },
426
+ {
427
+ type: 'boolean',
428
+ name: 'codOption',
429
+ header: i18next.t('field.cod'),
430
+ imex: { header: i18next.t('field.cod'), key: 'codOption', width: 20, type: 'string' },
431
+ sortable: true,
432
+ width: 100
433
+ },
407
434
  {
408
435
  type: 'string',
409
436
  name: 'transporter',
@@ -622,6 +649,7 @@ class B2cOrderRequests extends connect(store)(localize(i18next)(PageView)) {
622
649
  airwayBill
623
650
  trackingNo
624
651
  lmdOption
652
+ codOption
625
653
  priorityDelivery
626
654
  platformCode
627
655
  }
@@ -41,6 +41,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
41
41
  static get properties() {
42
42
  return {
43
43
  _isLmd: Boolean,
44
+ _isCod: Boolean,
45
+ _paidAmount: Number,
44
46
  _userType: String,
45
47
  _userRoles: Array,
46
48
  _releaseOrderNo: String,
@@ -290,6 +292,14 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
290
292
  ?disabled="${true}"
291
293
  />
292
294
  <label for="ownTransport">${i18next.t('label.lmd')}</label>
295
+
296
+ <input
297
+ type="checkbox"
298
+ name="codOption"
299
+ ?checked="${this._isCod}"
300
+ ?disabled="${true}"
301
+ />
302
+ <label for="isCod">${i18next.t('label.cod')}</label>
293
303
  </div>
294
304
 
295
305
  <label>${i18next.t('label.company')}</label>
@@ -305,7 +315,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
305
315
  <input name="refNo3" ?readonly="${!this?._editable}" />
306
316
 
307
317
  <label>${i18next.t('label.release_date')}</label>
308
- <input name="releaseDate" type="date" ?readonly="${!this?._editable}" min="${this._getStdDate()}" />
318
+ <input name="releaseDate" type="date" ?readonly="${!this?._editable}" />
309
319
 
310
320
  <label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
311
321
  <input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
@@ -317,6 +327,9 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
317
327
  ?readonly="${!this?._editable || this._manifestedAt == true}"
318
328
  />
319
329
 
330
+ <label ?hidden="${!this?._isCod}">${i18next.t('label.paid_amount')} </label>
331
+ <input name="paidAmount" type="number" ?hidden="${!this?._isCod}" ?readonly="${!this?._editable}" min="0"/>
332
+
320
333
  ${this._crossDocking
321
334
  ? html`
322
335
  <label for="ganNo">${i18next.t('label.arrival_notice')}</label>
@@ -823,6 +836,10 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
823
836
  return this.shadowRoot?.querySelector('input[name=attentionTo]')
824
837
  }
825
838
 
839
+ get paidAmountInput () {
840
+ return this.shadowRoot?.querySelector('input[name=paidAmount]')
841
+ }
842
+
826
843
  async pageUpdated(changes) {
827
844
  if (this.active) {
828
845
  if (changes.resourceId) {
@@ -967,6 +984,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
967
984
  refNo2
968
985
  refNo3
969
986
  lmdOption
987
+ codOption
988
+ paidAmount
970
989
  crossDocking
971
990
  arrivalNotice {
972
991
  name
@@ -1097,7 +1116,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1097
1116
  }
1098
1117
  })
1099
1118
 
1100
- this._isLmd = response.data.lmdOption
1119
+ this._isLmd = response.data.releaseGoodDetail.lmdOption
1120
+ this._isCod = response.data.releaseGoodDetail.codOption
1101
1121
  this._roInfo = releaseOrder
1102
1122
  this.roType = releaseOrder.type
1103
1123
  this._orderMethod = releaseOrder.orderMethod
@@ -1195,7 +1215,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1195
1215
  this._awbAttachments = [releaseOrder && releaseOrder.awbAttachment]
1196
1216
  }
1197
1217
 
1198
- const nonEditableStatus = ['DONE', 'PACKING']
1218
+ const nonEditableStatus = ['DONE', 'PACKING', 'PICKING', 'READY_TO_PACK']
1199
1219
 
1200
1220
  if (!nonEditableStatus.includes(releaseOrder.status) && this.isUserBelongsDomain) {
1201
1221
  this._editable = true
@@ -1634,6 +1654,8 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1634
1654
 
1635
1655
  async _updateReleaseGoodDetails() {
1636
1656
  try {
1657
+ this._paidAmount = this.paidAmountInput
1658
+
1637
1659
  this._validateForm()
1638
1660
 
1639
1661
  let releaseOrder = this._getFormInfo()
@@ -1729,7 +1751,9 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1729
1751
  ...releaseOrder,
1730
1752
  id: this._releaseOrderId,
1731
1753
  name: this._releaseOrderNo,
1732
- ownTransport: this._importCargo ? true : this._ownTransport
1754
+ ownTransport: this._importCargo ? true : this._ownTransport,
1755
+ paidAmount: parseFloat(this.paidAmountInput.value)
1756
+
1733
1757
  },
1734
1758
  shippingOrder: this._exportOption ? this._serializeForm(this.exportInfoForm) : null,
1735
1759
  shippingOrderInfo: shippingOrderInfo ? shippingOrderInfo : null
@@ -1939,6 +1963,12 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1939
1963
  throw new Error(i18next.t('text.release_order_form_invalid'))
1940
1964
  }
1941
1965
 
1966
+ if (this._isCod) {
1967
+ if (!this._paidAmount.value) {
1968
+ throw new Error(i18next.t('text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order'))
1969
+ }
1970
+ }
1971
+
1942
1972
  if (this._isLmd) {
1943
1973
  const checkShipmentFields = (
1944
1974
  attentionToInput,
@@ -44,6 +44,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
44
44
  return {
45
45
  /* RO Form Fields */
46
46
  _isLmd: Boolean,
47
+ _isCod: Boolean,
47
48
  _isLmdExists: Boolean,
48
49
  _ownTransport: Boolean,
49
50
  _warehouseTransport: Boolean,
@@ -53,6 +54,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
53
54
  refNo2: String,
54
55
  refNo3: String,
55
56
  releaseDate: Date,
57
+ _paidAmount: Number,
56
58
  collectionOrderNo: String,
57
59
  _bizplaces: Object,
58
60
  _bizplaceId: String,
@@ -321,7 +323,18 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
321
323
  this._isLmd = e.currentTarget.checked
322
324
  }}"
323
325
  />
324
- <label for="lmd" ?hidden="${this._importedOrder}">${i18next.t('label.lmd')}</label>
326
+ <label for="lmd">${i18next.t('label.lmd')}</label>
327
+
328
+ <input
329
+ id="codOption"
330
+ type="checkbox"
331
+ name="codOption"
332
+ ?checked="${this._isCod}"
333
+ @change="${e => {
334
+ this._isCod = e.currentTarget.checked
335
+ }}"
336
+ />
337
+ <label for="cod">${i18next.t('label.cod')}</label>
325
338
  </div>
326
339
 
327
340
  <label>${i18next.t('label.company')}</label>
@@ -353,6 +366,15 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
353
366
 
354
367
  @change="${this._validateDate}"
355
368
  />
369
+
370
+ <label ?hidden="${!this._isCod}">${i18next.t('label.paid_amount')}</label>
371
+ <input
372
+ name="paidAmount"
373
+ type="number"
374
+ ?hidden="${!this._isCod}"
375
+ min="0"
376
+ />
377
+
356
378
  ${
357
379
  this._crossDocking
358
380
  ? html`
@@ -712,6 +734,10 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
712
734
  return this.shadowRoot?.querySelector('quick-find-content[name=quickFindContent]')
713
735
  }
714
736
 
737
+ get paidAmountInput() {
738
+ return this.shadowRoot?.querySelector('input[name=paidAmount]')
739
+ }
740
+
715
741
  constructor() {
716
742
  super()
717
743
  this.initProperties()
@@ -846,6 +872,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
846
872
  }
847
873
 
848
874
  initProperties() {
875
+ this._paidAmount = ''
849
876
  this._exportOption = false
850
877
  this.refNo = ''
851
878
  this.refNo2 = ''
@@ -1384,6 +1411,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
1384
1411
 
1385
1412
  async _generateReleaseOrder() {
1386
1413
  try {
1414
+ this._paidAmount = this.paidAmountInput
1387
1415
  this._validateForm()
1388
1416
  this._validateInventories()
1389
1417
 
@@ -1437,6 +1465,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
1437
1465
  releaseGood.lmdOption = this._isLmd
1438
1466
  releaseGood.courierOption = true
1439
1467
  releaseGood.packingOption = true
1468
+ releaseGood.paidAmount = parseFloat(this._paidAmount.value)
1440
1469
 
1441
1470
  delete releaseGood.bizplaceId
1442
1471
  delete releaseGood.bizplaceName
@@ -1514,7 +1543,13 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
1514
1543
  if (!this.releaseOrderForm.checkValidity()) {
1515
1544
  throw new Error(i18next.t('text.release_order_form_invalid'))
1516
1545
  }
1517
-
1546
+
1547
+ if (this._isCod) {
1548
+ if (!this._paidAmount.value) {
1549
+ throw new Error(i18next.t('text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order'))
1550
+ }
1551
+ }
1552
+
1518
1553
  if (this._isLmd) {
1519
1554
  const checkShipmentFields = (
1520
1555
  attentionToInput,
@@ -12,14 +12,26 @@ import '../../order/vas-order/popup/vas-target-product-popup'
12
12
  import '../../order/vas-order/popup/select-vas-popup'
13
13
 
14
14
  import gql from 'graphql-tag'
15
- import { css, html } from 'lit-element'
15
+ import {
16
+ css,
17
+ html
18
+ } from 'lit-element'
16
19
  import { connect } from 'pwa-helpers/connect-mixin'
17
20
 
18
21
  import { getCodeByName } from '@things-factory/code-base'
19
22
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
20
- import { i18next, localize } from '@things-factory/i18n-base'
23
+ import {
24
+ i18next,
25
+ localize
26
+ } from '@things-factory/i18n-base'
21
27
  import { openPopup } from '@things-factory/layout-base'
22
- import { client, CustomAlert, navigate, PageView, store } from '@things-factory/shell'
28
+ import {
29
+ client,
30
+ CustomAlert,
31
+ navigate,
32
+ PageView,
33
+ store
34
+ } from '@things-factory/shell'
23
35
  import { CommonButtonStyles } from '@things-factory/styles'
24
36
  import { isMobileDevice } from '@things-factory/utils'
25
37
 
@@ -452,7 +464,7 @@ class ReleaseOrderDetail extends connect(store)(localize(i18next)(PageView)) {
452
464
  <input name="refNo3" ?readonly="${!this?._editable}" />
453
465
 
454
466
  <label>${i18next.t('label.release_date')}</label>
455
- <input name="releaseDate" type="date" ?readonly="${!this?._editable}" min="${this._getStdDate()}" />
467
+ <input name="releaseDate" type="date" ?readonly="${!this?._editable}"/>
456
468
 
457
469
  <label ?hidden="${!this._ownTransport}">${i18next.t('label.co_no')}</label>
458
470
  <input name="collectionOrderNo" ?hidden="${!this._ownTransport}" ?readonly="${!this?._editable}" />
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 15 April Update
6
6
 
7
- #### V4.3.450 Release Note
7
+ #### V4.3.452 Release Note
8
8
 
9
9
  #### Greetings to all,
10
10
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  <br>
21
21
  For additional information about the aspects of the release, see the following link
22
- <a href="https://shorturl.at/qATU6">V4.3.450 Release Note</a>
22
+ <a href="https://shorturl.at/hsFI2">V4.3.452 Release Note</a>
23
23
  <br>
24
24
 
25
25
  Should you have any inquiries, feel free to contact <a href="mailto: support@hatio.asia">support@hatio.asia</a>! Stay safe and positively negative!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-wms",
3
- "version": "4.3.452",
3
+ "version": "4.3.456",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -91,7 +91,7 @@
91
91
  "@things-factory/print-ui": "^4.3.434",
92
92
  "@things-factory/product-base": "^4.3.452",
93
93
  "@things-factory/resource-ui": "^4.3.452",
94
- "@things-factory/sales-ui": "^4.3.452",
94
+ "@things-factory/sales-ui": "^4.3.456",
95
95
  "@things-factory/scene-data-transform": "^4.3.381",
96
96
  "@things-factory/scene-excel": "^4.3.381",
97
97
  "@things-factory/scene-firebase": "^4.3.381",
@@ -108,7 +108,7 @@
108
108
  "@things-factory/transport-base": "^4.3.452",
109
109
  "@things-factory/tutorial-ui": "^4.3.452",
110
110
  "@things-factory/warehouse-base": "^4.3.452",
111
- "@things-factory/worksheet-base": "^4.3.452"
111
+ "@things-factory/worksheet-base": "^4.3.456"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@things-factory/builder": "^4.3.381",
@@ -117,5 +117,5 @@
117
117
  "cypress-localstorage-commands": "^1.6.1",
118
118
  "eslint-plugin-cypress": "^2.12.1"
119
119
  },
120
- "gitHead": "59cbeb74b3c12169baa9e76723e0952b26486d4e"
120
+ "gitHead": "d46f0de8f4442e965db2b51e51e672a0dad79899"
121
121
  }
@@ -232,6 +232,7 @@
232
232
  "field.closing_qty": "closing qty",
233
233
  "field.closing_volume": "closing volume",
234
234
  "field.closing": "closing",
235
+ "field.cod": "COD",
235
236
  "field.cogs_account_code": "COGS account code",
236
237
  "field.column": "column",
237
238
  "field.combination": "combination",
@@ -787,6 +788,7 @@
787
788
  "label.claim": "claim",
788
789
  "label.closed": "closed",
789
790
  "label.co_no": "CO number",
791
+ "label.cod": "COD",
790
792
  "label.collection_date_time": "collection date time",
791
793
  "label.collection_date": "collection date",
792
794
  "label.collection_order": "collection order",
@@ -985,6 +987,7 @@
985
987
  "label.packing_type": "packing type",
986
988
  "label.packing_unit": "packing unit",
987
989
  "label.packing": "packing",
990
+ "label.paid_amount": "paid amount",
988
991
  "label.pallet_id": "pallet id",
989
992
  "label.pallet_qty": "pallet qty",
990
993
  "label.pallet_ref_no": "pallet ref no",
@@ -1509,6 +1512,7 @@
1509
1512
  "text.owner_field_is_empty": "owner field is empty",
1510
1513
  "text.pack_qty_and_unit_price_will_be_updated_to_1_if_the_value_is_empty_or_0": "pack qty and unit price will be updated to 1 if the value is empty or 0",
1511
1514
  "text.packing_is_completed": "packing is completed",
1515
+ "text.paid_amount_is_empty_please_fill_in_the_data_to_proceed_creating_order": "paid amount is empty. please fill in the data to proceed creating order",
1512
1516
  "text.pallet_(x)_is_not_found_in_cycle_count_worksheet_(y)": "pallet ({x}) is not found in cycle count worksheet ({y})",
1513
1517
  "text.pallet_is_in_progressing": "pallet is in progressing",
1514
1518
  "text.pallet_name(s)_is_already_existed": "pallet name(s) is already existed",