ts-glitter 13.3.4 → 13.3.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 (101) hide show
  1. package/lowcode/Entry.js +1 -1
  2. package/lowcode/Entry.ts +1 -1
  3. package/lowcode/backend-manager/bg-blog.js +2 -7
  4. package/lowcode/backend-manager/bg-blog.ts +8 -13
  5. package/lowcode/backend-manager/bg-customer-message.js +4 -2
  6. package/lowcode/backend-manager/bg-customer-message.ts +4 -2
  7. package/lowcode/backend-manager/bg-graph-api.js +6 -11
  8. package/lowcode/backend-manager/bg-graph-api.ts +14 -20
  9. package/lowcode/backend-manager/bg-line.js +526 -1002
  10. package/lowcode/backend-manager/bg-line.ts +1815 -2354
  11. package/lowcode/backend-manager/bg-notify.js +392 -746
  12. package/lowcode/backend-manager/bg-notify.ts +436 -835
  13. package/lowcode/backend-manager/bg-project.js +176 -293
  14. package/lowcode/backend-manager/bg-project.ts +214 -344
  15. package/lowcode/backend-manager/bg-recommend.js +39 -148
  16. package/lowcode/backend-manager/bg-recommend.ts +43 -162
  17. package/lowcode/backend-manager/bg-sns.js +489 -814
  18. package/lowcode/backend-manager/bg-sns.ts +1876 -2238
  19. package/lowcode/backend-manager/bg-widget.js +301 -171
  20. package/lowcode/backend-manager/bg-widget.ts +324 -193
  21. package/lowcode/cms-plugin/ai-points.js +84 -67
  22. package/lowcode/cms-plugin/ai-points.ts +280 -247
  23. package/lowcode/cms-plugin/auto-reply.js +6 -7
  24. package/lowcode/cms-plugin/auto-reply.ts +6 -7
  25. package/lowcode/cms-plugin/data-analyze.js +5 -6
  26. package/lowcode/cms-plugin/data-analyze.ts +5 -6
  27. package/lowcode/cms-plugin/form-setting.js +122 -220
  28. package/lowcode/cms-plugin/form-setting.ts +124 -240
  29. package/lowcode/cms-plugin/line-auto-reply.js +17 -18
  30. package/lowcode/cms-plugin/line-auto-reply.ts +29 -36
  31. package/lowcode/cms-plugin/member-group-list.js +5 -2
  32. package/lowcode/cms-plugin/member-group-list.ts +5 -2
  33. package/lowcode/cms-plugin/member-type-list.js +36 -84
  34. package/lowcode/cms-plugin/member-type-list.ts +39 -92
  35. package/lowcode/cms-plugin/menus-setting.js +8 -73
  36. package/lowcode/cms-plugin/menus-setting.ts +8 -78
  37. package/lowcode/cms-plugin/permission-setting.js +73 -106
  38. package/lowcode/cms-plugin/permission-setting.ts +236 -278
  39. package/lowcode/cms-plugin/shopping-collections.js +95 -137
  40. package/lowcode/cms-plugin/shopping-collections.ts +103 -147
  41. package/lowcode/cms-plugin/shopping-discount-setting.js +310 -416
  42. package/lowcode/cms-plugin/shopping-discount-setting.ts +1269 -1386
  43. package/lowcode/cms-plugin/shopping-finance-setting.js +1 -0
  44. package/lowcode/cms-plugin/shopping-finance-setting.ts +1 -0
  45. package/lowcode/cms-plugin/shopping-order-manager.js +742 -973
  46. package/lowcode/cms-plugin/shopping-order-manager.ts +1928 -2164
  47. package/lowcode/cms-plugin/shopping-order-return.js +147 -267
  48. package/lowcode/cms-plugin/shopping-order-return.ts +154 -292
  49. package/lowcode/cms-plugin/shopping-product-setting.js +6 -2
  50. package/lowcode/cms-plugin/shopping-product-setting.ts +8 -4
  51. package/lowcode/cms-plugin/shopping-product-stock.js +12 -92
  52. package/lowcode/cms-plugin/shopping-product-stock.ts +14 -94
  53. package/lowcode/cms-plugin/shopping-product-text.js +0 -3
  54. package/lowcode/cms-plugin/shopping-product-text.ts +0 -3
  55. package/lowcode/cms-plugin/shopping-rebate.js +95 -151
  56. package/lowcode/cms-plugin/shopping-rebate.ts +101 -159
  57. package/lowcode/cms-plugin/sms-points.js +83 -67
  58. package/lowcode/cms-plugin/sms-points.ts +281 -241
  59. package/lowcode/cms-plugin/sns-auto-reply.js +18 -18
  60. package/lowcode/cms-plugin/sns-auto-reply.ts +34 -40
  61. package/lowcode/cms-plugin/user-list.js +71 -90
  62. package/lowcode/cms-plugin/user-list.ts +76 -95
  63. package/lowcode/cms-plugin/web-config-setting.js +61 -111
  64. package/lowcode/cms-plugin/web-config-setting.ts +65 -124
  65. package/lowcode/css/editor.css +5 -2
  66. package/lowcode/glitter-base/route/shopping.js +1 -1
  67. package/lowcode/glitter-base/route/shopping.ts +19 -19
  68. package/lowcode/jspage/editor.js +1 -1
  69. package/lowcode/jspage/editor.ts +1 -1
  70. package/lowcode/jspage/main.js +3 -0
  71. package/lowcode/jspage/main.ts +3 -0
  72. package/package.json +1 -2
  73. package/src/api-public/controllers/ai-chat.js.map +5 -1
  74. package/src/api-public/controllers/article.js.map +1 -1
  75. package/src/api-public/controllers/chat.js.map +1 -1
  76. package/src/api-public/controllers/fb-message.js.map +1 -1
  77. package/src/api-public/controllers/index.js.map +1 -1
  78. package/src/api-public/controllers/line-message.js.map +1 -1
  79. package/src/api-public/controllers/rebate.js.map +1 -1
  80. package/src/api-public/controllers/shop.js.map +1 -1
  81. package/src/api-public/controllers/user.js.map +1 -1
  82. package/src/api-public/services/auto-send-email.js.map +1 -1
  83. package/src/api-public/services/chat.js +3 -3
  84. package/src/api-public/services/chat.js.map +1 -1
  85. package/src/api-public/services/chat.ts +3 -4
  86. package/src/api-public/services/fb-message.js.map +5 -1
  87. package/src/api-public/services/filter-protect-data.js.map +1 -1
  88. package/src/api-public/services/line-message.js.map +1 -1
  89. package/src/api-public/services/monitor.js.map +1 -1
  90. package/src/api-public/services/notify.js.map +1 -1
  91. package/src/api-public/services/rebate.js.map +1 -1
  92. package/src/api-public/services/schedule.js.map +1 -1
  93. package/src/api-public/services/share-permission.js.map +1 -1
  94. package/src/api-public/services/shopping.js.map +1 -1
  95. package/src/api-public/services/user.js +67 -66
  96. package/src/api-public/services/user.js.map +1 -1
  97. package/src/api-public/services/user.ts +212 -182
  98. package/src/helper/glitter-util.js.map +1 -1
  99. package/src/modules/firebase.d.ts +1 -0
  100. package/src/modules/firebase.js +1 -1
  101. package/src/modules/firebase.js.map +1 -1
@@ -25,37 +25,37 @@ export class ShoppingOrderManager {
25
25
  {
26
26
  title: '門市立即取貨',
27
27
  value: 'now',
28
- name: ''
28
+ name: '',
29
29
  },
30
30
  {
31
31
  title: '一般宅配',
32
32
  value: 'normal',
33
- name: ''
33
+ name: '',
34
34
  },
35
35
  {
36
36
  title: '全家店到店',
37
37
  value: 'FAMIC2C',
38
- name: ''
38
+ name: '',
39
39
  },
40
40
  {
41
41
  title: '萊爾富店到店',
42
42
  value: 'HILIFEC2C',
43
- name: ''
43
+ name: '',
44
44
  },
45
45
  {
46
46
  title: 'OK超商店到店',
47
47
  value: 'OKMARTC2C',
48
- name: ''
48
+ name: '',
49
49
  },
50
50
  {
51
51
  title: '7-ELEVEN超商交貨便',
52
52
  value: 'UNIMARTC2C',
53
- name: ''
53
+ name: '',
54
54
  },
55
55
  {
56
56
  title: '實體門市取貨',
57
57
  value: 'shop',
58
- name: ''
58
+ name: '',
59
59
  },
60
60
  ].map((dd) => {
61
61
  dd.name = dd.title;
@@ -80,9 +80,7 @@ export class ShoppingOrderManager {
80
80
  };
81
81
  const ListComp = new BgListComponent(gvc, vm, FilterOptions.orderFilterFrame);
82
82
  vm.filter = ListComp.getFilterObject();
83
- gvc.addMtScript([{ src: 'https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js' }], () => {
84
- }, () => {
85
- });
83
+ gvc.addMtScript([{ src: 'https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js' }], () => { }, () => { });
86
84
  function importDataTo(event) {
87
85
  const input = event.target;
88
86
  const XLSX = window.XLSX;
@@ -141,10 +139,10 @@ export class ShoppingOrderManager {
141
139
  <div class="flex-fill"></div>
142
140
  <div style="display: flex; gap: 14px;">
143
141
  <input
144
- class="d-none"
145
- type="file"
146
- id="upload-excel"
147
- onchange="${gvc.event((e, event) => {
142
+ class="d-none"
143
+ type="file"
144
+ id="upload-excel"
145
+ onchange="${gvc.event((e, event) => {
148
146
  importDataTo(event);
149
147
  })}"
150
148
  />
@@ -334,35 +332,30 @@ export class ShoppingOrderManager {
334
332
  ];
335
333
  const filterTags = ListComp.getFilterTags(FilterOptions.orderFunnel);
336
334
  if (document.body.clientWidth < 768) {
337
- return html `
338
- <div style="display: flex; align-items: center; gap: 10px; width: 100%; justify-content: space-between">
339
- <div>${filterList[0]}</div>
340
- <div style="display: flex;">
341
- <div class="me-2">${filterList[2]}</div>
342
- ${filterList[3]}
343
- </div>
344
- </div>
345
- <div style="display: flex; margin-top: 8px;">
346
- ${filterList[1]}
335
+ return html ` <div style="display: flex; align-items: center; gap: 10px; width: 100%; justify-content: space-between">
336
+ <div>${filterList[0]}</div>
337
+ <div style="display: flex;">
338
+ <div class="me-2">${filterList[2]}</div>
339
+ ${filterList[3]}
347
340
  </div>
348
- <div>${filterTags}</div>`;
341
+ </div>
342
+ <div style="display: flex; margin-top: 8px;">${filterList[1]}</div>
343
+ <div>${filterTags}</div>`;
349
344
  }
350
345
  else {
351
- return html `
352
- <div style="display: flex; align-items: center; gap: 10px;">
353
- ${filterList.join('')}
354
- </div>
355
- <div>${filterTags}</div>`;
346
+ return html ` <div style="display: flex; align-items: center; gap: 10px;">${filterList.join('')}</div>
347
+ <div>${filterTags}</div>`;
356
348
  }
357
349
  },
358
350
  });
359
351
  })(),
