ts-glitter 17.5.6 → 17.5.7

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 (82) hide show
  1. package/lib/glitterBundle/dialog/ShareDialog.ts +24 -32
  2. package/lowcode/Entry.js +1 -1
  3. package/lowcode/Entry.ts +1 -1
  4. package/lowcode/backend-manager/bg-widget.js +13 -12
  5. package/lowcode/backend-manager/bg-widget.ts +15 -13
  6. package/lowcode/cms-plugin/module/data.d.ts +109 -0
  7. package/lowcode/cms-plugin/module/delivery-html.ts +0 -110
  8. package/lowcode/cms-plugin/module/order-setting.js +810 -156
  9. package/lowcode/cms-plugin/module/order-setting.ts +990 -227
  10. package/lowcode/cms-plugin/module/product-excel.js +1 -1
  11. package/lowcode/cms-plugin/module/product-excel.ts +2 -3
  12. package/lowcode/cms-plugin/module/product-setting.js +1 -0
  13. package/lowcode/cms-plugin/module/product-setting.ts +1 -0
  14. package/lowcode/cms-plugin/shopping-market-shopee.js +91 -73
  15. package/lowcode/cms-plugin/shopping-market-shopee.ts +169 -103
  16. package/lowcode/cms-plugin/shopping-order-manager.js +24 -60
  17. package/lowcode/cms-plugin/shopping-order-manager.ts +23 -54
  18. package/lowcode/cms-plugin/shopping-product-setting.js +36 -20
  19. package/lowcode/cms-plugin/shopping-product-setting.ts +58 -42
  20. package/lowcode/cms-plugin/shopping-product-stock.js +4 -3
  21. package/lowcode/cms-plugin/shopping-product-stock.ts +4 -3
  22. package/lowcode/cms-plugin/shopping-setting-advance.js +120 -59
  23. package/lowcode/cms-plugin/shopping-setting-advance.ts +567 -504
  24. package/lowcode/cms-plugin/shopping-setting-basic.js +12 -2
  25. package/lowcode/cms-plugin/shopping-setting-basic.ts +12 -2
  26. package/lowcode/css/editor.css +7 -2
  27. package/lowcode/dialog/ShareDialog.js +7 -11
  28. package/lowcode/dialog/ShareDialog.ts +24 -35
  29. package/lowcode/glitter-base/global/language.js +3 -0
  30. package/lowcode/glitter-base/global/language.ts +3 -0
  31. package/lowcode/glitter-base/route/shopee.js +11 -0
  32. package/lowcode/glitter-base/route/shopee.ts +12 -0
  33. package/lowcode/glitter-base/route/shopping.js +12 -0
  34. package/lowcode/glitter-base/route/shopping.ts +13 -0
  35. package/lowcode/glitterBundle/dialog/ShareDialog.js +25 -42
  36. package/lowcode/glitterBundle/dialog/ShareDialog.ts +70 -55
  37. package/lowcode/glitterBundle/dialog/dialog.js +144 -218
  38. package/lowcode/glitterBundle/dialog/dialog.ts +171 -215
  39. package/lowcode/glitterBundle/plugins/editor-elem.js +7 -4
  40. package/lowcode/glitterBundle/plugins/editor-elem.ts +7 -5
  41. package/lowcode/public-components/checkout/index.js +2 -2
  42. package/lowcode/public-components/checkout/index.ts +2 -2
  43. package/lowcode/public-components/product/product-detail.js +4 -2
  44. package/lowcode/public-components/product/product-detail.ts +9 -7
  45. package/lowcode/public-models/product.ts +2 -0
  46. package/package.json +1 -1
  47. package/src/api-public/controllers/ai-points.js.map +1 -1
  48. package/src/api-public/controllers/customer-sessions.js.map +5 -1
  49. package/src/api-public/controllers/index.js +2 -0
  50. package/src/api-public/controllers/index.js.map +1 -1
  51. package/src/api-public/controllers/index.ts +3 -0
  52. package/src/api-public/controllers/shop.js +15 -2
  53. package/src/api-public/controllers/shop.js.map +1 -1
  54. package/src/api-public/controllers/shop.ts +20 -6
  55. package/src/api-public/controllers/shopee.js +40 -2
  56. package/src/api-public/controllers/shopee.js.map +1 -1
  57. package/src/api-public/controllers/shopee.ts +46 -3
  58. package/src/api-public/controllers/sms-points.js.map +1 -1
  59. package/src/api-public/controllers/wallet.js.map +1 -1
  60. package/src/api-public/services/EcInvoice.js.map +1 -1
  61. package/src/api-public/services/ai-pointes.js.map +1 -1
  62. package/src/api-public/services/customer-sessions.js.map +5 -1
  63. package/src/api-public/services/fb-message.js.map +5 -1
  64. package/src/api-public/services/financial-service.js.map +1 -1
  65. package/src/api-public/services/financial-service.ts +0 -2
  66. package/src/api-public/services/invoice.js.map +1 -1
  67. package/src/api-public/services/shopee.d.ts +5 -2
  68. package/src/api-public/services/shopee.js +53 -43
  69. package/src/api-public/services/shopee.js.map +1 -1
  70. package/src/api-public/services/shopee.ts +59 -60
  71. package/src/api-public/services/shopping.d.ts +17 -1
  72. package/src/api-public/services/shopping.js +224 -68
  73. package/src/api-public/services/shopping.js.map +1 -1
  74. package/src/api-public/services/shopping.ts +390 -188
  75. package/src/api-public/services/sms-pointes.js.map +1 -1
  76. package/src/api-public/services/wallet.js.map +1 -1
  77. package/src/app-project/serverless/src/modules/database.d.ts +1 -1
  78. package/src/modules/database.d.ts +1 -1
  79. package/src/seo-config.js +1 -1
  80. package/src/seo-config.js.map +1 -1
  81. package/src/seo-config.ts +1 -1
  82. package/src/services/template.js.map +1 -1
