@things-factory/operato-wms 4.3.562 → 4.3.566

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.
@@ -6,18 +6,38 @@ import '../../../components/select-inventory-popup'
6
6
  import '../../../components/select-product-popup'
7
7
 
8
8
  import gql from 'graphql-tag'
9
- import { css, html } from 'lit-element'
9
+ import {
10
+ css,
11
+ html
12
+ } from 'lit-element'
10
13
 
11
14
  import { getCodeByName } from '@things-factory/code-base'
12
- import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
13
- import { i18next, localize } from '@things-factory/i18n-base'
15
+ import {
16
+ MultiColumnFormStyles,
17
+ SingleColumnFormStyles
18
+ } from '@things-factory/form-ui'
19
+ import {
20
+ i18next,
21
+ localize
22
+ } from '@things-factory/i18n-base'
14
23
  import { openPopup } from '@things-factory/layout-base'
15
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
24
+ import {
25
+ client,
26
+ CustomAlert,
27
+ navigate,
28
+ PageView
29
+ } from '@things-factory/shell'
16
30
  import { CommonButtonStyles } from '@things-factory/styles'
17
31
  import { isMobileDevice } from '@things-factory/utils'
18
32
 
19
33
  import { fetchSettingRule } from '../../../../fetch-setting-value'
20
- import { GROUP_TYPES, ORDER_INVENTORY_STATUS, ORDER_TYPES, PICKING_STANDARD, RO_TYPES } from '../../../constants'
34
+ import {
35
+ GROUP_TYPES,
36
+ ORDER_INVENTORY_STATUS,
37
+ ORDER_TYPES,
38
+ PICKING_STANDARD,
39
+ RO_TYPES
40
+ } from '../../../constants'
21
41
 
22
42
  class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
23
43
  static get properties() {
@@ -240,6 +260,48 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
240
260
  margin: 0;
241
261
  }
242
262
  }