360
- BgWidget.tableV2({
352
+ BgWidget.tableV3({
361
353
  gvc: gvc,
362
354
  getData: (vmi) => {
355
+ const limit = 20;
363
356
  ApiShop.getOrder({
364
357
  page: vmi.page - 1,
365
- limit: 20,
358
+ limit: limit,
366
359
  search: vm.query || undefined,
367
360
  searchType: vm.queryType || 'cart_token',
368
361
  orderString: vm.orderString,
@@ -370,46 +363,16 @@ export class ShoppingOrderManager {
370
363
  archived: `${query.isArchived}`,
371
364
  is_pos: vm.filter_type === 'pos',
372
365
  }).then((data) => {
373
- vmi.pageSize = Math.ceil(data.response.total / 20);
374
- vm.dataList = data.response.data;
375
366
  function getDatalist() {
376
367
  return data.response.data.map((dd) => {
377
368
  var _a;
378
369
  dd.orderData.total = dd.orderData.total || 0;
379
370
  dd.orderData.customer_info = (_a = dd.orderData.customer_info) !== null && _a !== void 0 ? _a : {};
380
371
  return [
381
- {
382
- key: EditorElem.checkBoxOnly({
383
- gvc: gvc,
384
- def: !data.response.data.find((dd) => {
385
- return !dd.checked;
386
- }),
387
- callback: (result) => {
388
- data.response.data.map((dd) => {
389
- dd.checked = result;
390
- });
391
- vmi.data = getDatalist();
392
- vmi.callback();
393
- gvc.notifyDataChange(vm.filterId);
394
- },
395
- }),
396
- value: EditorElem.checkBoxOnly({
397
- gvc: gvc,
398
- def: dd.checked,
399
- callback: (result) => {
400
- dd.checked = result;
401
- vmi.data = getDatalist();
402
- vmi.callback();
403
- gvc.notifyDataChange(vm.filterId);
404
- },
405
- style: 'height:40px;',
406
- }),
407
- },
408
372
  {
409
373
  key: '訂單編號',
410
- value: html `
411
- <div class="d-flex align-items-center gap-2">
412
- ${dd.cart_token}${(() => {
374
+ value: html ` <div class="d-flex align-items-center gap-2">
375
+ ${dd.cart_token}${(() => {
413
376
  switch (dd.orderData.orderSource) {
414
377
  case 'POS':
415
378
  return BgWidget.notifyInsignia('POS');
@@ -419,7 +382,7 @@ export class ShoppingOrderManager {
419
382
  return '';
420
383
  }
421
384
  })()}
422
- </div>`,
385
+ </div>`,
423
386
  },
424
387
  {
425
388
  key: '訂單日期',
@@ -487,13 +450,15 @@ export class ShoppingOrderManager {
487
450
  })(),
488
451
  },
489
452
  ].map((dd) => {
490
- dd.value = html `
491
- <div style="line-height:40px;">${dd.value}</div>`;
453
+ dd.value = html ` <div style="line-height:40px;">${dd.value}</div>`;
492
454
  return dd;
493
455
  });
494
456
  });
495
457
  }
496
- vmi.data = getDatalist();
458
+ vm.dataList = data.response.data;
459
+ vmi.pageSize = Math.ceil(data.response.total / limit);
460
+ vmi.originalData = vm.dataList;
461
+ vmi.tableData = getDatalist();
497
462
  vmi.loading = false;
498
463
  vmi.callback();
499
464
  });
@@ -502,114 +467,85 @@ export class ShoppingOrderManager {
502
467
  vm.data = vm.dataList[index];
503
468
  vm.type = 'replace';
504
469
  },
505
- filter: html `
506
- ${gvc.bindView(() => {
507
- return {
508
- bind: vm.filterId,
509
- view: () => {
510
- const selCount = vm.dataList.filter((dd) => dd.checked).length;
511
- return BgWidget.selNavbar({
512
- count: selCount,
513
- buttonList: [
514
- BgWidget.selEventDropmenu({
515
- gvc: gvc,
516
- options: [
517
- {
518
- name: '列印托運單',
519
- event: gvc.event(() => {
520
- const checkArray = vm.dataList.filter((dd) => dd.checked);
521
- const strArray = checkArray.map((dd) => {
522
- try {
523
- return dd.orderData.deliveryData.LogisticsSubType;
524
- }
525
- catch (error) {
526
- return undefined;
470
+ filter: [
471
+ {
472
+ name: '列印托運單',
473
+ option: true,
474
+ event: () => {
475
+ const checkArray = vm.dataList.filter((dd) => dd.checked);
476
+ const strArray = checkArray.map((dd) => {
477
+ try {
478
+ return dd.orderData.deliveryData.LogisticsSubType;
479
+ }
480
+ catch (error) {
481
+ return undefined;
482
+ }
483
+ });
484
+ if (strArray.includes(undefined)) {
485
+ dialog.errorMessage({
486
+ text: html ` <div class="text-center">已勾選訂單中不可含有<br />非超商店到店的配送方式</div>`,
487
+ });
488
+ return;
489
+ }
490
+ const allEqual = strArray.every((val) => val && val === strArray[0]);
491
+ if (!allEqual) {
492
+ dialog.errorMessage({ text: '配送的超商需為同一種品牌' });
493
+ return;
494
+ }
495
+ if (strArray.includes('HILIFEC2C') && strArray.length > 1) {
496
+ dialog.errorMessage({ text: '萊爾富不支援一次列印多張托運單' });
497
+ return;
498
+ }
499
+ return this.printStoreOrderInfo({
500
+ gvc,
501
+ store: strArray[0],
502
+ deliverys: checkArray.map((dd) => {
503
+ const delivery = dd.orderData.deliveryData;
504
+ return {
505
+ AllPayLogisticsID: delivery.AllPayLogisticsID,
506
+ CVSPaymentNo: delivery.CVSPaymentNo,
507
+ CVSValidationNo: delivery.CVSValidationNo,
508
+ };
509
+ }),
510
+ });
511
+ },
512
+ },
513
+ {
514
+ name: query.isArchived ? '解除封存' : '批量封存',
515
+ event: () => {
516
+ dialog.checkYesOrNot({
517
+ text: `是否確認${query.isArchived ? '解除封存' : '封存'}所選項目?`,
518
+ callback: (response) => {
519
+ if (response) {
520
+ dialog.dataLoading({ visible: true });
521
+ new Promise((resolve) => {
522
+ let n = 0;
523
+ const check = vm.dataList.filter((dd) => {
524
+ return dd.checked;
525
+ });
526
+ for (const b of check) {
527
+ b.orderData.archived = `${!query.isArchived}`;
528
+ ApiShop.putOrder({
529
+ id: `${b.id}`,
530
+ order_data: b.orderData,
531
+ }).then((resp) => {
532
+ if (resp.result) {
533
+ if (++n == check.length) {
534
+ resolve();
527
535
  }
528
- });
529
- if (strArray.includes(undefined)) {
530
- dialog.errorMessage({
531
- text: html `
532
- <div class="text-center">
533
- 已勾選訂單中不可含有<br/>非超商店到店的配送方式
534
- </div>`,
535
- });
536
- return;
537
536
  }
538
- const allEqual = strArray.every((val) => val && val === strArray[0]);
539
- if (!allEqual) {
540
- dialog.errorMessage({ text: '配送的超商需為同一種品牌' });
541
- return;
542
- }
543
- if (strArray.includes('HILIFEC2C') && strArray.length > 1) {
544
- dialog.errorMessage({ text: '萊爾富不支援一次列印多張托運單' });
545
- return;
546
- }
547
- return this.printStoreOrderInfo({
548
- gvc,
549
- store: strArray[0],
550
- deliverys: checkArray.map((dd) => {
551
- const delivery = dd.orderData.deliveryData;
552
- return {
553
- AllPayLogisticsID: delivery.AllPayLogisticsID,
554
- CVSPaymentNo: delivery.CVSPaymentNo,
555
- CVSValidationNo: delivery.CVSValidationNo,
556
- };
557
- }),
558
- });
559
- }),
560
- },
561
- ],
562
- text: '更多操作',
563
- }),
564
- BgWidget.selEventButton(query.isArchived ? '解除封存' : '批量封存', gvc.event(() => {
565
- dialog.checkYesOrNot({
566
- text: `是否確認${query.isArchived ? '解除封存' : '封存'}所選項目?`,
567
- callback: (response) => {
568
- if (response) {
569
- dialog.dataLoading({ visible: true });
570
- new Promise((resolve) => {
571
- let n = 0;
572
- const check = vm.dataList.filter((dd) => {
573
- return dd.checked;
574
- });
575
- for (const b of check) {
576
- b.orderData.archived = `${!query.isArchived}`;
577
- ApiShop.putOrder({
578
- id: `${b.id}`,
579
- order_data: b.orderData,
580
- }).then((resp) => {
581
- if (resp.result) {
582
- if (++n == check.length) {
583
- resolve();
584
- }
585
- }
586
- });
587
- }
588
- }).then(() => {
589
- dialog.dataLoading({ visible: false });
590
- gvc.notifyDataChange(vm.id);
591
- });
592
- }
593
- },
537
+ });
538
+ }
539
+ }).then(() => {
540
+ dialog.dataLoading({ visible: false });
541
+ gvc.notifyDataChange(vm.id);
594
542
  });
595
- })),
596
- ],
543
+ }
544
+ },
597
545
  });
598
546
  },
599
- divCreate: () => {
600
- return {
601
- class: `d-flex align-items-center p-2 py-3 ${!vm.dataList ||
602
- !vm.dataList.find((dd) => {
603
- return dd.checked;
604
- })
605
- ? `d-none`
606
- : ``}`,
607
- style: document.body.clientWidth > 768 ? 'height: 40px; margin-top: 10px;' : '',
608
- };
609
- },
610
- };
611
- })}
612
- `,
547
+ },
548
+ ],
613
549
  }),
614
550
  ].join(''))}
615
551
  `, BgWidget.getContainerWidth());
@@ -746,10 +682,7 @@ export class ShoppingOrderManager {
746
682
  });
747
683
  }
748
684
  function getBadgeList() {
749
- return html `
750
- <div style="display:flex; gap:10px; justify-content:flex-end;">${vt.archivedBadge()}
751
- ${vt.paymentBadge()}${vt.outShipBadge()}${vt.orderStatusBadge()}
752
- </div>`;
685
+ return html ` <div style="display:flex; gap:10px; justify-content:flex-end;">${vt.archivedBadge()} ${vt.paymentBadge()}${vt.outShipBadge()}${vt.orderStatusBadge()}</div>`;
753
686
  }
754
687
  return BgWidget.container(html `
755
688
  <div class="d-flex flex-column">
@@ -758,25 +691,20 @@ export class ShoppingOrderManager {
758
691
  vm.type = 'list';
759
692
  }))}
760
693
  <div class="d-flex flex-column">
761
- <div class="align-items-center"
762
- style="gap:10px;color: #393939;font-size: 24px;font-weight: 700;">
763
- #${orderData.cart_token}
764
- </div>
694
+ <div class="align-items-center" style="gap:10px;color: #393939;font-size: 24px;font-weight: 700;">#${orderData.cart_token}</div>
765
695
  ${BgWidget.grayNote(`訂單成立時間 : ${glitter.ut.dateFormat(new Date(orderData.created_time), 'yyyy-MM-dd hh:mm')}`)}
766
696
  </div>
767
697
  <div class="flex-fill"></div>
768
698
  ${document.body.clientWidth > 768 ? getBadgeList() : ''}
769
699
  </div>
770
- ${document.body.clientWidth > 768 ? '' : html `
771
- <div class="mt-1 mb-3">${getBadgeList()}</div>`}
772
- <div class="d-flex flex-column flex-md-row p-0"
773
- style="max-width:calc(100vw - 20px); gap:24px;">
700
+ ${document.body.clientWidth > 768 ? '' : html ` <div class="mt-1 mb-3">${getBadgeList()}</div>`}
701
+ <div class="d-flex flex-column flex-md-row p-0" style="max-width:calc(100vw - 20px); gap:24px;">
774
702
  <div class="d-flex flex-column" style="width:100%; gap:24px;">
775
703
  ${BgWidget.mainCard(html `
776
- <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
777
- <div class="tx_700">訂單狀態</div>
778
- <div class="ms-auto w-100">
779
- ${EditorElem.select({
704
+ <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
705
+ <div class="tx_700">訂單狀態</div>
706
+ <div class="ms-auto w-100">
707
+ ${EditorElem.select({
780
708
  title: ``,
781
709
  gvc: gvc,
782
710
  def: (_a = orderData.orderData.orderStatus) !== null && _a !== void 0 ? _a : '0',
@@ -793,51 +721,41 @@ export class ShoppingOrderManager {
793
721
  }
794
722
  },
795
723
  })}
796
- </div>
797
724
  </div>
798
- <div class="tx_700 my-3">訂單明細</div>
799
- ${BgWidget.horizontalLine()}
800
- <div class="d-flex flex-column">
801
- ${orderData.orderData.lineItems
725
+ </div>
726
+ <div class="tx_700 my-3">訂單明細</div>
727
+ ${BgWidget.horizontalLine()}
728
+ <div class="d-flex flex-column">
729
+ ${orderData.orderData.lineItems
802
730
  .map((dd) => {
803
731
  return gvc.bindView({
804
732
  bind: glitter.getUUID(),
805
733
  view: () => {
806
- return html `
807
- <div class="d-flex flex-column align-items-center justify-content-center"
808
- style="gap:5px;margin-right:12px;">
809
- ${BgWidget.validImageBox({
734
+ return html ` <div class="d-flex flex-column align-items-center justify-content-center" style="gap:5px;margin-right:12px;">
735
+ ${BgWidget.validImageBox({
810
736
  gvc,
811
737
  image: dd.preview_image,
812
738
  width: 60,
813
739
  class: 'border rounded',
814
740
  style: '',
815
741
  })}
816
- ${dd.is_add_on_items ? `<div class="">${BgWidget.warningInsignia('加購品')}</div>` : ``}
817
- </div>
818
- <div class="d-flex flex-column"
819
- style="gap:2px;">
820
- <div class="tx_700">${dd.title}
821
- </div>
822
- ${dd.spec.length > 0 ? BgWidget.grayNote(dd.spec.join(', ')) : ''}
823
- ${BgWidget.grayNote(`存貨單位 (SKU):${dd.sku && dd.sku.length > 0 ? dd.sku : '無'}`)}
824
- </div>
825
- <div class="flex-fill"></div>
826
- <div class="tx_normal_14">
827
- $${dd.sale_price.toLocaleString()}
828
- × ${dd.count}
829
- </div>
830
- <div class="tx_normal"
831
- style="display: flex;justify-content: end;width: 110px;">
832
- $${dd.sale_price.toLocaleString()}
833
- </div>`;
742
+ ${dd.is_add_on_items ? `<div class="">${BgWidget.warningInsignia('加購品')}</div>` : ``}
743
+ </div>
744
+ <div class="d-flex flex-column" style="gap:2px;">
745
+ <div class="tx_700">${dd.title}</div>
746
+ ${dd.spec.length > 0 ? BgWidget.grayNote(dd.spec.join(', ')) : ''}
747
+ ${BgWidget.grayNote(`存貨單位 (SKU):${dd.sku && dd.sku.length > 0 ? dd.sku : '無'}`)}
748
+ </div>
749
+ <div class="flex-fill"></div>
750
+ <div class="tx_normal_14">$${dd.sale_price.toLocaleString()} × ${dd.count}</div>
751
+ <div class="tx_normal" style="display: flex;justify-content: end;width: 110px;">$${dd.sale_price.toLocaleString()}</div>`;
834
752
  },
835
753
  divCreate: { class: `d-flex align-items-center` },
836
754
  });
837
755
  })
838
756
  .join(BgWidget.horizontalLine({ color: '#f6f6f6' }))}
839
- ${BgWidget.horizontalLine()}
840
- ${[
757
+ ${BgWidget.horizontalLine()}
758
+ ${[
841
759
  {
842
760
  title: '小計',
843
761
  description: `${orderData.orderData.lineItems
@@ -893,26 +811,19 @@ export class ShoppingOrderManager {
893
811
  {
894
812
  title: html `<span class="tx_700">總金額</span>`,
895
813
  description: '',
896
- total: html `<span
897
- class="tx_700">$${orderData.orderData.total.toLocaleString()}</span>`,
814
+ total: html `<span class="tx_700">$${orderData.orderData.total.toLocaleString()}</span>`,
898
815
  },
899
816
  ]
900
817
  .map((dd) => {
901
818
  var _a;
902
- return html `
903
- <div class="d-flex align-items-center justify-content-end">
904
- <div class="tx_normal_14">${dd.title}
905
- ${(_a = dd.description) !== null && _a !== void 0 ? _a : ''}
906
- </div>
907
- <div class="tx_normal"
908
- style="width: 114px;display: flex;justify-content: end;">
909
- ${dd.total}
910
- </div>
911
- </div>`;
819
+ return html ` <div class="d-flex align-items-center justify-content-end">
820
+ <div class="tx_normal_14">${dd.title} ${(_a = dd.description) !== null && _a !== void 0 ? _a : ''}</div>
821
+ <div class="tx_normal" style="width: 114px;display: flex;justify-content: end;">${dd.total}</div>
822
+ </div>`;
912
823
  })
913
824
  .join(BgWidget.mbContainer(18))}
914
- </div>
915
- `)}
825
+ </div>
826
+ `)}
916
827
  ${BgWidget.mainCard(html `
917
828
  <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
918
829
  <div class="tx_700">付款狀態</div>
@@ -950,9 +861,7 @@ export class ShoppingOrderManager {
950
861
  ${BgWidget.mbContainer(18)}
951
862
  <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;align-self: stretch;">
952
863
  <div class="tx_700">付款方式</div>
953
- <div class="tx_normal">
954
- ${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}
955
- </div>
864
+ <div class="tx_normal">${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}</div>
956
865
  ${ShoppingOrderManager.getProofPurchaseString(orderData.orderData, gvc)}
957
866
  </div>
958
867
  `)}
@@ -965,13 +874,11 @@ export class ShoppingOrderManager {
965
874
  dataList: [{ obj: vm, key: 'mode' }],
966
875
  view: () => {
967
876
  return [
968
- html `
969
- <div class="tx_700">配送 / 收件人資訊</div>`,
970
- html `
971
- <div class="tx_700">配送狀態</div>
972
- ${BgWidget.mbContainer(12)}
973
- <div class="ms-auto w-100">
974
- ${EditorElem.select({
877
+ html ` <div class="tx_700">配送 / 收件人資訊</div>`,
878
+ html ` <div class="tx_700">配送狀態</div>
879
+ ${BgWidget.mbContainer(12)}
880
+ <div class="ms-auto w-100">
881
+ ${EditorElem.select({
975
882
  title: ``,
976
883
  gvc: gvc,
977
884
  def: `${orderData.orderData.progress}`,
@@ -989,17 +896,16 @@ export class ShoppingOrderManager {
989
896
  }
990
897
  },
991
898
  })}
992
- </div>`,
993
- html `
994
- <div class="tx_700">配送方式</div>
995
- ${BgWidget.mbContainer(12)}
996
- <div class="d-flex w-100 align-items-center gap-2">
997
- <div style="tx_normal">
998
- ${(orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
899
+ </div>`,
900
+ html ` <div class="tx_700">配送方式</div>
901
+ ${BgWidget.mbContainer(12)}
902
+ <div class="d-flex w-100 align-items-center gap-2">
903
+ <div style="tx_normal">
904
+ ${(orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
999
905
  return dd.value === orderData.orderData.user_info.shipment;
1000
906
  }).name}
1001
- </div>
1002
- ${['FAMIC2C', 'UNIMARTC2C', 'HILIFEC2C', 'OKMARTC2C'].includes(orderData.orderData.user_info.shipment)
907
+ </div>
908
+ ${['FAMIC2C', 'UNIMARTC2C', 'HILIFEC2C', 'OKMARTC2C'].includes(orderData.orderData.user_info.shipment)
1003
909
  ? BgWidget.customButton({
1004
910
  button: {
1005
911
  color: 'gray',
@@ -1029,14 +935,12 @@ export class ShoppingOrderManager {
1029
935
  }),
1030
936
  })
1031
937
  : ''}
1032
- </div>`,
938
+ </div>`,
1033
939
  html ` ${['UNIMARTC2C', 'FAMIC2C', 'OKMARTC2C', 'HILIFEC2C', 'normal'].includes(orderData.orderData.user_info.shipment)
1034
- ? html `
1035
- <div class="tx_700">配送資訊</div>
1036
- ${BgWidget.mbContainer(12)}`
940
+ ? html ` <div class="tx_700">配送資訊</div>
941
+ ${BgWidget.mbContainer(12)}`
1037
942
  : ``}
1038
- <div class="d-flex flex-column tx_normal"
1039
- style="gap: 4px;">
943
+ <div class="d-flex flex-column tx_normal" style="gap: 4px;">
1040
944
  ${(() => {
1041
945
  if (orderData.orderData.user_info.shipment == 'normal') {
1042
946
  return orderData.orderData.user_info.address;
@@ -1048,38 +952,32 @@ export class ShoppingOrderManager {
1048
952
  return html `
1049
953
  <div class="d-flex flex-wrap">
1050
954
  <span class="me-2">門市名稱:</span>
1051
- <div style="white-space: normal;word-break: break-all;">
1052
- ${orderData.orderData.user_info.CVSStoreName}
1053
- </div>
955
+ <div style="white-space: normal;word-break: break-all;">${orderData.orderData.user_info.CVSStoreName}</div>
1054
956
  </div>
1055
- <div class="d-flex">門市店號:
1056
- ${orderData.orderData.user_info.CVSStoreID}
1057
- </div>
1058
- <div class="d-flex"
1059
- style="white-space: normal;word-break: break-all;">
1060
- 地址:
1061
- ${orderData.orderData.user_info.CVSAddress}
957
+ <div class="d-flex">門市店號: ${orderData.orderData.user_info.CVSStoreID}</div>
958
+ <div class="d-flex" style="white-space: normal;word-break: break-all;">
959
+ 地址: ${orderData.orderData.user_info.CVSAddress}
1062
960
  </div>
1063
961
  `;
1064
962
  }
1065
963
  else if (formData.form) {
1066
- return formData.form.map((dd) => {
1067
- return html `
1068
- <div class="d-flex flex-wrap">
964
+ return formData.form
965
+ .map((dd) => {
966
+ return html ` <div class="d-flex flex-wrap">
1069
967
  <span class="me-2">${dd.title}:</span>
1070
968
  <div style="white-space: normal;word-break: break-all;">
1071
969
  ${orderData.orderData.user_info.custom_form_delivery[dd.key]}
1072
970
  </div>
1073
971
  </div>`;
1074
- }).join('');
972
+ })
973
+ .join('');
1075
974
  }
1076
975
  return '';
1077
976
  })()}
1078
977
  </div>`,
1079
- html `
1080
- <div class="d-flex w-100 align-items-center gap-2">
1081
- <div class="tx_700">收件人資訊</div>
1082
- ${vm.mode === 'edit'
978
+ html ` <div class="d-flex w-100 align-items-center gap-2">
979
+ <div class="tx_700">收件人資訊</div>
980
+ ${vm.mode === 'edit'
1083
981
  ? BgWidget.customButton({
1084
982
  button: {
1085
983
  color: 'black',
@@ -1105,10 +1003,10 @@ export class ShoppingOrderManager {
1105
1003
  vm.mode = 'edit';
1106
1004
  }),
1107
1005
  })}
1108
- </div>
1109
- ${BgWidget.mbContainer(8)}
1110
- <div class="tx_normal">
1111
- ${(() => {
1006
+ </div>
1007
+ ${BgWidget.mbContainer(8)}
1008
+ <div class="tx_normal">
1009
+ ${(() => {
1112
1010
  let viewModel = [
1113
1011
  ['姓名', 'name'],
1114
1012
  ['電話', 'phone'],
@@ -1117,11 +1015,8 @@ export class ShoppingOrderManager {
1117
1015
  if (vm.mode == 'read') {
1118
1016
  return viewModel
1119
1017
  .map((item) => {
1120
- return html `
1121
- <div>${item[0]}:
1122
- ${orderData.orderData.user_info[item[1]] || '未填寫'}
1123
- </div>
1124
- ${BgWidget.mbContainer(4)}`;
1018
+ return html ` <div>${item[0]}: ${orderData.orderData.user_info[item[1]] || '未填寫'}</div>
1019
+ ${BgWidget.mbContainer(4)}`;
1125
1020
  })
1126
1021
  .join('');
1127
1022
  }
@@ -1129,25 +1024,22 @@ export class ShoppingOrderManager {
1129
1024
  return viewModel
1130
1025
  .map((item) => {
1131
1026
  return html `
1132
- <div class="d-flex flex-column w-100"
1133
- style="gap:8px;">
1134
- <div style="${item[0] == '姓名' ? '' : 'margin-top:12px;'}">
1135
- ${item[0]}
1136
- </div>
1137
- <input
1138
- style="display: flex;padding: 9px 18px;align-items: flex-start;gap: 10px;flex: 1 0 0;border-radius: 10px;border: 1px solid #DDD;"
1139
- value="${orderData.orderData.user_info[item[1]]}"
1140
- onchange="${gvc.event((e) => {
1027
+ <div class="d-flex flex-column w-100" style="gap:8px;">
1028
+ <div style="${item[0] == '姓名' ? '' : 'margin-top:12px;'}">${item[0]}</div>
1029
+ <input
1030
+ style="display: flex;padding: 9px 18px;align-items: flex-start;gap: 10px;flex: 1 0 0;border-radius: 10px;border: 1px solid #DDD;"
1031
+ value="${orderData.orderData.user_info[item[1]]}"
1032
+ onchange="${gvc.event((e) => {
1141
1033
  orderData.orderData.user_info[item[1]] = e.value;
1142
1034
  })}"