@@ -1,43 +1,35 @@
1
- import {GVC} from "../GVController.js";
2
- import {Glitter} from "../Glitter.js";
1
+ import { GVC } from '../GVController.js';
2
+ import { Glitter } from '../Glitter.js';
3
3
 
4
4
  export class ShareDialog {
5
- public dataLoading = (obj: { text?: string; visible: boolean }) => {
6
-
7
- };
8
- public errorMessage = (obj: { text?: string }) => {
9
- };
10
- public successMessage = (obj: { text?: string }) => {
11
- };
12
- public checkYesOrNot: (obj: { callback:(response:boolean)=>void, text: string }) => void;
13
- public policy: () => void;
5
+ public dataLoading = (obj: { text?: string; visible: boolean }) => {};
6
+ public errorMessage = (obj: { text?: string }) => {};
7
+ public successMessage = (obj: { text?: string }) => {};
8
+ public checkYesOrNot: (obj: { callback: (response: boolean) => void; text: string }) => void;
14
9
 
15
10
  constructor(glitter: Glitter) {
16
-
17
11
  this.dataLoading = (obj: { text?: string; visible: boolean }) => {
18
- if(obj.visible){
19
- glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'dataLoading', {type:'dataLoading',obj:obj})
20
- }else{
21
- glitter.closeDiaLog('dataLoading')
12
+ if (obj.visible) {
13
+ glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'dataLoading', { type: 'dataLoading', obj: obj });
14
+ } else {
15
+ glitter.closeDiaLog('dataLoading');
22
16
  }
23
17
  };
24
- this.errorMessage = (obj: { text?: string; }) => {
25
- glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'errorMessage', {type:'errorMessage',obj:obj})
26
- };
27
- this.successMessage = (obj: { text?: string; }) => {
28
- glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'successMessage', {type:'successMessage',obj:obj})
18
+ this.errorMessage = (obj: { text?: string }) => {
19
+ glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'errorMessage', { type: 'errorMessage', obj: obj });
29
20
  };