263
+
264
+ .header-with-checkbox {
265
+ display: flex;
266
+ align-self: flex-end;
267
+ align-items: center;
268
+ grid-column: span 36 / auto !important;
269
+ text-align: left !important;
270
+ margin-top: 10px !important;
271
+ font-weight: 600 !important;
272
+ margin-right: 2px; /* Spacing between header and checkbox */
273
+ }
274
+
275
+ .checkbox-container label {
276
+ margin-left: 1px;
277
+ }
278
+
279
+ .checkbox-wrapper{
280
+ margin-top: 10px;
281
+ }
282
+
283
+ .checkbox-wrapper::before {
284
+ content: "("; /* Left bracket */
285
+ margin-left: 2em;
286
+ font-size: 0.9em; /* Adjust size as needed */
287
+ font-weight: 100 !important;
288
+ }
289
+
290
+ .checkbox-wrapper::after {
291
+ content: ")"; /* Right bracket */
292
+ margin-left: 1em; /* Space between bracket and checkbox */
293
+ font-size: 0.9em; /* Adjust size as needed */
294
+ font-weight: 100 !important;
295
+ }
296
+
297
+ .checkbox-wrapper input[type='checkbox'] {
298
+ width: 10px;
299
+ height: 10px;
300
+ }
301
+
302
+ #matchDeliveryAddress {
303
+ margin-top: 5px !important;
304
+ }
243
305
  `
244
306
  ]
245
307
  }
@@ -401,19 +463,49 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
401
463
 
402
464
  <label>${i18next.t('label.attention_to')}</label>
403
465
  <input name="attentionTo" required .value="${this._attentionTo}" />
466
+
467
+ <label>${i18next.t('label.contact')}</label>
468
+ <input name="phone1" required .value="${this._deliveryContact}" />
469
+
404
470
  <!-- delivery -->
405
- <label class="section-header">${i18next.t('label.delivery_address')}</label>
471
+ <!-- <label class="section-header">${i18next.t('label.delivery_address')}</label> -->
472
+
473
+ <div class="header-with-checkbox">
474
+ <label class="section-header">${i18next.t('label.delivery_address')}</label>
475
+ <div class="checkbox-wrapper">
476
+ <input type="checkbox" id="matchDeliveryAddress" name="matchDeliveryAddressInput"
477
+ @click=${e => {
478
+ e.currentTarget.checked ? (this._disableBillingAddress = true) : (this._disableBillingAddress = false)
479
+ }} />
480
+ <label for="matchDeliveryAddress">${i18next.t('label.use_as_billing_address')}</label>
481
+ </div>
482
+ </div>
483
+
484
+ <label>${i18next.t("label.delivery_address_1")}</label>
485
+ <textarea name="deliveryAddress1" required .value="${this._deliveryAddress1}"></textarea>
486
+
487
+ <label>${i18next.t("label.delivery_address_2")}</label>
488
+ <textarea name="deliveryAddress2" required .value="${this._deliveryAddress2}"></textarea>
489
+
490
+ <label>${i18next.t("label.delivery_address_3")}</label>
491
+ <textarea name="deliveryAddress3" required .value="${this._deliveryAddress3}"></textarea>
492
+
493
+ <label>${i18next.t("label.delivery_address_4")}</label>
494
+ <textarea name="deliveryAddress4" required .value="${this._deliveryAddress4}"></textarea>
495
+
496
+ <label>${i18next.t("label.delivery_address_5")}</label>
497
+ <textarea name="deliveryAddress5" required .value="${this._deliveryAddress5}"></textarea>
406
498
 
407
499
  <label>${i18next.t('label.country')}</label>
408
500
  <select
409
- name="country"
410
- @change=${e => {
411
- this._validateCountry(e)
412
- }}
413
- >
414
- ${this._allCountry?.map(
415
- (country, key) => html`<option value=${country.description}>${country.name}</option>`
416
- )}
501
+ name="country"
502
+ @change=${e => {
503
+ this._validateCountry(e)
504
+ }}
505
+ >
506
+ ${this._allCountry?.map(
507
+ (country, key) => html`<option value=${country.description}>${country.name}</option>`
508
+ )}
417
509
  </select>
418
510
 
419
511
 
@@ -445,18 +537,27 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
445
537
  <label>${i18next.t('label.city')}</label>
446
538
  <input name="city" required .value="${this._deliveryCity}" />
447
539
 
448
- <label>${i18next.t('label.delivery_address')}</label>
449
- <textarea name="deliveryAddress1" required .value="${this._deliveryFullAddress}"></textarea>
540
+ <!-- billing -->
450
541
 
451
- <label>${i18next.t('label.contact')}</label>
452
- <input name="phone1" required .value="${this._deliveryContact}" />
542
+ <label ?hidden=${this._disableBillingAddress} class="section-header">${i18next.t('label.billing_address')}</label>
453
543
 
544
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_1')}</label>
545
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress" required .value="${this._billingAddress}"></textarea>
454
546
 
455
- <!-- billing -->
456
- <label class="section-header">${i18next.t('label.billing_address')}</label>
547
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_2')}</label>
548
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress2" required .value="${this._billingAddress2}"></textarea>
549
+
550
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_3')}</label>
551
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress3" required .value="${this._billingAddress3}"></textarea>
457
552
 
458
- <label>${i18next.t('label.country')}</label>
459
- <select
553
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_4')}</label>
554
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress4" required .value="${this._billingAddress4}"></textarea>
555
+
556
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_5')}</label>
557
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress5" required .value="${this._billingAddress5}"></textarea>
558
+
559
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.country')}</label>
560
+ <select ?hidden=${this._disableBillingAddress}
460
561
  name="billingCountry"
461
562
  ?disabled=${this._disableBillingAddress ? true : false}
462
563
  @change=${e => {
@@ -466,19 +567,18 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
466
567
  ${this._allCountry?.map((country, key) => html`<option value=${country.description}>${country.name}</option>`)}
467
568
  </select>
468
569
 
469
- <label>${i18next.t('label.zip_postal_code')}</label>
470
-
570
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.zip_postal_code')}</label>
471
571
  ${
472
572
  this._switchBillingCountryInput
473
573
  ? html`