1143
- />
1144
- </div>
1145
- `;
1035
+ />
1036
+ </div>
1037
+ `;
1146
1038
  })
1147
1039
  .join('');
1148
1040
  }
1149
1041
  })()}
1150
- </div>`,
1042
+ </div>`,
1151
1043
  ].join(BgWidget.mbContainer(18));
1152
1044
  },
1153
1045
  divCreate: { class: 'd-flex flex-column' },
@@ -1197,25 +1089,24 @@ export class ShoppingOrderManager {
1197
1089
  </div>
1198
1090
  <div style="width: 420px; max-width: 100%; position: sticky; right: 0; top: 20px; overflow: auto;">
1199
1091
  ${BgWidget.mainCard(html `
1200
- <div style="color: #393939;font-size: 16px;">
1201
- <div class="d-flex align-items-center mb-3">
1202
- <div class="tx_700">訂購人資料</div>
1203
- <div class="flex-fill"></div>
1204
- </div>
1205
- <div class="w-100 d-flex flex-column mt-2" style="gap:12px;">
1206
- ${[
1207
- html `
1208
- <div class="d-flex flex-column" style="gap:8px;">
1209
- <div
1210
- class="d-flex align-items-center"
1211
- style="color: #4D86DB;font-weight: 400; gap:8px;cursor:pointer;"
1212
- onclick="${gvc.event(() => {
1092
+ <div style="color: #393939;font-size: 16px;">
1093
+ <div class="d-flex align-items-center mb-3">
1094
+ <div class="tx_700">訂購人資料</div>
1095
+ <div class="flex-fill"></div>
1096
+ </div>
1097
+ <div class="w-100 d-flex flex-column mt-2" style="gap:12px;">
1098
+ ${[
1099
+ html ` <div class="d-flex flex-column" style="gap:8px;">
1100
+ <div
1101
+ class="d-flex align-items-center"
1102
+ style="color: #4D86DB;font-weight: 400; gap:8px;cursor:pointer;"
1103
+ onclick="${gvc.event(() => {
1213
1104
  child_vm.userID = userData.userID;
1214
1105
  child_vm.type = 'user';
1215
1106
  })}"
1216
- >
1217
- ${(_c = (_b = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '訪客'}
1218
- ${(() => {
1107
+ >
1108
+ ${(_c = (_b = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '訪客'}
1109
+ ${(() => {
1219
1110
  if (userDataLoading) {
1220
1111
  return BgWidget.secondaryInsignia('讀取中');
1221
1112
  }
@@ -1232,108 +1123,85 @@ export class ShoppingOrderManager {
1232
1123
  }
1233
1124
  return BgWidget.secondaryInsignia('訪客');
1234
1125
  })()}
1235
- </div>
1236
- <div style="color: #393939;font-weight: 400;">
1237
- ${(_f = (_e = (_d = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _d === void 0 ? void 0 : _d.phone) !== null && _e !== void 0 ? _e : orderData.orderData.user_info.phone) !== null && _f !== void 0 ? _f : '此會員未填手機'}
1238
- </div>
1239
- <div style="color: #393939;font-weight: 400;">
1240
- ${(_h = (_g = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _g === void 0 ? void 0 : _g.email) !== null && _h !== void 0 ? _h : orderData.orderData.user_info.email}
1241
- </div>
1242
- </div>`,
1126
+ </div>
1127
+ <div style="color: #393939;font-weight: 400;">
1128
+ ${(_f = (_e = (_d = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _d === void 0 ? void 0 : _d.phone) !== null && _e !== void 0 ? _e : orderData.orderData.user_info.phone) !== null && _f !== void 0 ? _f : '此會員未填手機'}
1129
+ </div>
1130
+ <div style="color: #393939;font-weight: 400;">${(_h = (_g = userData === null || userData === void 0 ? void 0 : userData.userData) === null || _g === void 0 ? void 0 : _g.email) !== null && _h !== void 0 ? _h : orderData.orderData.user_info.email}</div>
1131
+ </div>`,
1243
1132
  BgWidget.horizontalLine(),
1244
1133
  gvc.bindView({
1245
1134
  bind: `user_info`,
1246
1135
  view: () => {
1247
1136
  var _a;
1248
1137
  return html `
1249
- <div style="font-size: 16px;font-weight: 700;color:#393939">
1250
- 收件人資料
1251
- </div>
1252
- <div class="d-flex flex-column"
1253
- style="gap:8px;">
1254
- <div style="color: #4D86DB;font-weight: 400;">
1255
- ${orderData.orderData.user_info.name}
1256
- </div>
1257
- <div style="color: #393939;font-weight: 400;">
1258
- ${orderData.orderData.user_info.phone || '電話未填'}
1259
- </div>
1260
- </div>
1261
- <div class="tx_700 mt-2">付款方式</div>
1262
- <div>
1263
- ${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}
1264
- </div>
1265
- <div class="tx_700">配送方式</div>
1266
- <div class="tx_normal"
1267
- style="line-height: 140%;">
1268
- ${(_a = (orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
1138
+ <div style="font-size: 16px;font-weight: 700;color:#393939">收件人資料</div>
1139
+ <div class="d-flex flex-column" style="gap:8px;">
1140
+ <div style="color: #4D86DB;font-weight: 400;">${orderData.orderData.user_info.name}</div>
1141
+ <div style="color: #393939;font-weight: 400;">${orderData.orderData.user_info.phone || '電話未填'}</div>
1142
+ </div>
1143
+ <div class="tx_700 mt-2">付款方式</div>
1144
+ <div>${ShoppingOrderManager.getPaymentMethodText(orderData.orderData.method, orderData.orderData)}</div>
1145
+ <div class="tx_700">配送方式</div>
1146
+ <div class="tx_normal" style="line-height: 140%;">
1147
+ ${(_a = (orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
1269
1148
  return dd.value === orderData.orderData.user_info.shipment;
1270
1149
  })) === null || _a === void 0 ? void 0 : _a.name}
1271
- </div>
1272
- ${(() => {
1150
+ </div>
1151
+ ${(() => {
1273
1152
  switch (orderData.orderData.user_info.shipment) {
1274
1153
  case 'FAMIC2C':
1275
1154
  case 'HILIFEC2C':
1276
1155
  case 'OKMARTC2C':
1277
1156
  case 'UNIMARTC2C':
1278
1157
  return [
1279
- html `
1280
- <div class="d-flex flex-wrap w-100">
1281
- <span class="me-2 fw-normal fs-6">門市名稱:</span>
1282
- <div class="fw-normal fs-6"
1283
- style="white-space: normal;word-break: break-all;">
1284
- ${decodeURI(orderData.orderData.user_info.CVSStoreName)}
1285
- </div>
1286
- </div>`,
1287
- html `
1288
- <div class="fw-normal fs-6">
1289
- 代號:
1290
- ${orderData.orderData.user_info.CVSStoreID}
1291
- </div>`,
1292
- html `
1293
- <div class="fw-normal fs-6 w-100"
1294
- style="white-space: normal;word-break: break-all;">
1295
- 地址:
1296
- ${orderData.orderData.user_info.CVSAddress}
1297
- </div>`,
1158
+ html ` <div class="d-flex flex-wrap w-100">
1159
+ <span class="me-2 fw-normal fs-6">門市名稱:</span>
1160
+ <div class="fw-normal fs-6" style="white-space: normal;word-break: break-all;">
1161
+ ${decodeURI(orderData.orderData.user_info.CVSStoreName)}
1162
+ </div>
1163
+ </div>`,
1164
+ html ` <div class="fw-normal fs-6">代號: ${orderData.orderData.user_info.CVSStoreID}</div>`,
1165
+ html ` <div class="fw-normal fs-6 w-100" style="white-space: normal;word-break: break-all;">
1166
+ 地址: ${orderData.orderData.user_info.CVSAddress}
1167
+ </div>`,
1298
1168
  ].join('');
1299
1169
  case 'normal':
1300
1170
  return [
1301
- html `
1302
- <div class="fw-normal fs-6"
1303
- style="white-space: normal;">
1304
- ${orderData.orderData.user_info.address}
1305
- </div>`,
1171
+ html ` <div class="fw-normal fs-6" style="white-space: normal;">${orderData.orderData.user_info.address}</div>`,
1306
1172
  ].join('');
1307
1173
  default:
1308
1174
  const formData = (orderData.orderData.shipment_selector || ShoppingOrderManager.supportShipmentMethod()).find((dd) => {
1309
1175
  return dd.value === orderData.orderData.user_info.shipment;
1310
1176
  });
1311
1177
  if (formData.form) {
1312
- return formData.form.map((dd) => {
1178
+ return formData.form
1179
+ .map((dd) => {
1313
1180
  return `<div class="d-flex flex-wrap w-100">
1314
1181
  <span class="me-2 fw-normal fs-6">${dd.title}:</span>
1315
1182
  <div class="fw-normal fs-6" style="white-space: normal;word-break: break-all;">
1316
1183
  ${orderData.orderData.user_info.custom_form_delivery[dd.key]}
1317
1184
  </div>
1318
1185
  </div>`;
1319
- }).join('');
1186
+ })
1187
+ .join('');
1320
1188
  }
1321
1189
  else {
1322
1190
  return ``;
1323
1191
  }
1324
1192
  }
1325
1193
  })()}
1326
- `;
1194
+ `;
1327
1195
  },
1328
1196
  divCreate: {
1329
1197
  style: 'gap:8px;',
1330
- class: 'd-flex flex-column'
1198
+ class: 'd-flex flex-column',
1331
1199
  },
1332
1200
  }),
1333
1201
  ].join('')}
1334
- </div>
1335
1202
  </div>
1336
- `, 'p-0', 'padding: 20px !important; ')}
1203
+ </div>
1204
+ `, 'p-0', 'padding: 20px !important; ')}
1337
1205
  <div style="margin-top: 24px;"></div>
1338
1206
  ${BgWidget.mainCard(gvc.bindView(() => {
1339
1207
  const id = glitter.getUUID();
@@ -1345,24 +1213,23 @@ export class ShoppingOrderManager {
1345
1213
  view: () => {
1346
1214
  var _a;
1347
1215
  return html `
1348
- <div class="d-flex align-items-center ">
1349
- <div class="tx_700">用戶備註</div>
1350
- <div class="flex-fill"></div>
1351
- <i
1352
- class="fa-solid fa-pencil d-none"
1353
- style="cursor:pointer;"
1354
- onclick="${gvc.event(() => {
1216
+ <div class="d-flex align-items-center ">
1217
+ <div class="tx_700">用戶備註</div>
1218
+ <div class="flex-fill"></div>
1219
+ <i
1220
+ class="fa-solid fa-pencil d-none"
1221
+ style="cursor:pointer;"
1222
+ onclick="${gvc.event(() => {
1355
1223
  vm.mode = vm.mode === 'edit' ? 'read' : 'edit';
1356
1224
  gvc.notifyDataChange(id);
1357
1225
  })}"
1358
- ></i>
1359
- </div>
1226
+ ></i>
1227
+ </div>
1360
1228
 
1361
- <div class="fs-6 w-100 mt-2 lh-lg fw-normal"
1362
- style="word-break: break-all;white-space:normal;">
1363
- ${(((_a = orderData.orderData.user_info.note) !== null && _a !== void 0 ? _a : '') + (orderData.orderData.user_info.code_note || '') || '尚未填寫').replace(/\n/g, `<br>`)}
1364
- </div>
1365
- `;
1229
+ <div class="fs-6 w-100 mt-2 lh-lg fw-normal" style="word-break: break-all;white-space:normal;">
1230
+ ${(((_a = orderData.orderData.user_info.note) !== null && _a !== void 0 ? _a : '') + (orderData.orderData.user_info.code_note || '') || '尚未填寫').replace(/\n/g, `<br>`)}
1231
+ </div>
1232
+ `;
1366
1233
  },
1367
1234
  divCreate: {
1368
1235
  class: ` fw-normal`,
@@ -1383,28 +1250,23 @@ export class ShoppingOrderManager {
1383
1250
  orderData.orderData.custom_form_format.filter((dd) => {
1384
1251
  return orderData.orderData.custom_form_data[dd.key];
1385
1252
  }).length > 0) {
1386
- return (html `
1387
- <div style="margin-top: 24px;"></div>` +
1253
+ return (html ` <div style="margin-top: 24px;"></div>` +
1388
1254
  BgWidget.mainCard(html `
1389
- <div class="p-2" style="color: #393939;font-size: 16px;">
1390
- ${orderData.orderData.custom_form_format
1255
+ <div class="p-2" style="color: #393939;font-size: 16px;">
1256
+ ${orderData.orderData.custom_form_format
1391
1257
  .filter((dd) => {
1392
1258
  return orderData.orderData.custom_form_data[dd.key];
1393
1259
  })
1394
1260
  .map((dd) => {
1395
- return html `
1396
- <div class="d-flex align-items-center">
1397
- <div class="tx_700">${dd.title}
1398
- </div>
1399
- <div class="flex-fill"></div>
1400
- </div>
1401
- <div style="color: #393939;font-weight: 400;">
1402
- ${orderData.orderData.custom_form_data[dd.key]}
1403
- </div>`;
1261
+ return html ` <div class="d-flex align-items-center">
1262
+ <div class="tx_700">${dd.title}</div>
1263
+ <div class="flex-fill"></div>
1264
+ </div>
1265
+ <div style="color: #393939;font-weight: 400;">${orderData.orderData.custom_form_data[dd.key]}</div>`;
1404
1266
  })
1405
1267
  .join('')}
1406
- </div>
1407
- `));
1268
+ </div>
1269
+ `));
1408
1270
  }
1409
1271
  else {
1410
1272
  return ``;
@@ -1625,9 +1487,9 @@ export class ShoppingOrderManager {
1625
1487
  shipmentFree = false;
1626
1488
  let leftHTML = newVoucher.title
1627
1489
  ? html `
1628
- <div>折扣</div>
1629
- <div style="font-size: 14px;color:#8D8D8D;font-weight: 400;">${newVoucher.title}</div>
1630
- `
1490
+ <div>折扣</div>
1491
+ <div style="font-size: 14px;color:#8D8D8D;font-weight: 400;">${newVoucher.title}</div>
1492
+ `
1631
1493
  : `折扣`;
1632
1494
  let rightTitle = '新增折扣';
1633
1495
  shipmentFree = newVoucher.reBackType == 'shipment_free';
@@ -1662,9 +1524,9 @@ export class ShoppingOrderManager {
1662
1524
  let rightHTML = html `
1663
1525
  <div style="color: #4D86DB;position: relative;">
1664
1526
  <div
1665
- class=" "
1666
- style="cursor: pointer;width:158px;text-align: right"
1667
- onclick="${gvc.event(() => {
1527
+ class=" "
1528
+ style="cursor: pointer;width:158px;text-align: right"
1529
+ onclick="${gvc.event(() => {
1668
1530
  showDiscountEdit = !showDiscountEdit;
1669
1531
  gvc.notifyDataChange('orderDetail');
1670
1532
  })}"
@@ -1679,107 +1541,97 @@ export class ShoppingOrderManager {
1679
1541
  view: () => {
1680
1542
  var _a;
1681
1543
  let discountHTML = ``;
1682
- let checkBox = html `
1683
- <div
1684
- style="margin-right:6px;display: flex;width: 16px;height: 16px;justify-content: center;align-items: center;border-radius: 20px;border: 4px solid #393939"
1685
- ></div>`;
1686
- let uncheckBox = html `
1687
- <div style="margin-right:6px;width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
1544
+ let checkBox = html ` <div
1545
+ style="margin-right:6px;display: flex;width: 16px;height: 16px;justify-content: center;align-items: center;border-radius: 20px;border: 4px solid #393939"
1546
+ ></div>`;
1547
+ let uncheckBox = html ` <div style="margin-right:6px;width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
1688
1548
  showArray.map((rowData, index) => {
1689
1549
  if (rowData.select) {
1690
1550
  function drawVoucherDetail(rowData) {
1691
1551
  switch (rowData.value) {
1692
1552
  case 'rebate':
1693
1553
  case 'discount': {
1694
- return html `
1695
- <div class="w-100 d-flex"
1696
- style="padding-left: 8px;margin-top: 8px;">
1697
- <div style="height: 100%;width:1px;background-color: #E5E5E5;margin-right: 14px;"></div>
1698
- <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;flex: 1 0 0;">
1699
- <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 8px;align-self: stretch;">
1700
- <div
1701
- style="display: flex;align-items: center;gap: 6px;"
1702
- onclick="${gvc.event(() => {
1554
+ return html ` <div class="w-100 d-flex" style="padding-left: 8px;margin-top: 8px;">
1555
+ <div style="height: 100%;width:1px;background-color: #E5E5E5;margin-right: 14px;"></div>
1556
+ <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;flex: 1 0 0;">
1557
+ <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 8px;align-self: stretch;">
1558
+ <div
1559
+ style="display: flex;align-items: center;gap: 6px;"
1560
+ onclick="${gvc.event(() => {
1703
1561
  rowData.method = 'percent';
1704
1562
  tempData.method = 'percent';
1705
1563
  gvc.notifyDataChange('editDiscount');
1706
1564
  })}"
1707
- >
1708
- ${rowData.method == 'percent' ? checkBox : uncheckBox}
1709
- 百分比
1710
- </div>
1711
- <div
1712
- style="${rowData.method == 'percent'
1565
+ >
1566
+ ${rowData.method == 'percent' ? checkBox : uncheckBox} 百分比
1567
+ </div>
1568
+ <div
1569
+ style="${rowData.method == 'percent'
1713
1570
  ? 'display: flex'
1714
1571
  : 'display: none'};padding-left: 8px;align-items: center;gap: 14px;align-self: stretch;position:relative;"
1715
- >
1716
- <svg xmlns="http://www.w3.org/2000/svg"
1717
- width="2" height="40"
1718
- viewBox="0 0 2 40" fill="none">
1719
- <path d="M1 0V40" stroke="#E5E5E5"/>
1720
- </svg>
1721
- <input
1722
- class="w-100"
1723
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
1724
- type="number"
1725
- max="100"
1726
- min="1"
1727
- value="${rowData.discount}"
1728
- onchange="${gvc.event((e) => {
1572
+ >
1573
+ <svg xmlns="http://www.w3.org/2000/svg" width="2" height="40" viewBox="0 0 2 40" fill="none">
1574
+ <path d="M1 0V40" stroke="#E5E5E5" />
1575
+ </svg>
1576
+ <input
1577
+ class="w-100"
1578
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
1579
+ type="number"
1580
+ max="100"
1581
+ min="1"
1582
+ value="${rowData.discount}"
1583
+ onchange="${gvc.event((e) => {
1729
1584
  e.value = Math.min(e.value, 100);
1730
1585
  rowData.discount = e.value;
1731
1586
  tempData.discount = e.value;
1732
1587
  })}"
1733
- />
1734
- <div
1735
- class="h-100 d-flex align-items-center"
1736
- style="color: #8D8D8D;font-size: 16px;font-style: normal;font-weight: 400;position: absolute;top:0;right:18px;"
1737
- >
1738
- %
1739
- </div>
1740
- </div>
1741
- </div>
1742
- <div style="display: flex;gap: 6px;flex-direction: column;width: 100%;">
1743
- <div
1744
- style="display: flex;align-items: center;gap: 6px;"
1745
- onclick="${gvc.event(() => {
1588
+ />
1589
+ <div
1590
+ class="h-100 d-flex align-items-center"
1591
+ style="color: #8D8D8D;font-size: 16px;font-style: normal;font-weight: 400;position: absolute;top:0;right:18px;"
1592
+ >
1593
+ %
1594
+ </div>
1595
+ </div>
1596
+ </div>
1597
+ <div style="display: flex;gap: 6px;flex-direction: column;width: 100%;">
1598
+ <div
1599
+ style="display: flex;align-items: center;gap: 6px;"
1600
+ onclick="${gvc.event(() => {
1746
1601
  rowData.method = 'fixed';
1747
1602
  tempData.method = 'fixed';
1748
1603
  gvc.notifyDataChange('editDiscount');
1749
1604
  })}"
1750
- >
1751
- ${rowData.method == 'fixed' ? checkBox : uncheckBox}
1752
- 固定金額
1753
- </div>
1754
- <div
1755
- style="${rowData.method == 'fixed'
1605
+ >
1606
+ ${rowData.method == 'fixed' ? checkBox : uncheckBox} 固定金額
1607
+ </div>
1608
+ <div
1609
+ style="${rowData.method == 'fixed'
1756
1610
  ? 'display: flex'
1757
1611
  : 'display: none'};padding-left: 8px;align-items: center;gap: 14px;align-self: stretch;position:relative;"
1758
- >
1759
- <svg xmlns="http://www.w3.org/2000/svg"
1760
- width="2" height="40"
1761
- viewBox="0 0 2 40" fill="none">
1762
- <path d="M1 0V40" stroke="#E5E5E5"/>
1763
- </svg>
1764
- <input
1765
- class="w-100"
1766
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
1767
- type="number"
1768
- value="${rowData.discount}"
1769
- min="1"
1770
- onchange="${gvc.event((e) => {
1612
+ >
1613
+ <svg xmlns="http://www.w3.org/2000/svg" width="2" height="40" viewBox="0 0 2 40" fill="none">
1614
+ <path d="M1 0V40" stroke="#E5E5E5" />
1615
+ </svg>
1616
+ <input
1617
+ class="w-100"
1618
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
1619
+ type="number"
1620
+ value="${rowData.discount}"
1621
+ min="1"
1622
+ onchange="${gvc.event((e) => {
1771
1623
  rowData.discount = e.value;
1772
1624
  tempData.discount = e.value;
1773
1625
  })}"
1774
- />
1775
- <div
1776
- class="h-100 d-flex align-items-center"
1777
- style="color: #8D8D8D;font-size: 16px;font-style: normal;font-weight: 400;position: absolute;top:0;right:18px;"
1778
- ></div>
1779
- </div>
1780
- </div>
1781
- </div>
1782
- </div>`;
1626
+ />
1627
+ <div
1628
+ class="h-100 d-flex align-items-center"
1629
+ style="color: #8D8D8D;font-size: 16px;font-style: normal;font-weight: 400;position: absolute;top:0;right:18px;"
1630
+ ></div>
1631
+ </div>
1632
+ </div>
1633
+ </div>
1634
+ </div>`;
1783
1635
  }
