ts-glitter 15.7.87 → 15.8.1
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.
- package/lowcode/Entry.js +1 -2
- package/lowcode/Entry.ts +2 -2
- package/lowcode/backend-manager/bg-recommend.js +1 -1
- package/lowcode/backend-manager/bg-recommend.ts +1 -1
- package/lowcode/cms-plugin/module/delivery-html.js +27 -0
- package/lowcode/cms-plugin/module/delivery-html.ts +34 -0
- package/lowcode/cms-plugin/module/product-setting.js +0 -1
- package/lowcode/cms-plugin/module/product-setting.ts +0 -1
- package/lowcode/cms-plugin/shopping-information.js +3 -2
- package/lowcode/cms-plugin/shopping-information.ts +5 -4
- package/lowcode/cms-plugin/shopping-order-manager.js +61 -45
- package/lowcode/cms-plugin/shopping-order-manager.ts +77 -60
- package/lowcode/glitter-base/global/currency.js +58 -2
- package/lowcode/glitter-base/global/currency.ts +69 -2
- package/lowcode/glitter-base/global/language.js +53 -16
- package/lowcode/glitter-base/global/language.ts +53 -16
- package/lowcode/glitterBundle/api/base.js +3 -0
- package/lowcode/glitterBundle/api/base.ts +3 -1
- package/lowcode/public-components/checkout/index.js +16 -17
- package/lowcode/public-components/checkout/index.ts +18 -19
- package/lowcode/public-components/footer/footer-01.js +2 -2
- package/lowcode/public-components/footer/footer-01.ts +2 -2
- package/lowcode/public-components/footer/footer-02.js +2 -2
- package/lowcode/public-components/footer/footer-02.ts +2 -2
- package/lowcode/public-components/footer/footer-03.js +1 -1
- package/lowcode/public-components/footer/footer-03.ts +1 -1
- package/lowcode/public-components/headers/header-class.js +4 -3
- package/lowcode/public-components/headers/header-class.ts +4 -3
- package/lowcode/public-components/product/pd-card-01.js +16 -6
- package/lowcode/public-components/product/pd-card-01.ts +17 -6
- package/lowcode/public-components/product/pd-card-02.js +5 -4
- package/lowcode/public-components/product/pd-card-02.ts +5 -4
- package/lowcode/public-components/product/pd-card-03.js +3 -2
- package/lowcode/public-components/product/pd-card-03.ts +3 -2
- package/lowcode/public-components/product/pd-class.js +2 -1
- package/lowcode/public-components/product/pd-class.ts +3 -1
- package/lowcode/public-components/public/language-view.js +34 -9
- package/lowcode/public-components/public/language-view.ts +64 -39
- package/lowcode/public-components/user-manager/um-class.js +1 -1
- package/lowcode/public-components/user-manager/um-class.ts +1 -1
- package/lowcode/public-components/user-manager/um-login.js +145 -135
- package/lowcode/public-components/user-manager/um-login.ts +162 -157
- package/package.json +1 -1
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/fcm.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -5
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/line-message.ts +2 -2
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/shop.js +2 -7
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +2 -6
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/services/ai-robot.d.ts +0 -1
- package/src/api-public/services/ai-robot.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/custom-code.js.map +1 -1
- package/src/api-public/services/fb-message.js.map +1 -1
- package/src/api-public/services/line-message.d.ts +2 -0
- package/src/api-public/services/line-message.js +354 -0
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/line-message.ts +397 -13
- package/src/api-public/services/notify.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/schedule.js +2 -2
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +2 -2
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopping.d.ts +2 -0
- package/src/api-public/services/shopping.js +9 -0
- package/src/api-public/services/shopping.js.map +1 -5
- package/src/api-public/services/shopping.ts +11 -0
- package/src/api-public/services/user.js +3 -1
- package/src/api-public/services/user.js.map +5 -1
- package/src/api-public/services/user.ts +3 -1
- package/src/config.d.ts +1 -1
- package/src/config.js +1 -1
- package/src/config.js.map +1 -1
- package/src/config.ts +1 -1
- package/src/index.js +6 -5
- package/src/index.js.map +3 -3
- package/src/index.ts +3 -2
- package/src/services/app.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -18,7 +18,6 @@ import { Language } from './glitter-base/global/language.js';
|
|
|
18
18
|
export class Entry {
|
|
19
19
|
static onCreate(glitter) {
|
|
20
20
|
var _a;
|
|
21
|
-
Language.getLanguage();
|
|
22
21
|
if (window.language !== Language.getLanguage()) {
|
|
23
22
|
const url = new URL(`${glitter.root_path}${Language.getLanguageLinkPrefix()}${window.glitter_page}${new URL(location.href).search}`);
|
|
24
23
|
if (glitter.getUrlParameter('appName')) {
|
|
@@ -80,7 +79,7 @@ export class Entry {
|
|
|
80
79
|
}
|
|
81
80
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
82
81
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
83
|
-
glitter.share.editerVersion = 'V_15.
|
|
82
|
+
glitter.share.editerVersion = 'V_15.8.1';
|
|
84
83
|
glitter.share.start = new Date();
|
|
85
84
|
const vm = {
|
|
86
85
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Language } from './glitter-base/global/language.js';
|
|
|
10
10
|
|
|
11
11
|
export class Entry {
|
|
12
12
|
public static onCreate(glitter: Glitter) {
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
if ((window as any).language !== Language.getLanguage()) {
|
|
15
15
|
const url = new URL(`${glitter.root_path}${Language.getLanguageLinkPrefix()}${(window as any).glitter_page}${new URL(location.href).search}`);
|
|
16
16
|
if (glitter.getUrlParameter('appName')) {
|
|
@@ -82,7 +82,7 @@ export class Entry {
|
|
|
82
82
|
|
|
83
83
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
84
84
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
85
|
-
glitter.share.editerVersion = 'V_15.
|
|
85
|
+
glitter.share.editerVersion = 'V_15.8.1';
|
|
86
86
|
glitter.share.start = new Date();
|
|
87
87
|
const vm: {
|
|
88
88
|
appConfig: any;
|
|
@@ -747,7 +747,7 @@ export class BgRecommend {
|
|
|
747
747
|
}, { single: true, readonly: vm.readonly })}`,
|
|
748
748
|
].join(BgWidget.mbContainer(18))),
|
|
749
749
|
BgWidget.mainCard([
|
|
750
|
-
html ` <div class="tx_700">分潤商品</div>`,
|
|
750
|
+
html ` <div class="tx_700 mb-3">分潤商品</div>`,
|
|
751
751
|
gvc.bindView({
|
|
752
752
|
bind: 'listProduct',
|
|
753
753
|
view: () => {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
2
|
+
const html = String.raw;
|
|
3
|
+
export class DeliveryHTML {
|
|
4
|
+
static print(ogvc) {
|
|
5
|
+
return BgWidget.fullDialog({
|
|
6
|
+
gvc: ogvc,
|
|
7
|
+
title: (gvc) => {
|
|
8
|
+
return '列印出貨單';
|
|
9
|
+
},
|
|
10
|
+
innerHTML: (gvc) => {
|
|
11
|
+
return html ` <div>123</div>`;
|
|
12
|
+
},
|
|
13
|
+
footer_html: (gvc) => {
|
|
14
|
+
return [
|
|
15
|
+
BgWidget.cancel(gvc.event(() => {
|
|
16
|
+
gvc.closeDialog();
|
|
17
|
+
})),
|
|
18
|
+
BgWidget.save(gvc.event(() => {
|
|
19
|
+
gvc.closeDialog();
|
|
20
|
+
console.log('開始列印出貨單');
|
|
21
|
+
})),
|
|
22
|
+
].join('');
|
|
23
|
+
},
|
|
24
|
+
closeCallback: () => { },
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
2
|
+
import { GVC } from '../../glitterBundle/GVController.js';
|
|
3
|
+
|
|
4
|
+
const html = String.raw;
|
|
5
|
+
|
|
6
|
+
export class DeliveryHTML {
|
|
7
|
+
static print(ogvc: GVC) {
|
|
8
|
+
return BgWidget.fullDialog({
|
|
9
|
+
gvc: ogvc,
|
|
10
|
+
title: (gvc) => {
|
|
11
|
+
return '列印出貨單';
|
|
12
|
+
},
|
|
13
|
+
innerHTML: (gvc) => {
|
|
14
|
+
return html` <div>123</div>`;
|
|
15
|
+
},
|
|
16
|
+
footer_html: (gvc: GVC) => {
|
|
17
|
+
return [
|
|
18
|
+
BgWidget.cancel(
|
|
19
|
+
gvc.event(() => {
|
|
20
|
+
gvc.closeDialog();
|
|
21
|
+
})
|
|
22
|
+
),
|
|
23
|
+
BgWidget.save(
|
|
24
|
+
gvc.event(() => {
|
|
25
|
+
gvc.closeDialog();
|
|
26
|
+
console.log('開始列印出貨單');
|
|
27
|
+
})
|
|
28
|
+
),
|
|
29
|
+
].join('');
|
|
30
|
+
},
|
|
31
|
+
closeCallback: () => {},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -6,7 +6,6 @@ export class ProductSetting {
|
|
|
6
6
|
return img || BgWidget.noImageURL;
|
|
7
7
|
}
|
|
8
8
|
const selected = obj.selected;
|
|
9
|
-
console.log("selected", selected);
|
|
10
9
|
const html = String.raw;
|
|
11
10
|
let postMD = obj.postMD;
|
|
12
11
|
let topGVC = window.parent.glitter.pageConfig[window.parent.glitter.pageConfig.length - 1].gvc;
|
|
@@ -13,7 +13,6 @@ export class ProductSetting {
|
|
|
13
13
|
return img || BgWidget.noImageURL;
|
|
14
14
|
}
|
|
15
15
|
const selected = obj.selected;
|
|
16
|
-
console.log("selected", selected);
|
|
17
16
|
const html = String.raw;
|
|
18
17
|
let postMD = obj.postMD
|
|
19
18
|
let topGVC = (window.parent as any).glitter.pageConfig[(window.parent as any).glitter.pageConfig.length - 1].gvc
|
|
@@ -467,12 +467,13 @@ export class ShoppingInformation {
|
|
|
467
467
|
type="checkbox"
|
|
468
468
|
onchange="${gvc.event((e, event) => {
|
|
469
469
|
vm.data.multi_currency = !vm.data.multi_currency;
|
|
470
|
+
gvc.notifyDataChange('basic');
|
|
470
471
|
})}"
|
|
471
472
|
${vm.data.multi_currency ? `checked` : ``}
|
|
472
473
|
/>
|
|
473
474
|
</div>
|
|
474
475
|
</div>
|
|
475
|
-
|
|
476
|
+
${vm.data.multi_currency ? `<div class="d-flex flex-column " style="gap:8px;">
|
|
476
477
|
<div style="color: #393939;font-size: 16px;">啟用貨幣切換</div>
|
|
477
478
|
<div style="color: #8D8D8D;font-size:13px;">
|
|
478
479
|
是否開放用戶於前台自行切換幣別進行顯示
|
|
@@ -488,7 +489,7 @@ export class ShoppingInformation {
|
|
|
488
489
|
${vm.data.switch_currency ? `checked` : ``}
|
|
489
490
|
/>
|
|
490
491
|
</div>
|
|
491
|
-
</div
|
|
492
|
+
</div>` : ``}
|
|
492
493
|
</div>
|
|
493
494
|
</div>
|
|
494
495
|
`, ``);
|
|
@@ -496,12 +496,13 @@ export class ShoppingInformation {
|
|
|
496
496
|
type="checkbox"
|
|
497
497
|
onchange="${gvc.event((e, event) => {
|
|
498
498
|
vm.data.multi_currency = !vm.data.multi_currency
|
|
499
|
+
gvc.notifyDataChange('basic')
|
|
499
500
|
})}"
|
|
500
501
|
${vm.data.multi_currency ? `checked` : ``}
|
|
501
502
|
/>
|
|
502
503
|
</div>
|
|
503
504
|
</div>
|
|
504
|
-
|
|
505
|
+
${vm.data.multi_currency ? `<div class="d-flex flex-column " style="gap:8px;">
|
|
505
506
|
<div style="color: #393939;font-size: 16px;">啟用貨幣切換</div>
|
|
506
507
|
<div style="color: #8D8D8D;font-size:13px;">
|
|
507
508
|
是否開放用戶於前台自行切換幣別進行顯示
|
|
@@ -512,12 +513,12 @@ export class ShoppingInformation {
|
|
|
512
513
|
class="form-check-input m-0"
|
|
513
514
|
type="checkbox"
|
|
514
515
|
onchange="${gvc.event((e, event) => {
|
|
515
|
-
|
|
516
|
-
|
|
516
|
+
vm.data.switch_currency = !vm.data.switch_currency
|
|
517
|
+
})}"
|
|
517
518
|
${vm.data.switch_currency ? `checked` : ``}
|
|
518
519
|
/>
|
|
519
520
|
</div>
|
|
520
|
-
</div
|
|
521
|
+
</div>`:``}
|
|
521
522
|
</div>
|
|
522
523
|
</div>
|
|
523
524
|
`, ``)
|
|
@@ -20,50 +20,9 @@ import { ApiDelivery } from '../glitter-base/route/delivery.js';
|
|
|
20
20
|
import { ShoppingInvoiceManager } from './shopping-invoice-manager.js';
|
|
21
21
|
import { BgRecommend } from '../backend-manager/bg-recommend.js';
|
|
22
22
|
import { ApiRecommend } from '../glitter-base/route/recommend.js';
|
|
23
|
+
import { DeliveryHTML } from './module/delivery-html.js';
|
|
23
24
|
const html = String.raw;
|
|
24
25
|
export class ShoppingOrderManager {
|
|
25
|
-
static supportShipmentMethod() {
|
|
26
|
-
return [
|
|
27
|
-
{
|
|
28
|
-
title: '門市立即取貨',
|
|
29
|
-
value: 'now',
|
|
30
|
-
name: '',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: '一般宅配',
|
|
34
|
-
value: 'normal',
|
|
35
|
-
name: '',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: '全家店到店',
|
|
39
|
-
value: 'FAMIC2C',
|
|
40
|
-
name: '',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
title: '萊爾富店到店',
|
|
44
|
-
value: 'HILIFEC2C',
|
|
45
|
-
name: '',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
title: 'OK超商店到店',
|
|
49
|
-
value: 'OKMARTC2C',
|
|
50
|
-
name: '',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: '7-ELEVEN超商交貨便',
|
|
54
|
-
value: 'UNIMARTC2C',
|
|
55
|
-
name: '',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
title: '實體門市取貨',
|
|
59
|
-
value: 'shop',
|
|
60
|
-
name: '',
|
|
61
|
-
},
|
|
62
|
-
].map((dd) => {
|
|
63
|
-
dd.name = dd.title;
|
|
64
|
-
return dd;
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
26
|
static main(gvc, query) {
|
|
68
27
|
const glitter = gvc.glitter;
|
|
69
28
|
const dialog = new ShareDialog(gvc.glitter);
|
|
@@ -608,6 +567,48 @@ export class ShoppingOrderManager {
|
|
|
608
567
|
},
|
|
609
568
|
});
|
|
610
569
|
}
|
|
570
|
+
static supportShipmentMethod() {
|
|
571
|
+
return [
|
|
572
|
+
{
|
|
573
|
+
title: '門市立即取貨',
|
|
574
|
+
value: 'now',
|
|
575
|
+
name: '',
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
title: '一般宅配',
|
|
579
|
+
value: 'normal',
|
|
580
|
+
name: '',
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
title: '全家店到店',
|
|
584
|
+
value: 'FAMIC2C',
|
|
585
|
+
name: '',
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
title: '萊爾富店到店',
|
|
589
|
+
value: 'HILIFEC2C',
|
|
590
|
+
name: '',
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
title: 'OK超商店到店',
|
|
594
|
+
value: 'OKMARTC2C',
|
|
595
|
+
name: '',
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
title: '7-ELEVEN超商交貨便',
|
|
599
|
+
value: 'UNIMARTC2C',
|
|
600
|
+
name: '',
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
title: '實體門市取貨',
|
|
604
|
+
value: 'shop',
|
|
605
|
+
name: '',
|
|
606
|
+
},
|
|
607
|
+
].map((dd) => {
|
|
608
|
+
dd.name = dd.title;
|
|
609
|
+
return dd;
|
|
610
|
+
});
|
|
611
|
+
}
|
|
611
612
|
static replaceOrder(gvc, vm, passOrderData, backCallback) {
|
|
612
613
|
var _a, _b;
|
|
613
614
|
const glitter = gvc.glitter;
|
|
@@ -1011,6 +1012,18 @@ export class ShoppingOrderManager {
|
|
|
1011
1012
|
}),
|
|
1012
1013
|
})
|
|
1013
1014
|
: ''}
|
|
1015
|
+
${BgWidget.customButton({
|
|
1016
|
+
button: {
|
|
1017
|
+
color: 'gray',
|
|
1018
|
+
size: 'sm',
|
|
1019
|
+
},
|
|
1020
|
+
text: {
|
|
1021
|
+
name: '列印出貨單',
|
|
1022
|
+
},
|
|
1023
|
+
event: gvc.event(() => {
|
|
1024
|
+
DeliveryHTML.print(gvc);
|
|
1025
|
+
}),
|
|
1026
|
+
})}
|
|
1014
1027
|
</div>`,
|
|
1015
1028
|
html ` ${['UNIMARTC2C', 'FAMIC2C', 'OKMARTC2C', 'HILIFEC2C', 'normal'].includes(orderData.orderData.user_info.shipment)
|
|
1016
1029
|
? html ` <div class="tx_700">配送資訊</div>
|
|
@@ -1453,7 +1466,6 @@ export class ShoppingOrderManager {
|
|
|
1453
1466
|
BgWidget.mainCard(html `
|
|
1454
1467
|
<div class="tx_700 mb-2 fs-6 text-info">自訂顧客資料表單</div>
|
|
1455
1468
|
<div class="px-2 py-1 border-start" style="color: #393939;font-size: 16px;">
|
|
1456
|
-
|
|
1457
1469
|
${orderData.orderData.custom_form_format
|
|
1458
1470
|
.filter((dd) => {
|
|
1459
1471
|
return orderData.orderData.custom_form_data[dd.key];
|
|
@@ -1480,7 +1492,7 @@ export class ShoppingOrderManager {
|
|
|
1480
1492
|
}).length > 0) {
|
|
1481
1493
|
return (html ` <div style="margin-top: 24px;"></div>` +
|
|
1482
1494
|
BgWidget.mainCard(html `
|
|
1483
|
-
|
|
1495
|
+
<div class="tx_700 mb-2 fs-6 text-info">自訂收件人資料表單</div>
|
|
1484
1496
|
<div class="px-2 py-1 border-start" style="color: #393939;font-size: 16px;">
|
|
1485
1497
|
${orderData.orderData.custom_receipt_form
|
|
1486
1498
|
.filter((dd) => {
|
|
@@ -1501,7 +1513,11 @@ export class ShoppingOrderManager {
|
|
|
1501
1513
|
return ``;
|
|
1502
1514
|
}
|
|
1503
1515
|
})(),
|
|
1504
|
-
]
|
|
1516
|
+
]
|
|
1517
|
+
.filter((dd) => {
|
|
1518
|
+
return dd;
|
|
1519
|
+
})
|
|
1520
|
+
.join(BgWidget.mbContainer(24))}
|
|
1505
1521
|
</div>`,
|
|
1506
1522
|
ratio: 25,
|
|
1507
1523
|
})}
|
|
@@ -12,6 +12,7 @@ import { ApiDelivery } from '../glitter-base/route/delivery.js';
|
|
|
12
12
|
import { ShoppingInvoiceManager } from './shopping-invoice-manager.js';
|
|
13
13
|
import { BgRecommend } from '../backend-manager/bg-recommend.js';
|
|
14
14
|
import { ApiRecommend } from '../glitter-base/route/recommend.js';
|
|
15
|
+
import { DeliveryHTML } from './module/delivery-html.js';
|
|
15
16
|
|
|
16
17
|
interface VoucherData {
|
|
17
18
|
id: number;
|
|
@@ -70,48 +71,6 @@ interface ViewModel {
|
|
|
70
71
|
const html = String.raw;
|
|
71
72
|
|
|
72
73
|
export class ShoppingOrderManager {
|
|
73
|
-
public static supportShipmentMethod() {
|
|
74
|
-
return [
|
|
75
|
-
{
|
|
76
|
-
title: '門市立即取貨',
|
|
77
|
-
value: 'now',
|
|
78
|
-
name: '',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
title: '一般宅配',
|
|
82
|
-
value: 'normal',
|
|
83
|
-
name: '',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
title: '全家店到店',
|
|
87
|
-
value: 'FAMIC2C',
|
|
88
|
-
name: '',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
title: '萊爾富店到店',
|
|
92
|
-
value: 'HILIFEC2C',
|
|
93
|
-
name: '',
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
title: 'OK超商店到店',
|
|
97
|
-
value: 'OKMARTC2C',
|
|
98
|
-
name: '',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
title: '7-ELEVEN超商交貨便',
|
|
102
|
-
value: 'UNIMARTC2C',
|
|
103
|
-
name: '',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
title: '實體門市取貨',
|
|
107
|
-
value: 'shop',
|
|
108
|
-
name: '',
|
|
109
|
-
},
|
|
110
|
-
].map((dd) => {
|
|
111
|
-
dd.name = dd.title;
|
|
112
|
-
return dd;
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
74
|
public static main(
|
|
116
75
|
gvc: GVC,
|
|
117
76
|
query: {
|
|
@@ -708,6 +667,49 @@ export class ShoppingOrderManager {
|
|
|
708
667
|
});
|
|
709
668
|
}
|
|
710
669
|
|
|
670
|
+
public static supportShipmentMethod() {
|
|
671
|
+
return [
|
|
672
|
+
{
|
|
673
|
+
title: '門市立即取貨',
|
|
674
|
+
value: 'now',
|
|
675
|
+
name: '',
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
title: '一般宅配',
|
|
679
|
+
value: 'normal',
|
|
680
|
+
name: '',
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
title: '全家店到店',
|
|
684
|
+
value: 'FAMIC2C',
|
|
685
|
+
name: '',
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
title: '萊爾富店到店',
|
|
689
|
+
value: 'HILIFEC2C',
|
|
690
|
+
name: '',
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
title: 'OK超商店到店',
|
|
694
|
+
value: 'OKMARTC2C',
|
|
695
|
+
name: '',
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
title: '7-ELEVEN超商交貨便',
|
|
699
|
+
value: 'UNIMARTC2C',
|
|
700
|
+
name: '',
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
title: '實體門市取貨',
|
|
704
|
+
value: 'shop',
|
|
705
|
+
name: '',
|
|
706
|
+
},
|
|
707
|
+
].map((dd) => {
|
|
708
|
+
dd.name = dd.title;
|
|
709
|
+
return dd;
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
|
|
711
713
|
public static replaceOrder(gvc: GVC, vm: any, passOrderData?: any, backCallback?: () => any) {
|
|
712
714
|
const glitter = gvc.glitter;
|
|
713
715
|
const origData = JSON.parse(JSON.stringify(passOrderData ?? vm.data));
|
|
@@ -774,7 +776,7 @@ export class ShoppingOrderManager {
|
|
|
774
776
|
note?: string;
|
|
775
777
|
code_note?: string;
|
|
776
778
|
};
|
|
777
|
-
custom_receipt_form?:any;
|
|
779
|
+
custom_receipt_form?: any;
|
|
778
780
|
custom_form_format?: any;
|
|
779
781
|
custom_form_data?: any;
|
|
780
782
|
proof_purchase: any;
|
|
@@ -1029,7 +1031,7 @@ export class ShoppingOrderManager {
|
|
|
1029
1031
|
${dd.is_gift ? `<div class="">${BgWidget.successInsignia('贈品')}</div>` : ``}
|
|
1030
1032
|
</div>
|
|
1031
1033
|
<div class="d-flex flex-column" style="gap:2px;">
|
|
1032
|
-
${dd.is_hidden ? `<div style="width:auto;">${BgWidget.secondaryInsignia('隱形商品')}</div
|
|
1034
|
+
${dd.is_hidden ? `<div style="width:auto;">${BgWidget.secondaryInsignia('隱形商品')}</div>` : ``}
|
|
1033
1035
|
<div class="tx_700">${dd.title}</div>
|
|
1034
1036
|
${dd.spec.length > 0 ? BgWidget.grayNote(dd.spec.join(', ')) : ''}
|
|
1035
1037
|
${BgWidget.grayNote(`存貨單位 (SKU):${dd.sku && dd.sku.length > 0 ? dd.sku : '無'}`)}
|
|
@@ -1230,6 +1232,18 @@ export class ShoppingOrderManager {
|
|
|
1230
1232
|
}),
|
|
1231
1233
|
})
|
|
1232
1234
|
: ''}
|
|
1235
|
+
${BgWidget.customButton({
|
|
1236
|
+
button: {
|
|
1237
|
+
color: 'gray',
|
|
1238
|
+
size: 'sm',
|
|
1239
|
+
},
|
|
1240
|
+
text: {
|
|
1241
|
+
name: '列印出貨單',
|
|
1242
|
+
},
|
|
1243
|
+
event: gvc.event(() => {
|
|
1244
|
+
DeliveryHTML.print(gvc);
|
|
1245
|
+
}),
|
|
1246
|
+
})}
|
|
1233
1247
|
</div>`,
|
|
1234
1248
|
html` ${['UNIMARTC2C', 'FAMIC2C', 'OKMARTC2C', 'HILIFEC2C', 'normal'].includes(orderData.orderData.user_info.shipment)
|
|
1235
1249
|
? html` <div class="tx_700">配送資訊</div>
|
|
@@ -1457,9 +1471,9 @@ export class ShoppingOrderManager {
|
|
|
1457
1471
|
class="d-flex align-items-center"
|
|
1458
1472
|
style="color: #4D86DB;font-weight: 400; gap:8px;cursor:pointer;"
|
|
1459
1473
|
onclick="${gvc.event(() => {
|
|
1460
|
-
if(userData.userID){
|
|
1474
|
+
if (userData.userID) {
|
|
1461
1475
|
child_vm.userID = userData.userID;
|
|
1462
|
-
child_vm.type = 'user';
|
|
1476
|
+
child_vm.type = 'user';
|
|
1463
1477
|
}
|
|
1464
1478
|
})}"
|
|
1465
1479
|
>
|
|
@@ -1690,7 +1704,6 @@ export class ShoppingOrderManager {
|
|
|
1690
1704
|
BgWidget.mainCard(html`
|
|
1691
1705
|
<div class="tx_700 mb-2 fs-6 text-info">自訂顧客資料表單</div>
|
|
1692
1706
|
<div class="px-2 py-1 border-start" style="color: #393939;font-size: 16px;">
|
|
1693
|
-
|
|
1694
1707
|
${orderData.orderData.custom_form_format
|
|
1695
1708
|
.filter((dd: any) => {
|
|
1696
1709
|
return (orderData.orderData.custom_form_data as any)[dd.key];
|
|
@@ -1702,7 +1715,7 @@ export class ShoppingOrderManager {
|
|
|
1702
1715
|
</div>
|
|
1703
1716
|
<div style="color: #393939;font-weight: 400;">${(orderData.orderData.custom_form_data as any)[dd.key]}</div>`;
|
|
1704
1717
|
})
|
|
1705
|
-
|
|
1718
|
+
.join('<div class="my-2 w-100 border-top"></div>')}
|
|
1706
1719
|
</div>
|
|
1707
1720
|
`)
|
|
1708
1721
|
);
|
|
@@ -1712,15 +1725,15 @@ export class ShoppingOrderManager {
|
|
|
1712
1725
|
})(),
|
|
1713
1726
|
(() => {
|
|
1714
1727
|
if (
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1728
|
+
orderData.orderData.custom_receipt_form &&
|
|
1729
|
+
orderData.orderData.custom_receipt_form.filter((dd: any) => {
|
|
1730
|
+
return (orderData.orderData.user_info as any)[dd.key];
|
|
1731
|
+
}).length > 0
|
|
1719
1732
|
) {
|
|
1720
1733
|
return (
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1734
|
+
html` <div style="margin-top: 24px;"></div>` +
|
|
1735
|
+
BgWidget.mainCard(html`
|
|
1736
|
+
<div class="tx_700 mb-2 fs-6 text-info">自訂收件人資料表單</div>
|
|
1724
1737
|
<div class="px-2 py-1 border-start" style="color: #393939;font-size: 16px;">
|
|
1725
1738
|
${orderData.orderData.custom_receipt_form
|
|
1726
1739
|
.filter((dd: any) => {
|
|
@@ -1733,7 +1746,7 @@ export class ShoppingOrderManager {
|
|
|
1733
1746
|
</div>
|
|
1734
1747
|
<div style="color: #393939;font-weight: 400;">${(orderData.orderData.user_info as any)[dd.key]}</div>`;
|
|
1735
1748
|
})
|
|
1736
|
-
|
|
1749
|
+
.join('<div class="my-2 w-100 border-top"></div>')}
|
|
1737
1750
|
</div>
|
|
1738
1751
|
`)
|
|
1739
1752
|
);
|
|
@@ -1741,7 +1754,11 @@ export class ShoppingOrderManager {
|
|
|
1741
1754
|
return ``;
|
|
1742
1755
|
}
|
|
1743
1756
|
})(),
|
|
1744
|
-
]
|
|
1757
|
+
]
|
|
1758
|
+
.filter((dd) => {
|
|
1759
|
+
return dd;
|
|
1760
|
+
})
|
|
1761
|
+
.join(BgWidget.mbContainer(24))}
|
|
1745
1762
|
</div>`,
|
|
1746
1763
|
ratio: 25,
|
|
1747
1764
|
}
|
|
@@ -3498,7 +3515,7 @@ export class ShoppingOrderManager {
|
|
|
3498
3515
|
});
|
|
3499
3516
|
}
|
|
3500
3517
|
|
|
3501
|
-
if(!['atm','line'].includes(orderData.customer_info.payment_select)){
|
|
3518
|
+
if (!['atm', 'line'].includes(orderData.customer_info.payment_select)) {
|
|
3502
3519
|
if (orderData.proof_purchase === undefined || orderData.proof_purchase.paymentForm === undefined) {
|
|
3503
3520
|
return '尚未回傳付款證明';
|
|
3504
3521
|
}
|
|
@@ -3507,7 +3524,7 @@ export class ShoppingOrderManager {
|
|
|
3507
3524
|
const paymentFormList = orderData.proof_purchase.paymentForm.list ?? [];
|
|
3508
3525
|
paymentFormList.map((item: any) => {
|
|
3509
3526
|
array.push(`${item.title} : ${orderData.proof_purchase[item.key]}`);
|
|
3510
|
-
});
|
|
3527
|
+
});
|
|
3511
3528
|
}
|
|
3512
3529
|
|
|
3513
3530
|
return array.join(BgWidget.mbContainer(8)) || '尚未回傳付款證明';
|
|
@@ -3515,7 +3532,7 @@ export class ShoppingOrderManager {
|
|
|
3515
3532
|
</div>`;
|
|
3516
3533
|
}
|
|
3517
3534
|
|
|
3518
|
-
static printStoreOrderInfo(obj: { gvc: GVC; cart_token: string }) {
|
|
3535
|
+
public static printStoreOrderInfo(obj: { gvc: GVC; cart_token: string }) {
|
|
3519
3536
|
const gvc = obj.gvc;
|
|
3520
3537
|
const glitter = gvc.glitter;
|
|
3521
3538
|
const dialog = new ShareDialog(gvc.glitter);
|