474
- <input
574
+ <input ?hidden=${this._disableBillingAddress}
475
575
  ?disabled=${this._disableBillingAddress ? true : false}
476
576
  name="billingPostalCode"
477
577
  required
478
578
  .value=""
479
579
  />
480
580
  `
481
- : html`<select
581
+ : html`<select ?hidden=${this._disableBillingAddress}
482
582
  ?disabled=${this._disableBillingAddress ? true : false}
483
583
  name="billingPostalCode"
484
584
  @change=${e => {
@@ -494,27 +594,25 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
494
594
  </select>`
495
595
  }
496
596
 
497
- <label>${i18next.t('label.state')}</label>
498
- <input ?disabled=${this._disableBillingAddress ? true : false} name="billingState" required
597
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.state')}</label>
598
+ <input ?hidden=${this._disableBillingAddress} name="billingState" required
499
599
  .value="${this._billingState}" />
500
600
 
501
- <label>${i18next.t('label.city')}</label>
502
- <input ?disabled=${this._disableBillingAddress ? true : false} name="billingCity" required
601
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.city')}</label>
602
+ <input ?hidden=${this._disableBillingAddress} ?disabled=${this._disableBillingAddress ? true : false} name="billingCity" required
503
603
  .value="${this._billingCity}" />
504
604
 
505
- <label>${i18next.t('label.billing_address')}</label>
605
+ <!-- <label>${i18next.t('label.billing_address')}</label>
506
606
  <textarea ?disabled=${this._disableBillingAddress ? true : false} name="billingAddress" required
507
607
  .value="${this._billingFullAddress}"></textarea>
508
608
 
509
609
  <input type="checkbox" id="matchDeliveryAddress" name="matchDeliveryAddressInput" @click=${e => {
510
610
  e.currentTarget.checked ? (this._disableBillingAddress = true) : (this._disableBillingAddress = false)
511
611
  }} />
512
- <label for="matchDeliveryAddress">${i18next.t('label.match_delivery_address')}</label>
513
-
514
-
612
+ <label for="matchDeliveryAddress">${i18next.t('label.match_delivery_address')}</label> -->
515
613
  </form>
516
614
 
517
- <div class="container">
615
+ <div class="container" ?hidden=${!this._showShippingInfo}>
518
616
 
519
617
  <div class="grist">
520
618
 
@@ -723,6 +821,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
723
821
  this.initProperties()
724
822
  this._getAllPostCode()
725
823
  this.fetchCountry()
824
+ this._disableBillingAddress = true
726
825
  this._pickingStd = PICKING_STANDARD.SELECT_BY_PRODUCT.value
727
826
  this._bundleSettingData = []
728
827
  }
@@ -784,7 +883,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
784
883
  this.checkActiveLmd()
785
884
 
786
885
  this.quickFindContent.currentTabKey = i18next.t('label.order')
787
- this._disableBillingAddress = false
886
+ this._disableBillingAddress = true
788
887
  this._enableTransportationServiceSetting = enableTransportationServiceSetting
789
888
  this._bizplaces = bizplaces
790
889
  this.packingTypes = packingTypes
@@ -874,7 +973,16 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
874
973
  this._companyName = ''
875
974
  this._deliveryState = ''
876
975
  this._deliveryCity = ''
877
- this._deliveryFullAddress = ''
976
+ this._deliveryAddress1 = ''
977
+ this._deliveryAddress2 = ''
978
+ this._deliveryAddress3 = ''
979
+ this._deliveryAddress4 = ''
980
+ this._deliveryAddress5 = ''
981
+ this._billingAddress = ''
982
+ this._billingAddress2 = ''
983
+ this._billingAddress3 = ''
984
+ this._billingAddress4 = ''
985
+ this._billingAddress5 = ''
878
986
  this._deliveryContact = ''
879
987
  this._billingState = ''
880
988
  this._billingCity = ''
@@ -892,7 +1000,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
892
1000
 