1784
1636
  default:
1785
1637
  return ``;
@@ -1787,20 +1639,19 @@ export class ShoppingOrderManager {
1787
1639
  }
1788
1640
  tempData.reBackType = rowData.value;
1789
1641
  discountHTML += html `
1790
- <div class="w-100 d-flex align-items-center flex-wrap"
1791
- style="color:#393939">
1792
- ${checkBox}
1793
- <div>${rowData.text}</div>
1794
- ${drawVoucherDetail(rowData)}
1795
- </div>
1796
- `;
1642
+ <div class="w-100 d-flex align-items-center flex-wrap" style="color:#393939">
1643
+ ${checkBox}
1644
+ <div>${rowData.text}</div>
1645
+ ${drawVoucherDetail(rowData)}
1646
+ </div>
1647
+ `;
1797
1648
  }
1798
1649
  else {
1799
1650
  discountHTML += html `
1800
- <div
1801
- class="w-100 d-flex align-items-center"
1802
- style="color:#393939;cursor: pointer;"
1803
- onclick="${gvc.event(() => {
1651
+ <div
1652
+ class="w-100 d-flex align-items-center"
1653
+ style="color:#393939;cursor: pointer;"
1654
+ onclick="${gvc.event(() => {
1804
1655
  showArray = [
1805
1656
  {
1806
1657
  value: 'discount',
@@ -1820,34 +1671,32 @@ export class ShoppingOrderManager {
1820
1671
  showArray[index].select = true;
1821
1672
  gvc.notifyDataChange('editDiscount');
1822
1673
  })}"
1823
- >
1824
- ${uncheckBox}
1825
- <div>${rowData.text}</div>
1826
- </div>
1827
- `;
1674
+ >
1675
+ ${uncheckBox}
1676
+ <div>${rowData.text}</div>
1677
+ </div>
1678
+ `;
1828
1679
  }
1829
1680
  });