30
- this.policy = () => {
31
- glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'policy', {type:'policy'})
21
+ this.successMessage = (obj: { text?: string }) => {
22
+ glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'successMessage', { type: 'successMessage', obj: obj });
32
23
  };
33
- this.checkYesOrNot = (obj:{text:string,callback:(response:boolean)=>void})=>{
24
+ this.checkYesOrNot = (obj: { text: string; callback: (response: boolean) => void }) => {
34
25
  glitter.openDiaLog('glitterBundle/dialog/dialog.js', 'checkYesOrNot', {
35
- type: 'checkYesOrNot', callback: (response: boolean) => {
36
- glitter.closeDiaLog('checkYesOrNot')
37
- obj.callback(response)
38
- },title:obj.text
39
- })
40
- }
41
-
26
+ type: 'checkYesOrNot',
27
+ callback: (response: boolean) => {
28
+ glitter.closeDiaLog('checkYesOrNot');
29
+ obj.callback(response);
30
+ },
31
+ title: obj.text,
32
+ });
33
+ };
42
34
  }
43
- }
35
+ }
package/lowcode/Entry.js CHANGED
@@ -89,7 +89,7 @@ export class Entry {
89
89
  }
90
90
  window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : clockF();
91
91
  console.log(`Entry-time:`, window.renderClock.stop());
92
- glitter.share.editerVersion = 'V_17.5.6';
92
+ glitter.share.editerVersion = 'V_17.5.7';
93
93
  glitter.share.start = new Date();