893
1001
  resetPage() {
894
1002
  this.bundleData = {}
895
- this.matchDeliveryAddressInput.checked = false
1003
+ this.matchDeliveryAddressInput.checked = true
896
1004
  this.quickFindContent.currentTabKey = i18next.t('label.order')
897
1005
 
898
1006
  // this.initProperties()
@@ -1421,7 +1529,12 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
1421
1529
  // If match delivery address is ticked, all the billing address info will be the same with delivery address info
1422
1530
  if (this._disableBillingAddress) {
1423
1531
  shippingOrderInfo.billingAddress = shippingOrderInfo.deliveryAddress1
1532
+ shippingOrderInfo.billingAddress2 = shippingOrderInfo.deliveryAddress2
1533
+ shippingOrderInfo.billingAddress3 = shippingOrderInfo.deliveryAddress3
1534
+ shippingOrderInfo.billingAddress4 = shippingOrderInfo.deliveryAddress4
1535
+ shippingOrderInfo.billingAddress5 = shippingOrderInfo.deliveryAddress5
1424
1536
  shippingOrderInfo.billingPostalCode = shippingOrderInfo.postalCode
1537
+ shippingOrderInfo.billingCountry = shippingOrderInfo.country
1425
1538
  shippingOrderInfo.billingCity = shippingOrderInfo.city
1426
1539
  shippingOrderInfo.billingState = shippingOrderInfo.state
1427
1540
  }
@@ -1632,7 +1745,7 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
1632
1745
  // )
1633
1746
  // }
1634
1747
  // }
1635
- if (!this.billingAddressInput.value && !this.matchDeliveryAddressInput.checked) {
1748
+ if (!this._disableBillingAddress && !this.billingAddressInput.value && !this.matchDeliveryAddressInput.checked ) {
1636
1749
  throw new Error(i18next.t('text.billing_address_is_empty_please_fill_in_the_data_before_proceed_create_order'))
1637
1750
  }
1638
1751
  }
@@ -2382,4 +2495,4 @@ class CreateB2CReleaseOrder extends localize(i18next)(PageView) {
2382
2495
  )
2383
2496
  }
2384
2497
  }
2385
- window.customElements.define('create-b2c-release-order', CreateB2CReleaseOrder)
2498
+ window.customElements.define('create-b2c-release-order', CreateB2CReleaseOrder)
@@ -10,13 +10,27 @@ import '../../order/vas-order/popup/vas-target-product-popup'
10
10
  import '../../order/vas-order/popup/select-vas-popup'
11
11
 
12
12
  import gql from 'graphql-tag'
13
- import { css, html } from 'lit-element'
13
+ import {
14
+ css,
15
+ html
16
+ } from 'lit-element'
14
17
 
15
18
  import { getCodeByName } from '@things-factory/code-base'
16
- import { MultiColumnFormStyles, SingleColumnFormStyles } from '@things-factory/form-ui'
17
- import { i18next, localize } from '@things-factory/i18n-base'
19
+ import {
20
+ MultiColumnFormStyles,
21
+ SingleColumnFormStyles
22
+ } from '@things-factory/form-ui'
23
+ import {
24
+ i18next,
25
+ localize
26
+ } from '@things-factory/i18n-base'
18
27
  import { openPopup } from '@things-factory/layout-base'
19
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
28
+ import {
29
+ client,
30
+ CustomAlert,
31
+ navigate,
32
+ PageView
33
+ } from '@things-factory/shell'
20
34
  import { CommonButtonStyles } from '@things-factory/styles'
21
35
  import { isMobileDevice } from '@things-factory/utils'
22
36
 
@@ -287,6 +301,54 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
287
301
  margin: 0;
288
302
  }
289
303
  }