1830
1681
  return html `
1831
- <div class="d-flex flex-column " style="font-weight: 700;">
1832
- 折扣名稱
1833
- <input
1834
- class="w-100"
1835
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;margin-top:12px;"
1836
- value="${(_a = tempData.title) !== null && _a !== void 0 ? _a : ''}"
1837
- onchange="${gvc.event((e) => {
1682
+ <div class="d-flex flex-column " style="font-weight: 700;">
1683
+ 折扣名稱
1684
+ <input
1685
+ class="w-100"
1686
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;margin-top:12px;"
1687
+ value="${(_a = tempData.title) !== null && _a !== void 0 ? _a : ''}"
1688
+ onchange="${gvc.event((e) => {
1838
1689
  tempData.title = e.value;
1839
1690
  })}"
1840
- />
1841
- </div>
1842
- <div class="d-flex flex-column" style="font-weight: 700;gap:8px;">折扣方式
1843
- ${discountHTML}
1844
- </div>
1845
- <div class="d-flex w-100 justify-content-end" style="gap:14px;">
1846
- ${BgWidget.cancel(gvc.event(() => {
1691
+ />
1692
+ </div>
1693
+ <div class="d-flex flex-column" style="font-weight: 700;gap:8px;">折扣方式 ${discountHTML}</div>
1694
+ <div class="d-flex w-100 justify-content-end" style="gap:14px;">
1695
+ ${BgWidget.cancel(gvc.event(() => {
1847
1696
  showDiscountEdit = !showDiscountEdit;
1848
1697
  gvc.notifyDataChange('orderDetail');
1849
1698
  }))}
1850
- ${BgWidget.save(gvc.event(() => {
1699
+ ${BgWidget.save(gvc.event(() => {
1851
1700
  showDiscountEdit = !showDiscountEdit;
1852
1701
  newVoucher.reBackType = tempData.reBackType;
1853
1702
  newVoucher.method = tempData.method;
@@ -1855,8 +1704,8 @@ export class ShoppingOrderManager {
1855
1704
  newVoucher.title = tempData.title;
1856
1705
  gvc.notifyDataChange('orderDetail');
1857
1706
  }), '確定')}
1858
- </div>
1859
- `;
1707
+ </div>
1708
+ `;
1860
1709
  },
1861
1710
  divCreate: {
1862
1711
  style: `display: flex;color:#393939;text-align: left;width: 348px;padding: 24px;flex-direction: column;gap: 18px;border-radius: 10px;background: #FFF;box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.15);position:absolute;right:0;top:33px;gap:18px;z-index:3;`,
@@ -1928,9 +1777,7 @@ export class ShoppingOrderManager {
1928
1777
  returnHTML += html `
1929
1778
  <div class="w-100 d-flex align-items-center justify-content-end" style="min-height: 21px;">
1930
1779
  <div style="text-align: right;">${rowData.left}</div>
1931
- <div style="width:158px;text-align: right">
1932
- ${rowData.left === '折扣' ? rowData.right : `$${rowData.right.toLocaleString()}`}
1933
- </div>
1780
+ <div style="width:158px;text-align: right">${rowData.left === '折扣' ? rowData.right : `$${rowData.right.toLocaleString()}`}</div>
1934
1781
  </div>
1935
1782
  `;
1936
1783
  });
@@ -1989,14 +1836,12 @@ export class ShoppingOrderManager {
1989
1836
  </div>
1990
1837
  <!-- 訂單內容 --- 商品資訊 -->
1991
1838
  <div
1992
- style="color: #393939;width: 100%;display: flex;padding: 20px;flex-direction: column;align-items: flex-start;gap: 18px;align-self: stretch;border-radius: 10px;background: #FFF;box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);"
1839
+ style="color: #393939;width: 100%;display: flex;padding: 20px;flex-direction: column;align-items: flex-start;gap: 18px;align-self: stretch;border-radius: 10px;background: #FFF;box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);"
1993
1840
  >
1994
1841
  <div class="tx_700">訂單內容</div>
1995
1842
  <div style="width: 100%;display: flex;align-items: center;padding-right: 20px;">
1996
1843
  <div class="flex-fill d-flex align-items-center col-5 tx_700">商品</div>
1997
- <div class="col-3 pe-lg-3"
1998
- style="display: flex;align-items: flex-start;font-size: 16px;font-weight: 700;">單價
1999
- </div>
1844
+ <div class="col-3 pe-lg-3" style="display: flex;align-items: flex-start;font-size: 16px;font-weight: 700;">單價</div>
2000
1845
  <div class="col-2 tx_700">數量</div>
2001
1846
  <div class="tx_700" style="width: 50px; text-align: right;">小計</div>
2002
1847
  </div>
@@ -2014,31 +1859,27 @@ export class ShoppingOrderManager {
2014
1859
  selectVariant.qty = selectVariant.qty || 1;
2015
1860
  returnHTML += html `
2016
1861
  <div style="width: 100%;display: flex;align-items: center;position: relative;padding-right: 20px;">
2017
- <div class="flex-fill d-flex align-items-center col-5"
2018
- style="font-size: 16px;font-weight: 700;gap: 12px;">
1862
+ <div class="flex-fill d-flex align-items-center col-5" style="font-size: 16px;font-weight: 700;gap: 12px;">
2019
1863
  <div style="width: 54px;height: 54px; background: url('${productIMG}') lightgray 50% / cover no-repeat;"></div>
2020
1864
  <div style="display: flex;flex-direction: column;align-items: flex-start;gap: 4px;width: calc(100% - 54px);padding-right: 15px;">
2021
- <div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100%;">
2022
- ${product.content.title}
2023
- </div>
1865
+ <div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100%;">${product.content.title}</div>
2024
1866
  <div class="d-flex" style="gap:8px;font-weight: 400;">
2025
1867
  ${(() => {
2026
1868
  if (selectVariant.spec.length > 0) {
2027
1869
  let tempHTML = ``;
2028
1870
  selectVariant.spec.map((spec) => {
2029
- tempHTML += html `
2030
- <div
2031
- style="display: flex;height: 22px;padding: 4px 6px;justify-content: center;align-items: center;gap: 10px;border-radius: 7px;background: #EAEAEA;"
2032
- >
2033
- ${spec}
2034
- </div>`;
1871
+ tempHTML += html ` <div
1872
+ style="display: flex;height: 22px;padding: 4px 6px;justify-content: center;align-items: center;gap: 10px;border-radius: 7px;background: #EAEAEA;"
1873
+ >
1874
+ ${spec}
1875
+ </div>`;
2035
1876
  });
2036
1877
  return tempHTML;
2037
1878
  }
2038
1879
  else {
2039
1880
  return html `
2040
1881
  <div
2041
- style="display: flex;height: 22px;padding: 4px 6px;justify-content: center;align-items: center;gap: 10px;border-radius: 7px;background: #EAEAEA;"
1882
+ style="display: flex;height: 22px;padding: 4px 6px;justify-content: center;align-items: center;gap: 10px;border-radius: 7px;background: #EAEAEA;"
2042
1883
  >
2043
1884
  單一規格
2044
1885
  </div>
@@ -2046,26 +1887,22 @@ export class ShoppingOrderManager {
2046
1887
  }
2047
1888
  })()}
2048
1889
  </div>
2049
- <div style="color: #8D8D8D;font-size: 14px;font-weight: 400;">存貨單位
2050
- (SKU):
2051
- ${selectVariant.sku.length ? selectVariant.sku : 'sku未指定'}
2052
- </div>
1890
+ <div style="color: #8D8D8D;font-size: 14px;font-weight: 400;">存貨單位 (SKU): ${selectVariant.sku.length ? selectVariant.sku : 'sku未指定'}</div>
2053
1891
  </div>
2054
1892
  </div>