94
94
  const vm = {
95
95
  appConfig: [],
package/lowcode/Entry.ts CHANGED
@@ -90,7 +90,7 @@ export class Entry {
90
90
  }
91
91
  (window as any).renderClock = (window as any).renderClock ?? clockF();
92
92
  console.log(`Entry-time:`, (window as any).renderClock.stop());
93
- glitter.share.editerVersion = 'V_17.5.6';
93
+ glitter.share.editerVersion = 'V_17.5.7';
94
94
  glitter.share.start = new Date();
95
95
  const vm: {
96
96
  appConfig: any;
@@ -1610,7 +1610,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
1610
1610
  vm.originalData.map((dd, index) => {
1611
1611
  const checkboxParent = gvc.glitter.document.querySelector(`[gvc-checkbox="checkbox${index}"]`);
1612
1612
  if (checkboxParent) {
1613
- const checkboxIcon = checkboxParent.querySelector(result ? 'i.fa-regular.fa-square' : 'i.fa-solid.fa-square-check ');
1613
+ const checkboxIcon = checkboxParent.querySelector(result ? 'i.fa-square' : 'i.fa-square-check');
1614
1614
  if (checkboxIcon) {
1615
1615
  checkboxIcon.click();
1616
1616
  }
@@ -1792,6 +1792,9 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
1792
1792
  class="${ids.textClass} ${tdClass} tb_v3 tx_normal"
1793
1793
  style="${style}"
1794
1794
  ${obj.filter.length !== 0 && tdIndex === 0 ? `gvc-checkbox="checkbox${trIndex}"` : ''}
1795
+ onclick="${d3.key.includes('data-click="false"') ? gvc.event((e, event) => {
1796
+ event.stopPropagation();
1797
+ }) : ''}"
1795
1798
  >
1796
1799
  <div class="text-nowrap"
1797
1800
  style="color: #393939 !important;">
@@ -2010,13 +2013,13 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
2010
2013
  >
2011
2014
  <input
2012
2015
  class="form-check-input ${randomString} cursor_pointer"
2013
- style="margin-top: 0.35rem;"
2016
+ style="margin-top: 0.35rem; margin-right: 0.5rem;"
2014
2017
  type="${obj && obj.single ? 'radio' : 'checkbox'}"
2015
2018
  id="${id}_${item.key}"
2016
2019
  ${def.includes(item.key) ? 'checked' : ''}
2017
2020
  />
2018
2021
  <label class="form-check-label cursor_pointer" for="${id}_${item.key}"
2019
- style="font-size: 16px; color: #393939;">${item.name}</label>
2022
+ style="font-size: 16px; color: #393939; margin-top: 0.125rem;">${item.name}</label>
2020
2023
  </div>
2021
2024
  ${def.includes(item.key) && item.innerHtml
2022
2025
  ? html `
@@ -2190,7 +2193,7 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
2190
2193
  height: 40px !important;
2191
2194
  border-radius: 10px;
2192
2195
  background: linear-gradient(0deg, #f7f7f7 0%, #f7f7f7 100%), #fff;
2193
- padding: 0 22px;
2196
+ padding: 0 20px;
2194
2197
  ${document.body.clientWidth > 768 ? `width: 100%;` : `width: calc(100vw - 24px); `}
2195
2198
  `;
2196
2199
  return html `
@@ -3032,7 +3035,6 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
3032
3035
  const id = Tool.randomString(7);
3033
3036
  opt.key = `${opt.key}`;
3034
3037
  function call() {
3035
- console.log(1);
3036
3038
  if (obj.default.includes(opt.key)) {
3037
3039
  obj.default = obj.default.filter((item) => item !== opt.key);
3038
3040
  }
@@ -3205,7 +3207,6 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
3205
3207
  const id = Tool.randomString(7);
3206
3208
  opt.key = `${opt.key}`;
3207
3209
  function call() {
3208
- console.log(2);
3209
3210
  if (obj.default.includes(opt.key)) {
3210
3211
  obj.default = obj.default.filter((item) => item !== opt.key);
3211
3212
  }
@@ -3765,8 +3766,8 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
3765
3766
  const className = Tool.randomString(6);
3766
3767
  gvc.addStyle(`
3767
3768
  .${className} {
3768
- min-width: 1rem;
3769
- min-height: 1rem;
3769
+ min-width: 1.25rem;
3770
+ min-height: 1.25rem;
3770
3771
  }
3771
3772
  .${className}:checked[type='checkbox'] {
3772
3773
  border: 2px solid ${color !== null && color !== void 0 ? color : '#000'};
@@ -3781,8 +3782,8 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
3781
3782
  const className = `dark_dot`;
3782
3783
  gvc.addStyle(`
3783
3784
  .${className} {
3784
- min-width: 1rem;
3785
- min-height: 1rem;
3785
+ min-width: 1.15rem;
3786
+ min-height: 1.15rem;
3786
3787
  margin-right: 4px;
3787
3788
  }
3788
3789
  .${className}:checked[type='radio'] {
@@ -3798,8 +3799,8 @@ ${(_c = obj.default) !== null && _c !== void 0 ? _c : ''}</textarea
3798
3799
  const className = Tool.randomString(6);
3799
3800
  gvc.addStyle(`
3800
3801
  .${className} {
3801
- min-width: 1rem;
3802
- min-height: 1rem;
3802
+ min-width: 1.15rem;
3803
+ min-height: 1.15rem;
3803
3804
  margin-right: 4px;
3804
3805
  }
3805
3806
  .${className}:checked[type='radio'] {
@@ -1916,7 +1916,7 @@ ${obj.default ?? ''}</textarea
1916
1916
  vm.originalData.map((dd: any, index: number) => {
1917
1917
  const checkboxParent = gvc.glitter.document.querySelector(`[gvc-checkbox="checkbox${index}"]`);
1918
1918
  if (checkboxParent) {
1919
- const checkboxIcon = checkboxParent.querySelector(result ? 'i.fa-regular.fa-square' : 'i.fa-solid.fa-square-check ') as any;
1919
+ const checkboxIcon = checkboxParent.querySelector(result ? 'i.fa-square' : 'i.fa-square-check') as any;
1920
1920
  if (checkboxIcon) {
1921
1921
  checkboxIcon.click();
1922
1922
  }
@@ -2107,12 +2107,16 @@ ${obj.default ?? ''}</textarea
2107
2107
  ${dd.length > 1 && tdIndex === 0 ? 'border-radius: 10px 0 0 10px;' : ''}
2108
2108
  ${dd.length > 1 && tdIndex === dd.length - 1 ? 'border-radius: 0 10px 10px 0;' : ''}
2109
2109
  ${dd.length === 1 ? 'border-radius: 10px;' : ''}`
2110
-
2111
2110
  return html`
2112
2111
  <td
2113
2112
  class="${ids.textClass} ${tdClass} tb_v3 tx_normal"
2114
2113
  style="${style}"
2115
2114
  ${obj.filter.length !== 0 && tdIndex === 0 ? `gvc-checkbox="checkbox${trIndex}"` : ''}
2115
+ onclick="${
2116
+ d3.key.includes('data-click="false"') ? gvc.event((e, event) => {
2117
+ event.stopPropagation();
2118
+ }) : ''
2119
+ }"
2116
2120
  >
2117
2121
  <div class="text-nowrap"
2118
2122
  style="color: #393939 !important;">
@@ -2402,13 +2406,13 @@ ${obj.default ?? ''}</textarea
2402
2406
  >
2403
2407
  <input
2404
2408
  class="form-check-input ${randomString} cursor_pointer"
2405
- style="margin-top: 0.35rem;"
2409
+ style="margin-top: 0.35rem; margin-right: 0.5rem;"
2406
2410
  type="${obj && obj.single ? 'radio' : 'checkbox'}"
2407
2411
  id="${id}_${item.key}"
2408
2412
  ${def.includes(item.key) ? 'checked' : ''}
2409
2413
  />
2410
2414
  <label class="form-check-label cursor_pointer" for="${id}_${item.key}"
2411
- style="font-size: 16px; color: #393939;">${item.name}</label>
2415
+ style="font-size: 16px; color: #393939; margin-top: 0.125rem;">${item.name}</label>
2412
2416
  </div>
2413
2417
  ${def.includes(item.key) && item.innerHtml
2414
2418
  ? html`
@@ -2609,7 +2613,7 @@ ${obj.default ?? ''}</textarea
2609
2613
  height: 40px !important;
2610
2614
  border-radius: 10px;
2611
2615
  background: linear-gradient(0deg, #f7f7f7 0%, #f7f7f7 100%), #fff;
2612
- padding: 0 22px;
2616
+ padding: 0 20px;
2613
2617
  ${document.body.clientWidth > 768 ? `width: 100%;` : `width: calc(100vw - 24px); `}
2614
2618
  `;
2615
2619
  return html`
@@ -3555,7 +3559,6 @@ ${obj.default ?? ''}</textarea
3555
3559
  opt.key = `${opt.key}`;
3556
3560
 
3557
3561
  function call() {
3558
- console.log(1);
3559
3562
  if (obj.default.includes(opt.key)) {
3560
3563
  obj.default = obj.default.filter((item) => item !== opt.key);
3561
3564
  } else {
@@ -3762,7 +3765,6 @@ ${obj.default ?? ''}</textarea
3762
3765
  opt.key = `${opt.key}`;
3763
3766
 
3764
3767
  function call() {
3765
- console.log(2);
3766
3768
  if (obj.default.includes(opt.key)) {
3767
3769
  obj.default = obj.default.filter((item) => item !== opt.key);
3768
3770
  } else {
@@ -4432,8 +4434,8 @@ ${obj.default ?? ''}</textarea
4432
4434
  const className = Tool.randomString(6);
4433
4435
  gvc.addStyle(`
4434
4436
  .${className} {
4435
- min-width: 1rem;
4436
- min-height: 1rem;
4437
+ min-width: 1.25rem;
4438
+ min-height: 1.25rem;
4437
4439
  }
4438
4440
  .${className}:checked[type='checkbox'] {
4439
4441
  border: 2px solid ${color ?? '#000'};
@@ -4449,8 +4451,8 @@ ${obj.default ?? ''}</textarea
4449
4451
  const className = `dark_dot`;
4450
4452
  gvc.addStyle(`
4451
4453
  .${className} {
4452
- min-width: 1rem;
4453
- min-height: 1rem;
4454
+ min-width: 1.15rem;
4455
+ min-height: 1.15rem;
4454
4456
  margin-right: 4px;
4455
4457
  }
4456
4458
  .${className}:checked[type='radio'] {
@@ -4467,8 +4469,8 @@ ${obj.default ?? ''}</textarea
4467
4469
  const className = Tool.randomString(6);
4468
4470
  gvc.addStyle(`
4469
4471
  .${className} {
4470
- min-width: 1rem;
4471
- min-height: 1rem;
4472
+ min-width: 1.15rem;
4473
+ min-height: 1.15rem;
4472
4474
  margin-right: 4px;
4473
4475
  }
4474
4476
  .${className}:checked[type='radio'] {
@@ -0,0 +1,109 @@
1
+ interface OrderData {
2
+ distribution_info?: {
3
+ code: string;
4
+ condition: number;
5
+ link: string;
6
+ recommend_medium: any;
7
+ recommend_status: string;
8
+ recommend_user: any;
9
+ redirect: string;
10
+ relative: string;
11
+ relative_data: any;
12
+ share_type: string;
13
+ share_value: number;
14
+ startDate: string;
15
+ startTime: string;
16
+ status: boolean;
17
+ title: string;
18
+ voucher: number;
19
+ voucher_status: string;
20
+ };
21
+ archived: 'true' | 'false';
22
+ customer_info: any;
23
+ editRecord: any;
24
+ method: string;
25
+ shipment_selector: {
26
+ name: string;
27
+ value: string;
28
+ form: any;
29
+ }[];
30
+ orderStatus: string;
31
+ use_wallet: number;
32
+ email: string;
33
+ total: number;
34
+ discount: number;
35
+ expectDate: string;
36
+ shipment_fee: number;
37
+ use_rebate: number;
38
+ lineItems: {
39
+ id: number;
40
+ spec: string[];
41
+ count: string;
42
+ sale_price: number;
43
+ title: string;
44
+ sku: string;
45
+ }[];
46
+ user_info: {
47
+ name: string;
48
+ email: string;
49
+ phone: string;
50
+ address: string;
51
+ custom_form_delivery?: any;
52
+ shipment: 'normal' | 'FAMIC2C' | 'UNIMARTC2C' | 'HILIFEC2C' | 'OKMARTC2C' | 'now' | 'shop' | 'global_express' | 'black_cat';
53
+ CVSStoreName: string;
54
+ CVSStoreID: string;
55
+ CVSTelephone: string;
56
+ MerchantTradeNo: string;
57
+ CVSAddress: string;
58
+ note?: string;
59
+ code_note?: string;
60
+ };
61
+ custom_receipt_form?: any;
62
+ custom_form_format?: any;
63
+ custom_form_data?: any;
64
+ proof_purchase: any;
65
+ progress: string;
66
+ // progress: 'finish' | 'wait' | 'shipping' | "returns";
67
+ order_note: string;
68
+ voucherList: [
69
+ {
70
+ title: string;
71
+ method: 'percent' | 'fixed';
72
+ trigger: 'auto' | 'code';
73
+ value: string;
74
+ for: 'collection' | 'product';
75
+ rule: 'min_price' | 'min_count';
76
+ forKey: string[];
77
+ ruleValue: number;
78
+ startDate: string;
79
+ startTime: string;
80
+ endDate?: string;
81
+ endTime?: string;
82
+ status: 0 | 1 | -1;
83
+ type: 'voucher';
84
+ code?: string;
85
+ overlay: boolean;
86
+ bind?: {
87
+ id: string;
88
+ spec: string[];
89
+ count: number;
90
+ sale_price: number;
91
+ collection: string[];
92
+ discount_price: number;
93
+ }[];
94
+ start_ISO_Date: string;
95
+ end_ISO_Date: string;
96
+ },
97
+ ];
98
+ orderSource?: string;
99
+ deliveryData: Record<string, string>;
100
+ }
101
+
102
+ interface CartData {
103
+ id: number;
104
+ cart_token: string;
105
+ status: number;
106
+ email: string;
107
+ orderData: OrderData;
108
+ created_time: string;
109
+ }
@@ -5,116 +5,6 @@ import { ApiUser } from '../../glitter-base/route/user.js';
5
5
 
6
6
  const html = String.raw;
7
7
 
8
- interface OrderData {
9
- distribution_info?: {
10
- code: string;
11
- condition: number;
12
- link: string;
13
- recommend_medium: any;
14
- recommend_status: string;
15
- recommend_user: any;
16
- redirect: string;
17
- relative: string;
18
- relative_data: any;
19
- share_type: string;
20
- share_value: number;
21
- startDate: string;
22
- startTime: string;
23
- status: boolean;
24
- title: string;
25
- voucher: number;
26
- voucher_status: string;
27
- };
28
- archived: 'true' | 'false';
29
- customer_info: any;
30
- editRecord: any;
31
- method: string;
32
- shipment_selector: {
33
- name: string;
34
- value: string;
35
- form: any;
36
- }[];
37
- orderStatus: string;
38
- use_wallet: number;
39
- email: string;
40
- total: number;
41
- discount: number;
42
- expectDate: string;
43
- shipment_fee: number;
44
- use_rebate: number;
45
- lineItems: {
46
- id: number;
47
- spec: string[];
48
- count: string;
49
- sale_price: number;
50
- title: string;
51
- sku: string;
52
- }[];
53
- user_info: {
54
- name: string;
55
- email: string;
56
- phone: string;
57
- address: string;
58
- custom_form_delivery?: any;
59
- shipment: 'normal' | 'FAMIC2C' | 'UNIMARTC2C' | 'HILIFEC2C' | 'OKMARTC2C' | 'now' | 'shop' | 'global_express';
60
- CVSStoreName: string;
61
- CVSStoreID: string;
62
- CVSTelephone: string;
63
- MerchantTradeNo: string;
64
- CVSAddress: string;
65
- note?: string;
66
- code_note?: string;
67
- };
68
- custom_receipt_form?: any;
69
- custom_form_format?: any;
70
- custom_form_data?: any;
71
- proof_purchase: any;
72
- progress: string;
73
- // progress: 'finish' | 'wait' | 'shipping' | "returns";
74
- order_note: string;
75
- voucherList: [
76
- {
77
- title: string;
78
- method: 'percent' | 'fixed';
79
- trigger: 'auto' | 'code';
80
- value: string;
81
- for: 'collection' | 'product';
82
- rule: 'min_price' | 'min_count';
83
- forKey: string[];
84
- ruleValue: number;
85
- startDate: string;
86
- startTime: string;
87
- endDate?: string;
88
- endTime?: string;
89
- status: 0 | 1 | -1;
90
- type: 'voucher';
91
- code?: string;
92
- overlay: boolean;
93
- bind?: {
94
- id: string;
95
- spec: string[];
96
- count: number;
97
- sale_price: number;
98
- collection: string[];
99
- discount_price: number;
100
- }[];
101
- start_ISO_Date: string;
102
- end_ISO_Date: string;
103
- }
104
- ];
105
- orderSource?: string;
106
- deliveryData: Record<string, string>;
107
- }
108
-
109
- interface CartData {
110
- id: number;
111
- cart_token: string;
112
- status: number;
113
- email: string;
114
- orderData: OrderData;
115
- created_time: string;
116
- }
117
-
118
8
  export class DeliveryHTML {
119
9
  static print(ogvc: GVC, dataArray: CartData[], type: 'shipment' | 'pick') {
120
10
  const prefix = Tool.randomString(5);