304
+
305
+ .new-line{
306
+ grid-column: span 12 / auto !important;
307
+ }
308
+
309
+ .header-with-checkbox {
310
+ display: flex;
311
+ align-self: flex-end;
312
+ align-items: center;
313
+ grid-column: span 36 / auto !important;
314
+ text-align: left !important;
315
+ margin-top: 10px !important;
316
+ font-weight: 600 !important;
317
+ margin-right: 2px; /* Spacing between header and checkbox */
318
+ }
319
+
320
+
321
+ .checkbox-container label {
322
+ margin-left: 1px;
323
+ }
324
+
325
+ .checkbox-wrapper{
326
+ margin-top: 10px;
327
+ }
328
+
329
+ .checkbox-wrapper::before {
330
+ content: "("; /* Left bracket */
331
+ margin-left: 1px;
332
+ font-size: 0.9em; /* Adjust size as needed */
333
+ font-weight: 100 !important;
334
+ }
335
+
336
+ .checkbox-wrapper::after {
337
+ content: ")"; /* Right bracket */
338
+ margin-left: 1em; /* Space between bracket and checkbox */
339
+ font-size: 0.9em; /* Adjust size as needed */
340
+ font-weight: 100 !important;
341
+ }
342
+
343
+ .checkbox-wrapper input[type='checkbox'] {
344
+ width: 10px;
345
+ height: 10px;
346
+ }
347
+
348
+ #matchDeliveryAddress {
349
+ margin-top: 5px !important;
350
+ }
351
+
290
352
  `
291
353
  ]
292
354
  }
@@ -554,8 +616,40 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
554
616
 
555
617
  <button type="button" @click="${this._openContactPointSelector.bind(this)}">import</button>
556
618
 
619
+ <label>&nbsp;</label>
620
+ <label>&nbsp;</label>
621
+ <label>&nbsp;</label>
622
+
623
+ <label>${i18next.t('label.contact')}</label>
624
+ <input name="phone1" required .value="${this._deliveryContact}" />
625
+
557
626
  <!-- delivery -->
558
- <label class="section-header">${i18next.t('label.delivery_address')}</label>
627
+ <div class="header-with-checkbox">
628
+ <label class="section-header">${i18next.t('label.delivery_address')}</label>
629
+ <div class="checkbox-wrapper">
630
+ <input type="checkbox" id="matchDeliveryAddress" name="matchDeliveryAddressInput"
631
+ @click=${e => {
632
+ e.currentTarget.checked ? (this._disableBillingAddress = true) : (this._disableBillingAddress = false)
633
+ }} />
634
+ <label for="matchDeliveryAddress">${i18next.t('label.use_as_billing_address')}</label>
635
+ </div>
636
+ </div>
637
+
638
+
639
+ <label>${i18next.t("label.address_1")}</label>
640
+ <textarea name="deliveryAddress1" required .value="${this._deliveryAddress1}"></textarea>
641
+
642
+ <label>${i18next.t("label.address_2")}</label>
643
+ <textarea name="deliveryAddress2" required .value="${this._deliveryAddress2}"></textarea>
644
+
645
+ <label>${i18next.t("label.address_3")}</label>
646
+ <textarea name="deliveryAddress3" required .value="${this._deliveryAddress3}"></textarea>
647
+
648
+ <label>${i18next.t("label.address_4")}</label>
649
+ <textarea name="deliveryAddress4" required .value="${this._deliveryAddress4}"></textarea>
650
+
651
+ <label>${i18next.t("label.address_5")}</label>
652
+ <textarea name="deliveryAddress5" required .value="${this._deliveryAddress5}"></textarea>
559
653
 
560
654
  <label>${i18next.t('label.country')}</label>
561
655
  <select
@@ -598,18 +692,26 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
598
692
  <label>${i18next.t('label.city')}</label>
599
693
  <input name="city" required .value="${this._deliveryCity}" />
600
694
 
601
- <label>${i18next.t('label.delivery_address')}</label>
602
- <textarea name="deliveryAddress1" required .value="${this._deliveryFullAddress}"></textarea>
695
+ <!-- billing -->
696
+ <label ?hidden=${this._disableBillingAddress} class="section-header">${i18next.t('label.billing_address')}</label>
697
+
698
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_1')}</label>
699
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress" required .value="${this._billingAddress}"></textarea>
603
700
 
604
- <label>${i18next.t('label.contact')}</label>
605
- <input name="phone1" required .value="${this._deliveryContact}" />
701
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_2')}</label>
702
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress2" required .value="${this._billingAddress2}"></textarea>
606
703
 
704
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_3')}</label>
705
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress3" required .value="${this._billingAddress3}"></textarea>
607
706
 
608
- <!-- billing -->
609
- <label class="section-header">${i18next.t('label.billing_address')}</label>
707
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_4')}</label>
708
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress4" required .value="${this._billingAddress4}"></textarea>
709
+
710
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.address_5')}</label>
711
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress5" required .value="${this._billingAddress5}"></textarea>
610
712
 
611
- <label>${i18next.t('label.country')}</label>
612
- <select
713
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.country')}</label>
714
+ <select ?hidden=${this._disableBillingAddress}
613
715
  name="billingCountry"
614
716
  ?disabled=${this._disableBillingAddress ? true : false}
615
717
  @change=${e => {
@@ -619,19 +721,19 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
619
721
  ${this._allCountry?.map((country, key) => html`<option value=${country.description}>${country.name}</option>`)}
620
722
  </select>
621
723
 
622
- <label>${i18next.t('label.zip_postal_code')}</label>
724
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.zip_postal_code')}</label>
623
725
 
624
- ${
726
+ ${
625
727
  this._switchBillingCountryInput
626
728
  ? html`