2055
- <div class="col-3"
2056
- style="display: flex;padding-right: 40px;align-items: flex-start;font-size: 16px;font-weight: 400;">
2057
- $${(() => {
1893
+ <div class="col-3" style="display: flex;padding-right: 40px;align-items: flex-start;font-size: 16px;font-weight: 400;">
1894
+ $${(() => {
2058
1895
  const price = parseInt(`${selectVariant.sale_price}`, 10);
2059
1896
  return isNaN(price) ? 0 : price.toLocaleString();
2060
1897
  })()}
2061
1898
  </div>
2062
1899
  <div class="tx_700" style="width:15%">
2063
1900
  <input
2064
- type="number"
2065
- value="${selectVariant.qty}"
2066
- style="width: 80px;transform: translateX(-16px);text-align: center;display: flex;padding: 9px 18px;align-items: center;gap: 32px;border-radius: 10px;border: 1px solid #DDD;"
2067
- min="0"
2068
- onchange="${gvc.event((e) => {
1901
+ type="number"
1902
+ value="${selectVariant.qty}"
1903
+ style="width: 80px;transform: translateX(-16px);text-align: center;display: flex;padding: 9px 18px;align-items: center;gap: 32px;border-radius: 10px;border: 1px solid #DDD;"
1904
+ min="0"
1905
+ onchange="${gvc.event((e) => {
2069
1906
  if (e.value < 1) {
2070
1907
  const dialog = new ShareDialog(glitter);
2071
1908
  dialog.warningMessage({
@@ -2093,19 +1930,16 @@ export class ShoppingOrderManager {
2093
1930
  <div style="min-width: 6%;font-size: 16px;font-weight: 400;width: 50px;text-align: right;">
2094
1931
  <span>$${(selectVariant.sale_price * selectVariant.qty).toLocaleString()}</span>
2095
1932
  <div
2096
- class="d-flex align-items-center cursor_pointer"
2097
- style="position: absolute;right:0;top:50%;transform: translateY(-50%)"
2098
- onclick="${gvc.event(() => {
1933
+ class="d-flex align-items-center cursor_pointer"
1934
+ style="position: absolute;right:0;top:50%;transform: translateY(-50%)"
1935
+ onclick="${gvc.event(() => {
2099
1936
  newOrder.productCheck.splice(index, 1);
2100
1937
  gvc.notifyDataChange('listProduct');
2101
1938
  })}"
2102
1939
  >
2103
- <svg xmlns="http://www.w3.org/2000/svg" width="11" height="10"
2104
- viewBox="0 0 11 10" fill="none">
2105
- <path d="M1.51367 9.24219L9.99895 0.756906" stroke="#DDDDDD"
2106
- stroke-width="1.3" stroke-linecap="round"/>
2107
- <path d="M9.99805 9.24219L1.51276 0.756907" stroke="#DDDDDD"
2108
- stroke-width="1.3" stroke-linecap="round"/>
1940
+ <svg xmlns="http://www.w3.org/2000/svg" width="11" height="10" viewBox="0 0 11 10" fill="none">
1941
+ <path d="M1.51367 9.24219L9.99895 0.756906" stroke="#DDDDDD" stroke-width="1.3" stroke-linecap="round" />
1942
+ <path d="M9.99805 9.24219L1.51276 0.756907" stroke="#DDDDDD" stroke-width="1.3" stroke-linecap="round" />
2109
1943
  </svg>
2110
1944
  </div>
2111
1945
  </div>
@@ -2125,9 +1959,9 @@ export class ShoppingOrderManager {
2125
1959
  view: () => {
2126
1960
  return html `
2127
1961
  <div
2128
- class="w-100 d-flex justify-content-center align-items-center"
2129
- style="color: #36B;"
2130
- onclick="${gvc.event(() => {
1962
+ class="w-100 d-flex justify-content-center align-items-center"
1963
+ style="color: #36B;"
1964
+ onclick="${gvc.event(() => {
2131
1965
  let confirm = true;
2132
1966
  window.parent.glitter.innerDialog((gvc) => {
2133
1967
  newOrder.query = '';
@@ -2139,42 +1973,39 @@ export class ShoppingOrderManager {
2139
1973
  var _a;
2140
1974
  let width = window.innerWidth > 1000 ? 690 : 350;
2141
1975
  let searchLoading = false;
2142
- return html `
2143
- <div
2144
- style="display: flex;width: ${width}px;flex-direction: column;align-items: flex-start;gap: 18px;border-radius: 10px;background: #FFF;"
2145
- >
2146
- <div
2147
- class="w-100"
2148
- style="display: flex;height: 46px;padding: 20px 20px 12px;align-items: center;align-self: stretch;color: #393939;font-size: 16px;font-weight: 700;"
2149
- >
2150
- 搜尋商品
2151
- </div>
2152
- <div class="w-100"
2153
- style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;">
2154
- <div class="w-100"
2155
- style="display: flex;padding: 0px 24px;flex-direction: column;align-items: center;gap: 18px;">
2156
- <div style="display: flex;justify-content: center;align-items: flex-start;gap: 12px;align-self: stretch;">
2157
- <div class="w-100 position-relative">
2158
- <i
2159
- class="fa-regular fa-magnifying-glass"
2160
- style="font-size: 18px; color: #A0A0A0; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);"
2161
- aria-hidden="true"
2162
- ></i>
2163
- <input
2164
- class="form-control h-100"
2165
- style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px;"
2166
- placeholder="輸入商品名稱或商品貨號"
2167
- oninput="${gvc.event((e) => {
1976
+ return html ` <div
1977
+ style="display: flex;width: ${width}px;flex-direction: column;align-items: flex-start;gap: 18px;border-radius: 10px;background: #FFF;"
1978
+ >
1979
+ <div
1980
+ class="w-100"
1981
+ style="display: flex;height: 46px;padding: 20px 20px 12px;align-items: center;align-self: stretch;color: #393939;font-size: 16px;font-weight: 700;"
1982
+ >
1983
+ 搜尋商品
1984
+ </div>
1985
+ <div class="w-100" style="display: flex;flex-direction: column;align-items: flex-start;gap: 12px;">
1986
+ <div class="w-100" style="display: flex;padding: 0px 24px;flex-direction: column;align-items: center;gap: 18px;">
1987
+ <div style="display: flex;justify-content: center;align-items: flex-start;gap: 12px;align-self: stretch;">
1988
+ <div class="w-100 position-relative">
1989
+ <i
1990
+ class="fa-regular fa-magnifying-glass"
1991
+ style="font-size: 18px; color: #A0A0A0; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);"
1992
+ aria-hidden="true"
1993
+ ></i>
1994
+ <input
1995
+ class="form-control h-100"
1996
+ style="border-radius: 10px; border: 1px solid #DDD; padding-left: 50px;"
1997
+ placeholder="輸入商品名稱或商品貨號"
1998
+ oninput="${gvc.event((e) => {
2168
1999
  searchLoading = false;
2169
2000
  newOrder.query = e.value;
2170
2001
  newOrder.productArray = [];
2171
2002
  gvc.notifyDataChange('productArray');
2172
2003
  })}"
2173
- value="${(_a = newOrder.query) !== null && _a !== void 0 ? _a : ''}"
2174
- />
2175
- </div>
2004
+ value="${(_a = newOrder.query) !== null && _a !== void 0 ? _a : ''}"
2005
+ />
2006
+ </div>
2176
2007
 
2177
- ${BgWidget.updownFilter({
2008
+ ${BgWidget.updownFilter({
2178
2009
  gvc,
2179
2010
  callback: (value) => {
2180
2011
  searchLoading = false;
@@ -2185,11 +2016,11 @@ export class ShoppingOrderManager {
2185
2016
  default: newOrder.orderString || 'default',
2186
2017
  options: FilterOptions.productOrderBy,
2187
2018
  })}
2188
- </div>
2189
- <div
2190
- style="height:350px;display: flex;justify-content: center;align-items: flex-start;padding-right: 24px;align-self: stretch;overflow-y: scroll;"
2191
- >
2192
- ${gvc.bindView({
2019
+ </div>
2020
+ <div
2021
+ style="height:350px;display: flex;justify-content: center;align-items: flex-start;padding-right: 24px;align-self: stretch;overflow-y: scroll;"
2022
+ >
2023
+ ${gvc.bindView({
2193
2024
  bind: 'productArray',
2194
2025
  view: () => {
2195
2026
  if (!searchLoading) {
@@ -2206,11 +2037,9 @@ export class ShoppingOrderManager {
2206
2037
  return BgWidget.spinner();
2207
2038
  }
2208
2039
  if (newOrder.productArray.length == 0) {
2209
- return html `
2210
- <div class="w-100 h-100 d-flex align-items-center justify-content-center"
2211
- style="color:#8D8D8D;">
2212
- 查無此商品
2213
- </div>`;
2040
+ return html ` <div class="w-100 h-100 d-flex align-items-center justify-content-center" style="color:#8D8D8D;">
2041
+ 查無此商品
2042
+ </div>`;
2214
2043
  }
2215
2044
  return newOrder.productArray
2216
2045
  .map((product, productIndex) => {
@@ -2218,98 +2047,94 @@ export class ShoppingOrderManager {
2218
2047
  bind: `product${productIndex}`,
2219
2048
  view: () => {
2220
2049
  return html `
2221
- ${(() => {
2050
+ ${(() => {
2222
2051
  if (product.select) {
2223
- return html `
2224
- <svg
2225
- xmlns="http://www.w3.org/2000/svg"
2226
- width="16"
2227
- height="16"
2228
- viewBox="0 0 16 16"
2229
- fill="none"
2230
- onclick="${gvc.event(() => {
2052
+ return html ` <svg
2053
+ xmlns="http://www.w3.org/2000/svg"
2054
+ width="16"
2055
+ height="16"
2056
+ viewBox="0 0 16 16"
2057
+ fill="none"
2058
+ onclick="${gvc.event(() => {
2231
2059
  product.select = false;
2232
2060
  gvc.notifyDataChange(`product${productIndex}`);
2233
2061
  })}"
2234
- >
2235
- <rect width="16"
2236
- height="16"
2237
- rx="3"
2238
- fill="#393939"/>
2239
- <path
2240
- d="M4.5 8.5L7 11L11.5 5"
2241
- stroke="white"
2242
- stroke-width="2"
2243
- stroke-linecap="round"
2244
- stroke-linejoin="round"
2245
- />
2246
- </svg>`;
2062
+ >
2063
+ <rect width="16" height="16" rx="3" fill="#393939" />
2064
+ <path
2065
+ d="M4.5 8.5L7 11L11.5 5"
2066
+ stroke="white"
2067
+ stroke-width="2"
2068
+ stroke-linecap="round"
2069
+ stroke-linejoin="round"
2070
+ />
2071
+ </svg>`;
2247
2072
  }
2248
2073
  else {
2249
2074
  return html `
2250
- <div
2251
- style="display: flex;align-items: center;justify-content: center;height: 60px;width: 16px;cursor: pointer;"
2252
- onclick="${gvc.event(() => {
2075
+ <div
2076
+ style="display: flex;align-items: center;justify-content: center;height: 60px;width: 16px;cursor: pointer;"
2077
+ onclick="${gvc.event(() => {
2253
2078
  product.select = true;
2254
2079
  if (product.content.variants.length > 1) {
2255
2080
  product.selectIndex = window.parent.document.querySelector('.varitantSelect').value;
2256
2081
  }
2257
2082
  gvc.notifyDataChange(`product${productIndex}`);
2258
2083
  })}"
2259
- >
2260
- <div
2261
- style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;cursor: pointer;"
2262
- ></div>
2263
- </div>
2264
- `;
2084
+ >
2085
+ <div
2086
+ style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;cursor: pointer;"
2087
+ ></div>
2088
+ </div>
2089
+ `;
2265
2090
  }
2266
2091
  })()}
2267
- <div
2268
- style="width: 50px;height: 50px;border-radius: 5px;background: url('${product.content
2092
+ <div
2093
+ style="width: 50px;height: 50px;border-radius: 5px;background: url('${product.content
2269
2094
  .preview_image[0]}') lightgray 50% / cover no-repeat;"
2270
- ></div>
2271
- <div class="flex-fill d-flex flex-column">
2272
- <div style="color:#393939;font-size: 14px;font-weight: 400;margin-bottom: 4px;">
2273
- ${product.content.title}
2274
- </div>
2275
- ${(() => {
2095
+ ></div>
2096
+ <div class="flex-fill d-flex flex-column">
2097
+ <div style="color:#393939;font-size: 14px;font-weight: 400;margin-bottom: 4px;">
2098
+ ${product.content.title}
2099
+ </div>
2100
+ ${(() => {
2276
2101
  if (product.content.variants.length > 1) {
2277
2102
  return html `
2278
- <select
2279
- class="w-100 d-flex align-items-center form-select varitantSelect"
2280
- style="border-radius: 10px;border: 1px solid #DDD;padding: 6px 18px;"
2281
- onchange="${gvc.event((e) => {
2103
+ <select
2104
+ class="w-100 d-flex align-items-center form-select varitantSelect"
2105
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 6px 18px;"
2106
+ onchange="${gvc.event((e) => {
2282
2107
  product.selectIndex = e.value;
2283
2108
  })}"
2284
- >
2285
- ${(() => {
2109
+ >
2110
+ ${(() => {
2286
2111
  let optionHTML = ``;
2287
2112
  product.content.variants.map((variant, index) => {
2288
2113
  optionHTML += html `
2289
- <option
2290
- value="${index}"
2291
- ${(() => {
2114
+ <option
2115
+ value="${index}"
2116
+ ${(() => {
2292
2117
  if (product.selectIndex == index)
2293
2118
  return `selected`;
2294
2119
  else
2295
2120
  return ``;
2296
2121
  })()}
2297
- >
2298
- ${variant.spec.join(', ')}
2299
- </option>
2300
- `;
2122
+ >
2123
+ ${variant.spec.join(', ')}
2124
+ </option>
2125
+ `;
2301
2126
  });
2302
2127
  return optionHTML;
2303
2128
  })()}
2304
- </select>
2305
- `;
2129
+ </select>
2130
+ `;
2306
2131
  }
2307
2132
  else {
2308
2133
  return `<div class="d-flex align-items-center" style="height: 34px;color: #8D8D8D;font-size: 14px;font-weight: 400;">單一規格</div>`;
2309
2134
  }
2310
2135
  })()}
2311
- </div>
2312
- `;
2136
+ </div>
2137
+ `;
2313
2138
  },
2314
2139
  divCreate: {
2315
2140
  style: `display: flex;padding: 0px 12px;align-items: center;gap: 18px;align-self: stretch;`,
@@ -2320,18 +2145,17 @@ export class ShoppingOrderManager {
2320
2145
  },
2321
2146
  divCreate: {
2322
2147
  class: `d-flex flex-column h-100`,
2323
- style: `gap: 18px;width:100%;`
2148
+ style: `gap: 18px;width:100%;`,
2324
2149
  },
2325
2150
  })}
2326
- </div>
2327
- </div>
2328
- <div class="w-100"
2329
- style="display: flex;padding: 12px 20px;align-items: center;justify-content: end;gap: 10px;">
2330
- ${BgWidget.cancel(gvc.event(() => {
2151
+ </div>
2152
+ </div>
2153
+ <div class="w-100" style="display: flex;padding: 12px 20px;align-items: center;justify-content: end;gap: 10px;">
2154
+ ${BgWidget.cancel(gvc.event(() => {
2331
2155
  confirm = false;
2332
2156
  gvc.closeDialog();
2333
2157
  }))}
2334
- ${BgWidget.save(gvc.event(() => {
2158
+ ${BgWidget.save(gvc.event(() => {
2335
2159
  confirm = true;
2336
2160
  newOrder.productTemp = [];
2337
2161
  newOrder.productArray.map((product) => {
@@ -2341,9 +2165,9 @@ export class ShoppingOrderManager {
2341
2165
  });
2342
2166
  gvc.closeDialog();
2343
2167
  }))}
2344
- </div>
2345
- </div>
2346
- </div>`;
2168
+ </div>
2169
+ </div>
2170
+ </div>`;
2347
2171
  },
2348
2172
  divCreate: {},
2349
2173
  });
@@ -2378,12 +2202,9 @@ export class ShoppingOrderManager {
2378
2202
  })}"
2379
2203
  >
2380
2204
  新增一個商品
2381
- <svg style="margin-left: 5px;" xmlns="http://www.w3.org/2000/svg" width="14"
2382
- height="14" viewBox="0 0 14 14" fill="none">
2383
- <path d="M1.5 7.23926H12.5" stroke="#3366BB" stroke-width="2"
2384
- stroke-linecap="round" stroke-linejoin="round"/>
2385
- <path d="M6.76172 1.5L6.76172 12.5" stroke="#3366BB" stroke-width="2"
2386
- stroke-linecap="round" stroke-linejoin="round"/>
2205
+ <svg style="margin-left: 5px;" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
2206
+ <path d="M1.5 7.23926H12.5" stroke="#3366BB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
2207
+ <path d="M6.76172 1.5L6.76172 12.5" stroke="#3366BB" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
2387
2208
  </svg>
2388
2209
  </div>
2389
2210
  `;
@@ -2403,10 +2224,8 @@ export class ShoppingOrderManager {
2403
2224
  view: () => {
2404
2225
  var _a, _b, _c, _d;
2405
2226
  customerData.info.searchable = true;
2406
- let checkBox = html `
2407
- <div style="display: flex;width: 16px;height: 16px;justify-content: center;align-items: center;border-radius: 20px;border: solid 4px #393939"></div>`;
2408
- let uncheckBox = html `
2409
- <div style="width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
2227
+ let checkBox = html ` <div style="display: flex;width: 16px;height: 16px;justify-content: center;align-items: center;border-radius: 20px;border: solid 4px #393939"></div>`;
2228
+ let uncheckBox = html ` <div style="width: 16px;height: 16px;border-radius: 20px;border: 1px solid #DDD;"></div>`;
2410
2229
  function syncUserData() {
2411
2230
  orderDetail.user_info.name = tempUserData[customerData.type].name;
2412
2231
  orderDetail.user_info.phone = tempUserData[customerData.type].phone;
@@ -2414,24 +2233,23 @@ export class ShoppingOrderManager {
2414
2233
  }
2415
2234
  syncUserData();
2416
2235
  return html `
2417
- <div class="tx_700">顧客資料</div>
2418
- <div class="d-flex flex-column">
2419
- ${customerData.type == 'auto'
2236
+ <div class="tx_700">顧客資料</div>
2237
+ <div class="d-flex flex-column">
2238
+ ${customerData.type == 'auto'
2420
2239
  ? html `
2421
- <div class="d-flex align-items-center" style="cursor: pointer;">
2422
- ${checkBox}
2423
- <div style="margin-left: 6px">現有的顧客</div>
2424
- </div>
2425
- <div class="d-flex align-items-center position-relative"
2426
- style="min-height:40px;padding-left: 22px;margin-top: 8px;">
2427
- <div style="height: 100%;width:1px;background-color: #E5E5E5;position: absolute;left: 8px;top: 0;"></div>
2428
- <div class="position-relative w-100 d-flex flex-column">
2429
- <input
2430
- class="w-100 searchInput"
2431
- placeholder="搜尋現有顧客"
2432
- value="${(_a = customerData.info.search) !== null && _a !== void 0 ? _a : ''}"
2433
- style="padding: 9px 18px;border-radius: 10px;border: 1px solid #DDD;"
2434
- onkeyup="${gvc.event((e) => {
2240
+ <div class="d-flex align-items-center" style="cursor: pointer;">
2241
+ ${checkBox}
2242
+ <div style="margin-left: 6px">現有的顧客</div>
2243
+ </div>
2244
+ <div class="d-flex align-items-center position-relative" style="min-height:40px;padding-left: 22px;margin-top: 8px;">
2245
+ <div style="height: 100%;width:1px;background-color: #E5E5E5;position: absolute;left: 8px;top: 0;"></div>
2246
+ <div class="position-relative w-100 d-flex flex-column">
2247
+ <input
2248
+ class="w-100 searchInput"
2249
+ placeholder="搜尋現有顧客"
2250
+ value="${(_a = customerData.info.search) !== null && _a !== void 0 ? _a : ''}"
2251
+ style="padding: 9px 18px;border-radius: 10px;border: 1px solid #DDD;"
2252
+ onkeyup="${gvc.event((e) => {
2435
2253
  if (customerData.info.searchable) {
2436
2254
  customerData.info.searchable = false;
2437
2255
  customerData.info.search = e.value;
@@ -2448,8 +2266,8 @@ export class ShoppingOrderManager {
2448
2266
  }, 100);
2449
2267
  }
2450
2268
  })}"
2451
- />
2452
- ${gvc.bindView({
2269
+ />
2270
+ ${gvc.bindView({
2453
2271
  bind: `accountSelect`,
2454
2272
  dataList: [{ obj: customerData, key: 'pageType' }],
2455
2273
  view: () => {
@@ -2467,10 +2285,10 @@ export class ShoppingOrderManager {
2467
2285
  rowData.map((data) => {
2468
2286
  var _a, _b;
2469
2287
  selectHTML += html `
2470
- <div
2471
- class="w-100"
2472
- style="cursor: pointer;"
2473
- onclick="${gvc.event(() => {
2288
+ <div
2289
+ class="w-100"
2290
+ style="cursor: pointer;"
2291
+ onclick="${gvc.event(() => {
2474
2292
  var _a, _b;
2475
2293
  tempUserData[customerData.type] = data;
2476
2294
  orderDetail.user_info.name = data.userData.name;
@@ -2479,40 +2297,35 @@ export class ShoppingOrderManager {
2479
2297
  customerData.pageType = 'check';
2480
2298
  document.querySelector(`.searchInput`).value = `${(_a = data.userData.name) !== null && _a !== void 0 ? _a : 'uname'}(${(_b = data.account) !== null && _b !== void 0 ? _b : 'unknown email'})`;
2481
2299
  })}"
2482
- >
2483
- ${(_a = data.userData.name) !== null && _a !== void 0 ? _a : 'uname'}
2484
- (${(_b = data.account) !== null && _b !== void 0 ? _b : 'unknown email'}
2485
- )
2486
- </div>
2487
- `;
2300
+ >
2301
+ ${(_a = data.userData.name) !== null && _a !== void 0 ? _a : 'uname'} (${(_b = data.account) !== null && _b !== void 0 ? _b : 'unknown email'} )
2302
+ </div>
2303
+ `;
2488
2304
  });
2489
2305
  return html `
2490
- <div
2491
- class="w-100 d-flex flex-column"
2492
- style="gap:12px;position: absolute;right: 0; top: calc(100% + 12px);background-color: white;padding: 24px;flex-direction: column;justify-content: center;align-items: flex-start;border-radius: 10px;border: 1px solid #DDD;box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.15);"
2493
- >
2494
- ${selectHTML}
2495
- </div>
2496
- `;
2306
+ <div
2307
+ class="w-100 d-flex flex-column"
2308
+ style="gap:12px;position: absolute;right: 0; top: calc(100% + 12px);background-color: white;padding: 24px;flex-direction: column;justify-content: center;align-items: flex-start;border-radius: 10px;border: 1px solid #DDD;box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.15);"
2309
+ >
2310
+ ${selectHTML}
2311
+ </div>
2312
+ `;
2497
2313
  }
2498
2314
  case 'check': {
2499
2315
  return html `
2500
- <div>姓名</div>
2501
- <div class="w-100"
2502
- style="border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
2503
- ${(_a = tempUserData[customerData.type].userData.name) !== null && _a !== void 0 ? _a : 'uname'}
2504
- </div>
2505
- <div>電子信箱</div>
2506
- <div class="w-100"
2507
- style="border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
2508
- ${(_b = tempUserData[customerData.type].account) !== null && _b !== void 0 ? _b : 'unknown email'}
2509
- </div>
2510
- <div>電話</div>
2511
- <div class="w-100"
2512
- style="min-height:45px;border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
2513
- ${(_c = tempUserData[customerData.type].phone) !== null && _c !== void 0 ? _c : ''}
2514
- </div>
2515
- `;
2316
+ <div>姓名</div>
2317
+ <div class="w-100" style="border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
2318
+ ${(_a = tempUserData[customerData.type].userData.name) !== null && _a !== void 0 ? _a : 'uname'}
2319
+ </div>
2320
+ <div>電子信箱</div>
2321
+ <div class="w-100" style="border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
2322
+ ${(_b = tempUserData[customerData.type].account) !== null && _b !== void 0 ? _b : 'unknown email'}
2323
+ </div>
2324
+ <div>電話</div>
2325
+ <div class="w-100" style="min-height:45px;border-radius: 10px;border: 1px solid #DDD;background: #F7F7F7;padding: 9px 18px;">
2326
+ ${(_c = tempUserData[customerData.type].phone) !== null && _c !== void 0 ? _c : ''}
2327
+ </div>
2328
+ `;
2516
2329
  }
2517
2330
  case undefined:
2518
2331
  case 'none': {
@@ -2523,14 +2336,13 @@ export class ShoppingOrderManager {
2523
2336
  },
2524
2337
  divCreate: {},
2525
2338
  })}
2526
- </div>
2527
- </div>
2528
- `
2529
- : html `
2530
- <div
2531
- class="d-flex align-items-center"
2532
- style="margin-bottom: 12px;cursor: pointer;"
2533
- onclick="${gvc.event(() => {
2339
+ </div>
2340
+ </div>
2341
+ `
2342
+ : html ` <div
2343
+ class="d-flex align-items-center"
2344
+ style="margin-bottom: 12px;cursor: pointer;"
2345
+ onclick="${gvc.event(() => {
2534
2346
  if (customerData.type == 'manual') {
2535
2347
  orderDetail.user_info = {
2536
2348
  CVSAddress: '',
@@ -2550,50 +2362,48 @@ export class ShoppingOrderManager {
2550
2362
  customerData.sameCustomer = false;
2551
2363
  gvc.notifyDataChange('setLogistics');
2552
2364
  })}"
2553
- >
2554
- ${uncheckBox}
2555
- <div style="margin-left: 6px">現有的顧客</div>
2556
- </div>`}
2557
- ${customerData.type == 'manual'
2365
+ >
2366
+ ${uncheckBox}
2367
+ <div style="margin-left: 6px">現有的顧客</div>
2368
+ </div>`}
2369
+ ${customerData.type == 'manual'
2558
2370
  ? html `
2559
- <div class="d-flex align-items-center" style="cursor: pointer;">
2560
- ${checkBox}
2561
- <div style="margin-left: 6px">手動加入顧客</div>
2562
- </div>
2563
- <div class="d-flex align-items-center position-relative"
2564
- style="min-height:40px;padding-left: 22px;margin-top: 8px;">
2565
- <div style="height: 100%;width:1px;background-color: #E5E5E5;position: absolute;left: 8px;top: 0;"></div>
2566
- <div class="position-relative w-100 d-flex flex-column"
2567
- style="gap:8px;">
2568
- <div>姓名</div>
2569
- <input
2570
- class="w-100"
2571
- value="${(_b = orderDetail.user_info.name) !== null && _b !== void 0 ? _b : ''}"
2572
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2573
- placeholder="請輸入姓名"
2574
- onchange="${gvc.event((e) => {
2371
+ <div class="d-flex align-items-center" style="cursor: pointer;">
2372
+ ${checkBox}
2373
+ <div style="margin-left: 6px">手動加入顧客</div>
2374
+ </div>
2375
+ <div class="d-flex align-items-center position-relative" style="min-height:40px;padding-left: 22px;margin-top: 8px;">
2376
+ <div style="height: 100%;width:1px;background-color: #E5E5E5;position: absolute;left: 8px;top: 0;"></div>
2377
+ <div class="position-relative w-100 d-flex flex-column" style="gap:8px;">
2378
+ <div>姓名</div>
2379
+ <input
2380
+ class="w-100"
2381
+ value="${(_b = orderDetail.user_info.name) !== null && _b !== void 0 ? _b : ''}"
2382
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2383
+ placeholder="請輸入姓名"
2384
+ onchange="${gvc.event((e) => {
2575
2385
  tempUserData[customerData.type].name = e.value;
2576
2386
  orderDetail.user_info.name = e.value;
2577
2387
  })}"
2578
- />
2579
- <div>電話</div>
2580
- <input
2581
- class="w-100"
2582
- value="${(_c = orderDetail.user_info.phone) !== null && _c !== void 0 ? _c : ''}"
2583
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2584
- placeholder="請輸入電話"
2585
- onchange="${gvc.event((e) => {
2388
+ />
2389
+ <div>電話</div>
2390
+ <input
2391
+ class="w-100"
2392
+ value="${(_c = orderDetail.user_info.phone) !== null && _c !== void 0 ? _c : ''}"
2393
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2394
+ placeholder="請輸入電話"
2395
+ onchange="${gvc.event((e) => {
2586
2396
  tempUserData[customerData.type].phone = e.value;
2587
2397
  orderDetail.user_info.phone = e.value;
2588
2398
  })}"
2589
- />
2590
- <div>電子信箱</div>
2591
- <input
2592
- class="w-100"
2593
- value="${(_d = orderDetail.user_info.email) !== null && _d !== void 0 ? _d : ''}"
2594
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2595
- placeholder="請輸入電子信箱,同時會註冊暫時會員"
2596
- onchange="${gvc.event((e) => {
2399
+ />
2400
+ <div>電子信箱</div>
2401
+ <input
2402
+ class="w-100"
2403
+ value="${(_d = orderDetail.user_info.email) !== null && _d !== void 0 ? _d : ''}"
2404
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2405
+ placeholder="請輸入電子信箱,同時會註冊暫時會員"
2406
+ onchange="${gvc.event((e) => {
2597
2407
  tempUserData[customerData.type].email = e.value;
2598
2408
  ApiUser.getEmailCount(e.value).then((r) => {
2599
2409
  if (r.response.result) {
@@ -2605,15 +2415,14 @@ export class ShoppingOrderManager {
2605
2415
  });
2606
2416
  orderDetail.user_info.email = e.value;
2607
2417
  })}"
2608
- />
2609
- </div>
2610
- </div>
2611
- `
2612
- : html `
2613
- <div
2614
- class="d-flex align-items-center"
2615
- style="margin-top: 12px;cursor: pointer;"
2616
- onclick="${gvc.event(() => {
2418
+ />
2419
+ </div>
2420
+ </div>
2421
+ `
2422
+ : html ` <div
2423
+ class="d-flex align-items-center"
2424
+ style="margin-top: 12px;cursor: pointer;"
2425
+ onclick="${gvc.event(() => {
2617
2426
  if (customerData.type == 'auto') {
2618
2427
  orderDetail.user_info = {
2619
2428
  CVSAddress: '',
@@ -2633,12 +2442,12 @@ export class ShoppingOrderManager {
2633
2442
  customerData.sameCustomer = false;
2634
2443
  gvc.notifyDataChange(['setLogistics']);
2635
2444
  })}"
2636
- >
2637
- ${uncheckBox}
2638
- <div style="margin-left: 6px;">手動加入顧客</div>
2639
- </div>`}
2640
- </div>
2641
- `;
2445
+ >
2446
+ ${uncheckBox}
2447
+ <div style="margin-left: 6px;">手動加入顧客</div>
2448
+ </div>`}
2449
+ </div>
2450
+ `;
2642
2451
  },
2643
2452
  divCreate: { class: `d-flex flex-column`, style: `gap:18px;` },
2644
2453
  }))}
@@ -2649,66 +2458,47 @@ export class ShoppingOrderManager {
2649
2458
  view: () => {
2650
2459
  var _a, _b, _c;
2651
2460
  return html `
2652
- <div class="tx_700">設定金物流</div>
2653
- <div class="d-flex flex-column" style="gap: 18px">
2654
- <div class="d-flex align-items-center w-100" style="gap:18px;">
2655
- <div class="d-flex flex-column flex-fill" style="gap: 8px;">
2656
- <div>付款方式 / 付款狀態</div>
2657
- <select
2658
- class="form-select"
2659
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2660
- onchange="${gvc.event((e) => {
2461
+ <div class="tx_700">設定金物流</div>
2462
+ <div class="d-flex flex-column" style="gap: 18px">
2463
+ <div class="d-flex align-items-center w-100" style="gap:18px;">
2464
+ <div class="d-flex flex-column flex-fill" style="gap: 8px;">
2465
+ <div>付款方式 / 付款狀態</div>
2466
+ <select
2467
+ class="form-select"
2468
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2469
+ onchange="${gvc.event((e) => {
2661
2470
  orderDetail.pay_status = e.value;
2662
2471
  })}"
2663
- >
2664
- <option value="1" ${orderDetail.pay_status == 1 ? 'selected' : ''}>
2665
- 線下付款-已付款
2666
- </option>
2667
- <option value="0" ${orderDetail.pay_status == 0 ? 'selected' : ''}>
2668
- 線下付款-未付款
2669
- </option>
2670
- </select>
2671
- </div>
2672
- <div class="d-flex flex-column flex-fill" style="gap: 8px;">
2673
- <div>運送方法</div>
2674
- <select
2675
- class="form-select"
2676
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2677
- onchange="${gvc.event((e) => {
2472
+ >
2473
+ <option value="1" ${orderDetail.pay_status == 1 ? 'selected' : ''}>線下付款-已付款</option>
2474
+ <option value="0" ${orderDetail.pay_status == 0 ? 'selected' : ''}>線下付款-未付款</option>
2475
+ </select>
2476
+ </div>
2477
+ <div class="d-flex flex-column flex-fill" style="gap: 8px;">
2478
+ <div>運送方法</div>
2479
+ <select
2480
+ class="form-select"
2481
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2482
+ onchange="${gvc.event((e) => {
2678
2483
  orderDetail.user_info.shipment = e.value;
2679
2484
  orderDetailRefresh = true;
2680
2485
  gvc.notifyDataChange(['listProduct', 'orderDetail']);
2681
2486
  })}"
2682
- >
2683
- <option value="normal"
2684
- ${orderDetail.user_info.shipment == 'normal' ? 'selected' : ''}>
2685
- 宅配
2686
- </option>
2687
- <option value="UNIMARTC2C"
2688
- ${orderDetail.user_info.shipment == 'UNIMARTC2C' ? 'selected' : ''}>
2689
- 7-11店到店
2690
- </option>
2691
- <option value="FAMIC2C"
2692
- ${orderDetail.user_info.shipment == 'FAMIC2C' ? 'selected' : ''}>
2693
- 全家店到店
2694
- </option>
2695
- <option value="OKMARTC2C"
2696
- ${orderDetail.user_info.shipment == 'OKMARTC2C' ? 'selected' : ''}>
2697
- OK店到店
2698
- </option>
2699
- <option value="HILIFEC2C"
2700
- ${orderDetail.user_info.shipment == 'HILIFEC2C' ? 'selected' : ''}>
2701
- 萊爾富店到店
2702
- </option>
2703
- </select>
2704
- </div>
2487
+ >
2488
+ <option value="normal" ${orderDetail.user_info.shipment == 'normal' ? 'selected' : ''}>宅配</option>
2489
+ <option value="UNIMARTC2C" ${orderDetail.user_info.shipment == 'UNIMARTC2C' ? 'selected' : ''}>7-11店到店</option>
2490
+ <option value="FAMIC2C" ${orderDetail.user_info.shipment == 'FAMIC2C' ? 'selected' : ''}>全家店到店</option>
2491
+ <option value="OKMARTC2C" ${orderDetail.user_info.shipment == 'OKMARTC2C' ? 'selected' : ''}>OK店到店</option>
2492
+ <option value="HILIFEC2C" ${orderDetail.user_info.shipment == 'HILIFEC2C' ? 'selected' : ''}>萊爾富店到店</option>
2493
+ </select>
2705
2494
  </div>
2495
+ </div>
2706
2496
 
2707
- <div class="tx_700">收件人資料</div>
2708
- <div
2709
- class="d-flex align-items-center"
2710
- style="gap:6px;cursor: pointer;"
2711
- onclick="${gvc.event(() => {
2497
+ <div class="tx_700">收件人資料</div>
2498
+ <div
2499
+ class="d-flex align-items-center"
2500
+ style="gap:6px;cursor: pointer;"
2501
+ onclick="${gvc.event(() => {
2712
2502
  var _a;
2713
2503
  customerData.sameCustomer = !customerData.sameCustomer;
2714
2504
  if (customerData.sameCustomer && !((_a = orderDetail.user_info) === null || _a === void 0 ? void 0 : _a.email)) {
@@ -2723,57 +2513,52 @@ export class ShoppingOrderManager {
2723
2513
  }
2724
2514
  gvc.notifyDataChange('setLogistics');
2725
2515
  })}"
2726
- >
2727
- ${customerData.sameCustomer
2728
- ? html `
2729
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
2730
- viewBox="0 0 16 16" fill="none">
2731
- <rect width="16" height="16" rx="3" fill="#393939"/>
2732
- <path d="M4.5 8.5L7 11L11.5 5" stroke="white"
2733
- stroke-width="2" stroke-linecap="round"
2734
- stroke-linejoin="round"/>
2735
- </svg>`
2736
- : html `
2737
- <div style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;"></div>`}
2738
- 同顧客資料
2739
- </div>
2740
- <div class="d-flex flex-column" style="gap: 8px">
2741
- <div>姓名</div>
2742
- <input
2743
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2744
- value="${(_a = orderDetail.customer_info.name) !== null && _a !== void 0 ? _a : ''}"
2745
- placeholder="請輸入姓名"
2746
- onchange="${gvc.event((e) => {
2516
+ >
2517
+ ${customerData.sameCustomer
2518
+ ? html ` <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
2519
+ <rect width="16" height="16" rx="3" fill="#393939" />
2520
+ <path d="M4.5 8.5L7 11L11.5 5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
2521
+ </svg>`
2522
+ : html ` <div style="width: 16px;height: 16px;border-radius: 3px;border: 1px solid #DDD;"></div>`}
2523
+ 同顧客資料
2524
+ </div>
2525
+ <div class="d-flex flex-column" style="gap: 8px">
2526
+ <div>姓名</div>
2527
+ <input
2528
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2529
+ value="${(_a = orderDetail.customer_info.name) !== null && _a !== void 0 ? _a : ''}"
2530
+ placeholder="請輸入姓名"
2531
+ onchange="${gvc.event((e) => {
2747
2532
  orderDetail.customer_info.name = e.value;
2748
2533
  })}"