627
- <input
729
+ <input ?hidden=${this._disableBillingAddress}
628
730
  ?disabled=${this._disableBillingAddress ? true : false}
629
731
  name="billingPostalCode"
630
732
  required
631
733
  .value=""
632
734
  />
633
735
  `
634
- : html`<select
736
+ : html`<select ?hidden=${this._disableBillingAddress}
635
737
  ?disabled=${this._disableBillingAddress ? true : false}
636
738
  name="billingPostalCode"
637
739
  @change=${e => {
@@ -647,24 +749,14 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
647
749
  </select>`
648
750
  }
649
751
 
650
- <label>${i18next.t('label.state')}</label>
651
- <input ?disabled=${this._disableBillingAddress ? true : false} name="billingState" required
752
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.state')}</label>
753
+ <input ?hidden=${this._disableBillingAddress} name="billingState" required
652
754
  .value="${this._billingState}" />
653
755
 
654
- <label>${i18next.t('label.city')}</label>
655
- <input ?disabled=${this._disableBillingAddress ? true : false} name="billingCity" required
756
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.city')}</label>
757
+ <input ?hidden=${this._disableBillingAddress} ?disabled=${this._disableBillingAddress ? true : false} name="billingCity" required
656
758
  .value="${this._billingCity}" />
657
759
 
658
- <label>${i18next.t('label.billing_address')}</label>
659
- <textarea ?disabled=${this._disableBillingAddress ? true : false} name="billingAddress" required
660
- .value="${this._billingFullAddress}"></textarea>
661
-
662
- <input type="checkbox" id="matchDeliveryAddress" name="matchDeliveryAddressInput" @click=${e => {
663
- e.currentTarget.checked ? (this._disableBillingAddress = true) : (this._disableBillingAddress = false)
664
- }} />
665
- <label for="matchDeliveryAddress">${i18next.t('label.match_delivery_address')}</label>
666
-
667
-
668
760
  </form>
669
761
 
670
762
  <form name="exportInfo" ?hidden="${this._showExportInfo}" class="multi-column-form" autocomplete="off">
@@ -819,7 +911,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
819
911
  </fieldset>
820
912
  </form>
821
913
 
822
- <div class="container" ?hidden = ${!this._showVasSummary}>
914
+ <div class="container" ?hidden = ${!this._showVasSummary || !this._showShippingInfo}>
823
915
 
824
916
  <div class="grist">
825
917
  <!-- vas -->
@@ -837,13 +929,13 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
837
929
  </div>
838
930
 
839
931
  <!-- release product list-->
840
- <h2 ?hidden= ${!this._showVasInfo}>
932
+ <h2 ?hidden= ${!this._showVasInfo || !this._showShippingInfo}>
841
933
  <mwc-icon>list_alt</mwc-icon>${i18next.t('title.release_product_list')}${` [${i18next.t(
842
934
  PICKING_STANDARD[this._pickingStd].name
843
935
  )}]`}