2749
- ${customerData.sameCustomer ? 'disabled' : ''}
2750
- />
2751
- </div>
2752
- <div class="d-flex flex-column" style="gap: 8px">
2753
- <div>電話</div>
2754
- <input
2755
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2756
- value="${(_b = orderDetail.customer_info.phone) !== null && _b !== void 0 ? _b : ''}"
2757
- placeholder="請輸入電話"
2758
- onchange="${gvc.event((e) => {
2534
+ ${customerData.sameCustomer ? 'disabled' : ''}
2535
+ />
2536
+ </div>
2537
+ <div class="d-flex flex-column" style="gap: 8px">
2538
+ <div>電話</div>
2539
+ <input
2540
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2541
+ value="${(_b = orderDetail.customer_info.phone) !== null && _b !== void 0 ? _b : ''}"
2542
+ placeholder="請輸入電話"
2543
+ onchange="${gvc.event((e) => {
2759
2544
  orderDetail.customer_info.phone = e.value;
2760
2545
  })}"
2761
- />
2762
- </div>
2763
- <div class="d-flex flex-column" style="gap: 8px">
2764
- <div>電子信箱</div>
2765
- <input
2766
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2767
- value="${(_c = orderDetail.customer_info.email) !== null && _c !== void 0 ? _c : ''}"
2768
- placeholder="請輸入電子信箱"
2769
- onchange="${gvc.event((e) => {
2546
+ />
2547
+ </div>
2548
+ <div class="d-flex flex-column" style="gap: 8px">
2549
+ <div>電子信箱</div>
2550
+ <input
2551
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;"
2552
+ value="${(_c = orderDetail.customer_info.email) !== null && _c !== void 0 ? _c : ''}"
2553
+ placeholder="請輸入電子信箱"
2554
+ onchange="${gvc.event((e) => {
2770
2555
  orderDetail.customer_info.email = e.value;