844
936
  </h2>
845
937
  <data-grist
846
- ?hidden= ${!this._showVasInfo}
938
+ ?hidden= ${!this._showVasInfo || !this._showShippingInfo}
847
939
  id="inventory-grist"
848
940
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
849
941
  .config=${this.inventoryGristConfig}
@@ -997,6 +1089,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
997
1089
  this.initProperties()
998
1090
  this._getAllPostCode()
999
1091
  this.fetchCountry()
1092
+ this._disableBillingAddress = true;
1000
1093
  this._pickingStd = PICKING_STANDARD.SELECT_BY_PRODUCT.value
1001
1094
  this._bundleSettingData = []
1002
1095
  this._vasExpanded = false
@@ -1069,7 +1162,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1069
1162
  this.containerSizes = await getCodeByName('CONTAINER_SIZES')
1070
1163
 
1071
1164
  this.quickFindContent.currentTabKey = i18next.t('label.order')
1072
- this._disableBillingAddress = false
1165
+ this._disableBillingAddress = true
1073
1166
  this._enableTransportationServiceSetting = enableTransportationServiceSetting
1074
1167
  this._bizplaces = bizplaces
1075
1168
  this.packingTypes = packingTypes
@@ -1355,7 +1448,16 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1355
1448
  this._companyName = ''
1356
1449
  this._deliveryState = ''
1357
1450
  this._deliveryCity = ''
1358
- this._deliveryFullAddress = ''
1451
+ this._deliveryAddress1 = ''
1452
+ this._deliveryAddress2 = ''
1453
+ this._deliveryAddress3 = ''
1454
+ this._deliveryAddress4 = ''
1455
+ this._deliveryAddress5 = ''
1456
+ this._billingAddress = ''
1457
+ this._billingAddress2 = ''
1458
+ this._billingAddress3 = ''
1459
+ this._billingAddress4 = ''
1460
+ this._billingAddress5 = ''
1359
1461
  this._deliveryContact = ''
1360
1462
  this._billingState = ''
1361
1463
  this._billingCity = ''
@@ -1378,7 +1480,7 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
1378
1480
  this._selectedVasRecord = null
1379
1481
  this._selectedVasRecordIdx = null
1380
1482
  this.bundleData = {}
1381
- this.matchDeliveryAddressInput.checked = false
1483
+ this.matchDeliveryAddressInput.checked = true
1382
1484
  this.quickFindContent.currentTabKey = i18next.t('label.order')
1383
1485
 
1384
1486
  // this.initProperties()
@@ -2315,6 +2417,11 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
2315
2417
  // If match delivery address is ticked, all the billing address info will be the same with delivery address info
2316
2418
  if (this._disableBillingAddress) {
2317
2419
  shippingOrderInfo.billingAddress = shippingOrderInfo.deliveryAddress1
2420
+ shippingOrderInfo.billingAddress2 = shippingOrderInfo.deliveryAddress2
2421
+ shippingOrderInfo.billingAddress3 = shippingOrderInfo.deliveryAddress3
2422
+ shippingOrderInfo.billingAddress4 = shippingOrderInfo.deliveryAddress4
2423
+ shippingOrderInfo.billingAddress5 = shippingOrderInfo.deliveryAddress5
2424
+ shippingOrderInfo.billingCountry = shippingOrderInfo.country
2318
2425
  shippingOrderInfo.billingPostalCode = shippingOrderInfo.postalCode
2319
2426
  shippingOrderInfo.billingCity = shippingOrderInfo.city
2320
2427
  shippingOrderInfo.billingState = shippingOrderInfo.state
@@ -4096,4 +4203,4 @@ class CreateReleaseOrder extends localize(i18next)(PageView) {
4096
4203
  }
4097
4204
  }
4098
4205
 
4099
- window.customElements.define('create-release-order', CreateReleaseOrder)
4206
+ window.customElements.define('create-release-order', CreateReleaseOrder)