2771
2556
  })}"
2772
- ${customerData.sameCustomer ? 'disabled' : ''}
2773
- />
2774
- </div>
2775
- <div class="d-flex flex-column" style="gap: 8px">
2776
- ${gvc.bindView({
2557
+ ${customerData.sameCustomer ? 'disabled' : ''}
2558
+ />
2559
+ </div>
2560
+ <div class="d-flex flex-column" style="gap: 8px">
2561
+ ${gvc.bindView({
2777
2562
  bind: 'CVSStore',
2778
2563
  dataList: [{ obj: orderDetail.user_info, key: 'shipment' }],
2779
2564
  view: () => {
@@ -2781,16 +2566,16 @@ export class ShoppingOrderManager {
2781
2566
  switch ((_a = orderDetail.user_info) === null || _a === void 0 ? void 0 : _a.shipment) {
2782
2567
  case 'normal': {
2783
2568
  return html `
2784
- <div>宅配地址</div>
2785
- <input
2786
- style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;margin-top:8px;width: 100%;"
2787
- value="${(_b = orderDetail.user_info.address) !== null && _b !== void 0 ? _b : ''}"
2788
- placeholder="請輸入宅配地址"
2789
- onchange="${gvc.event((e) => {
2569
+ <div>宅配地址</div>
2570
+ <input
2571
+ style="border-radius: 10px;border: 1px solid #DDD;padding: 9px 18px;margin-top:8px;width: 100%;"
2572
+ value="${(_b = orderDetail.user_info.address) !== null && _b !== void 0 ? _b : ''}"
2573
+ placeholder="請輸入宅配地址"
2574
+ onchange="${gvc.event((e) => {
2790
2575
  orderDetail.user_info.address = e.value;
2791
2576
  })}"
2792
- />
2793
- `;
2577
+ />
2578
+ `;
2794
2579
  }
2795
2580
  default: {
2796
2581
  let returnHTML = ``;
@@ -2802,57 +2587,49 @@ export class ShoppingOrderManager {
2802
2587
  OKMARTC2C: `https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/1716734510490-beb1c70f9e168b7bab198ea2bf226148.png`,
2803
2588
  };
2804
2589
  returnHTML = html `
2805
- <div class="d-flex flex-column">
2806
- <div class="d-flex align-items-center">
2807
- <img style="width: 32px;height: 32px;margin-right: 8px;"
2808
- src="${icon[orderDetail.user_info.shipment]}"
2809
- alt="icon"/>
2810
- <div
2811
- style="color:#4D86DB"
2812
- onclick="${gvc.event(() => {
2590
+ <div class="d-flex flex-column">
2591
+ <div class="d-flex align-items-center">
2592
+ <img style="width: 32px;height: 32px;margin-right: 8px;" src="${icon[orderDetail.user_info.shipment]}" alt="icon" />
2593
+ <div
2594
+ style="color:#4D86DB"
2595
+ onclick="${gvc.event(() => {
2813
2596
  selectCVS(orderDetail.user_info.shipment);
2814
2597
  })}"
2815
- >
2816
- 點擊更換門市
2817
- </div>
2818
- </div>
2819
- <div class="d-flex">門市名稱:
2820
- ${orderDetail.user_info.CVSStoreName}
2821
- </div>
2822
- <div class="d-flex">門市店號:
2823
- ${orderDetail.user_info.CVSStoreID}
2824
- </div>
2825
- <div class="d-flex">門市地址:
2826
- ${orderDetail.user_info.CVSAddress}
2598
+ >
2599
+ 點擊更換門市
2827
2600
  </div>
2828
2601
  </div>
2829
- `;
2602
+ <div class="d-flex">門市名稱: ${orderDetail.user_info.CVSStoreName}</div>
2603
+ <div class="d-flex">門市店號: ${orderDetail.user_info.CVSStoreID}</div>
2604
+ <div class="d-flex">門市地址: ${orderDetail.user_info.CVSAddress}</div>
2605
+ </div>
2606
+ `;
2830
2607
  return html `
2831
- <div>取貨門市</div>
2832
- ${returnHTML}
2833
- `;
2608
+ <div>取貨門市</div>
2609
+ ${returnHTML}
2610
+ `;
2834
2611
  }
2835
2612
  else {
2836
2613
  return html `
2837
- <div>取貨門市</div>
2838
- <div
2839
- style="color: #4D86DB;cursor: pointer;margin-top:8px;cursor: pointer"
2840
- onclick="${gvc.event(() => {
2614
+ <div>取貨門市</div>
2615
+ <div
2616
+ style="color: #4D86DB;cursor: pointer;margin-top:8px;cursor: pointer"
2617
+ onclick="${gvc.event(() => {
2841
2618
  selectCVS(orderDetail.user_info.shipment);
2842
2619
  })}"
2843
- >
2844
- 請選擇取貨門市
2845
- </div>
2846
- `;
2620
+ >
2621
+ 請選擇取貨門市
2622
+ </div>
2623
+ `;
2847
2624
  }
2848
2625
  }
2849
2626
  }
2850
2627
  },
2851
2628
  divCreate: {},
2852
2629
  })}
2853
- </div>
2854
2630
  </div>
2855
- `;
2631
+ </div>
2632
+ `;
2856
2633
  },
2857
2634
  divCreate: { class: `d-flex flex-column`, style: `color:#393939;gap:18px;` },
2858
2635
  }))}
@@ -2861,8 +2638,8 @@ export class ShoppingOrderManager {
2861
2638
  <div class="d-flex flex-column" style="gap: 8px">
2862
2639
  <div class="tx_700">訂單備註</div>
2863
2640
  <textarea
2864
- style="cursor: pointer;height: 80px;padding: 9px 18px;border-radius: 10px;border: 1px solid #DDD;"
2865
- onchange="${gvc.event((e) => {
2641
+ style="cursor: pointer;height: 80px;padding: 9px 18px;border-radius: 10px;border: 1px solid #DDD;"
2642
+ onchange="${gvc.event((e) => {
2866
2643
  orderDetail.user_info.note = e.value;
2867
2644
  })}"
2868
2645
  ></textarea>
@@ -2885,46 +2662,43 @@ export class ShoppingOrderManager {
2885
2662
  dialog.dataLoading({ visible: false });
2886
2663
  window.parent.glitter.innerDialog((gvc) => {
2887
2664
  return html `
2888
- <div
2889
- style="position: relative;width: 492px;height: 223px;border-radius: 10px;background: #FFF;display: flex;flex-direction: column;align-items: center;justify-content: center;"
2890
- >
2891
- <svg
2892
- xmlns="http://www.w3.org/2000/svg"
2893
- width="14"
2894
- height="14"
2895
- viewBox="0 0 14 14"
2896
- fill="none"
2897
- style="position: absolute;top: 12px;right: 12px;cursor: pointer;"
2898
- onclick="${gvc.event(() => {
2665
+ <div
2666
+ style="position: relative;width: 492px;height: 223px;border-radius: 10px;background: #FFF;display: flex;flex-direction: column;align-items: center;justify-content: center;"
2667
+ >
2668
+ <svg
2669
+ xmlns="http://www.w3.org/2000/svg"
2670
+ width="14"
2671
+ height="14"
2672
+ viewBox="0 0 14 14"
2673
+ fill="none"
2674
+ style="position: absolute;top: 12px;right: 12px;cursor: pointer;"
2675
+ onclick="${gvc.event(() => {
2899
2676
  gvc.glitter.closeDiaLog();
2900
2677
  })}"
2901
- >
2902
- <path d="M1 1L13 13" stroke="#393939"
2903
- stroke-linecap="round"/>
2904
- <path d="M13 1L1 13" stroke="#393939"
2905
- stroke-linecap="round"/>
2906
- </svg>
2678
+ >
2679
+ <path d="M1 1L13 13" stroke="#393939" stroke-linecap="round" />
2680
+ <path d="M13 1L1 13" stroke="#393939" stroke-linecap="round" />
2681
+ </svg>
2907
2682
 
2908
- <svg xmlns="http://www.w3.org/2000/svg" width="75"
2909
- height="75" viewBox="0 0 75 75" fill="none">
2910
- <g clip-path="url(#clip0_9850_171427)">
2911
- <path
2912
- d="M37.5 7.03125C45.5808 7.03125 53.3307 10.2413 59.0447 15.9553C64.7587 21.6693 67.9688 29.4192 67.9688 37.5C67.9688 45.5808 64.7587 53.3307 59.0447 59.0447C53.3307 64.7587 45.5808 67.9688 37.5 67.9688C29.4192 67.9688 21.6693 64.7587 15.9553 59.0447C10.2413 53.3307 7.03125 45.5808 7.03125 37.5C7.03125 29.4192 10.2413 21.6693 15.9553 15.9553C21.6693 10.2413 29.4192 7.03125 37.5 7.03125ZM37.5 75C47.4456 75 56.9839 71.0491 64.0165 64.0165C71.0491 56.9839 75 47.4456 75 37.5C75 27.5544 71.0491 18.0161 64.0165 10.9835C56.9839 3.95088 47.4456 0 37.5 0C27.5544 0 18.0161 3.95088 10.9835 10.9835C3.95088 18.0161 0 27.5544 0 37.5C0 47.4456 3.95088 56.9839 10.9835 64.0165C18.0161 71.0491 27.5544 75 37.5 75ZM54.0527 30.6152C55.4297 29.2383 55.4297 27.0117 54.0527 25.6494C52.6758 24.2871 50.4492 24.2725 49.0869 25.6494L32.8271 41.9092L25.9424 35.0244C24.5654 33.6475 22.3389 33.6475 20.9766 35.0244C19.6143 36.4014 19.5996 38.6279 20.9766 39.9902L30.3516 49.3652C31.7285 50.7422 33.9551 50.7422 35.3174 49.3652L54.0527 30.6152Z"
2913
- fill="#393939"
2914
- />
2915
- </g>
2916
- <defs>
2917
- <clipPath id="clip0_9850_171427">
2918
- <rect width="75" height="75" fill="white"/>
2919
- </clipPath>
2920
- </defs>
2921
- </svg>
2922
- <div style="text-align: center;color: #393939;font-size: 16px;font-weight: 400;line-height: 160%;margin-top: 24px;">
2923
- 訂單新增成功!<br/>
2924
- 已將訂單明細發送至顧客信箱
2925
- </div>
2926
- </div>
2927
- `;
2683
+ <svg xmlns="http://www.w3.org/2000/svg" width="75" height="75" viewBox="0 0 75 75" fill="none">
2684
+ <g clip-path="url(#clip0_9850_171427)">
2685
+ <path
2686
+ d="M37.5 7.03125C45.5808 7.03125 53.3307 10.2413 59.0447 15.9553C64.7587 21.6693 67.9688 29.4192 67.9688 37.5C67.9688 45.5808 64.7587 53.3307 59.0447 59.0447C53.3307 64.7587 45.5808 67.9688 37.5 67.9688C29.4192 67.9688 21.6693 64.7587 15.9553 59.0447C10.2413 53.3307 7.03125 45.5808 7.03125 37.5C7.03125 29.4192 10.2413 21.6693 15.9553 15.9553C21.6693 10.2413 29.4192 7.03125 37.5 7.03125ZM37.5 75C47.4456 75 56.9839 71.0491 64.0165 64.0165C71.0491 56.9839 75 47.4456 75 37.5C75 27.5544 71.0491 18.0161 64.0165 10.9835C56.9839 3.95088 47.4456 0 37.5 0C27.5544 0 18.0161 3.95088 10.9835 10.9835C3.95088 18.0161 0 27.5544 0 37.5C0 47.4456 3.95088 56.9839 10.9835 64.0165C18.0161 71.0491 27.5544 75 37.5 75ZM54.0527 30.6152C55.4297 29.2383 55.4297 27.0117 54.0527 25.6494C52.6758 24.2871 50.4492 24.2725 49.0869 25.6494L32.8271 41.9092L25.9424 35.0244C24.5654 33.6475 22.3389 33.6475 20.9766 35.0244C19.6143 36.4014 19.5996 38.6279 20.9766 39.9902L30.3516 49.3652C31.7285 50.7422 33.9551 50.7422 35.3174 49.3652L54.0527 30.6152Z"
2687
+ fill="#393939"
2688
+ />
2689
+ </g>
2690
+ <defs>
2691
+ <clipPath id="clip0_9850_171427">
2692
+ <rect width="75" height="75" fill="white" />
2693
+ </clipPath>
2694
+ </defs>
2695
+ </svg>
2696
+ <div style="text-align: center;color: #393939;font-size: 16px;font-weight: 400;line-height: 160%;margin-top: 24px;">
2697
+ 訂單新增成功!<br />
2698
+ 已將訂單明細發送至顧客信箱
2699
+ </div>
2700
+ </div>
2701
+ `;
2928
2702
  }, 'orderFinish', {
2929
2703
  dismiss: () => {
2930
2704
  vm.type = 'list';
@@ -2966,8 +2740,7 @@ export class ShoppingOrderManager {
2966
2740
  if (orderData.method !== 'off_line' || orderData.customer_info.payment_select === 'cash_on_delivery') {
2967
2741
  return '';
2968
2742
  }
2969
- return html `
2970
- <div class="tx_700">付款證明回傳</div>
2743
+ return html ` <div class="tx_700">付款證明回傳</div>
2971
2744
  <div class="border rounded-3 w-100 p-3 tx_normal">
2972
2745
  ${(() => {
2973
2746
  const array = [];
@@ -2987,8 +2760,7 @@ export class ShoppingOrderManager {
2987
2760
  image: orderData.proof_purchase[dd],
2988
2761
  width: 400,
2989
2762
  height: 250,
2990
- read: () => {
2991
- },
2763
+ read: () => { },
2992
2764
  }));
2993
2765
  }
2994
2766
  });
@@ -3016,8 +2788,7 @@ export class ShoppingOrderManager {
3016
2788
  return {
3017
2789
  bind: id,
3018
2790
  view: () => {
3019
- return html `
3020
- <iframe class="outer${className}" style="height: 650px;"></iframe>`;
2791
+ return html ` <iframe class="outer${className}" style="height: 650px;"></iframe>`;
3021
2792
  },
3022
2793
  onCreate: () => {
3023
2794
  ApiDelivery.getOrderInfo({
@@ -3029,9 +2800,7 @@ export class ShoppingOrderManager {
3029
2800
  const outerIframe = document.querySelector(`iframe.outer${className}`);
3030
2801
  const outerIframeWindow = outerIframe.contentWindow;
3031
2802
  const outerIframeDocument = outerIframeWindow === null || outerIframeWindow === void 0 ? void 0 : outerIframeWindow.document;
3032
- outerIframeDocument === null || outerIframeDocument === void 0 ? void 0 : outerIframeDocument.body.insertAdjacentHTML('beforeend', html `
3033
- <iframe class="inner${className}"
3034
- style="width: 100%; height: 100%; border-width: 0 !important;"></iframe>`);
2803
+ outerIframeDocument === null || outerIframeDocument === void 0 ? void 0 : outerIframeDocument.body.insertAdjacentHTML('beforeend', html ` <iframe class="inner${className}" style="width: 100%; height: 100%; border-width: 0 !important;"></iframe>`);
3035
2804
  if (outerIframeDocument) {
3036
2805
  const si = setInterval(() => {
3037
2806
  const innerIframe = outerIframeDocument.querySelector(`iframe.inner${className}`);