ts-glitter 22.5.7 → 22.5.8
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 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-product.js +13 -13
- package/lowcode/backend-manager/bg-product.ts +13 -13
- package/lowcode/backend-manager/bg-shopping.js +8 -13
- package/lowcode/backend-manager/bg-shopping.ts +8 -15
- package/lowcode/backend-manager/bg-widget.js +62 -49
- package/lowcode/backend-manager/bg-widget.ts +129 -93
- package/lowcode/cms-plugin/POS-setting.js +30 -9
- package/lowcode/cms-plugin/POS-setting.ts +49 -16
- package/lowcode/cms-plugin/cms-router.js +27 -21
- package/lowcode/cms-plugin/cms-router.ts +116 -101
- package/lowcode/cms-plugin/filter-options.js +25 -17
- package/lowcode/cms-plugin/filter-options.ts +27 -17
- package/lowcode/cms-plugin/module/product-excel.js +2 -0
- package/lowcode/cms-plugin/module/product-excel.ts +2 -0
- package/lowcode/cms-plugin/module/product-setting.js +13 -12
- package/lowcode/cms-plugin/module/product-setting.ts +26 -23
- package/lowcode/cms-plugin/order/order-module.js +91 -68
- package/lowcode/cms-plugin/order/order-module.ts +105 -73
- package/lowcode/cms-plugin/pos-checkout-setting.js +46 -39
- package/lowcode/cms-plugin/pos-checkout-setting.ts +237 -227
- package/lowcode/cms-plugin/pos-config-setting.js +25 -23
- package/lowcode/cms-plugin/pos-config-setting.ts +35 -32
- package/lowcode/cms-plugin/pos-pages/payment-function.js +253 -139
- package/lowcode/cms-plugin/pos-pages/payment-function.ts +405 -279
- package/lowcode/cms-plugin/pos-pages/payment-page.js +348 -267
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +378 -296
- package/lowcode/cms-plugin/pos-pages/pos-function.js +76 -19
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +84 -19
- package/lowcode/cms-plugin/shopping-discount-setting.js +2 -2
- package/lowcode/cms-plugin/shopping-discount-setting.ts +2 -2
- package/lowcode/cms-plugin/shopping-finance-setting.js +1590 -1701
- package/lowcode/cms-plugin/shopping-finance-setting.ts +1967 -2011
- package/lowcode/cms-plugin/shopping-order-manager.js +74 -62
- package/lowcode/cms-plugin/shopping-order-manager.ts +119 -85
- package/lowcode/cms-plugin/shopping-product-text.js +874 -531
- package/lowcode/cms-plugin/shopping-product-text.ts +1656 -1305
- package/lowcode/cms-plugin/shopping-setting-basic.js +152 -124
- package/lowcode/cms-plugin/shopping-setting-basic.ts +315 -247
- package/lowcode/css/editor.css +3 -2
- package/lowcode/glitter-base/global/language.js +5 -3
- package/lowcode/glitter-base/global/language.ts +8 -6
- package/lowcode/glitter-base/global/payment-config.js +6 -0
- package/lowcode/glitter-base/global/payment-config.ts +6 -3
- package/lowcode/public-components/product/pd-class.js +1 -3
- package/lowcode/public-components/product/pd-class.ts +1 -3
- package/lowcode/public-components/user-manager/um-order.js +2 -1
- package/lowcode/public-components/user-manager/um-order.ts +2 -1
- package/package.json +1 -1
- package/src/api-public/controllers/index.js +14 -3
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/index.ts +16 -3
- package/src/api-public/controllers/shop.js +14 -7
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +14 -8
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/ezpay/tool.d.ts +0 -1
- package/src/api-public/services/financial-serviceV2.js +7 -17
- package/src/api-public/services/financial-serviceV2.js.map +1 -1
- package/src/api-public/services/shopee.js.map +1 -1
- package/src/api-public/services/updated-table-checked.js +20 -0
- package/src/api-public/services/updated-table-checked.js.map +1 -1
- package/src/api-public/services/updated-table-checked.ts +21 -0
- package/src/app-project/serverless/src/modules/database.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/helper/glitter-util.d.ts +0 -1
- package/src/index.js +3 -3
- package/src/index.js.map +13 -1
- package/src/modules/tool.d.ts +2 -0
- package/src/modules/tool.js +7 -0
- package/src/modules/tool.js.map +1 -1
- package/src/modules/tool.ts +7 -0
- package/src/seo-config.js +3 -3
- package/src/seo-config.js.map +9 -1
- package/src/services/private_config.js +11 -0
- package/src/services/private_config.js.map +1 -1
- package/src/services/private_config.ts +11 -0
- package/src/services/saas-table-check.js +12 -0
- package/src/services/saas-table-check.js.map +1 -1
- package/src/services/saas-table-check.ts +12 -0
- package/src/services/ses.js +3 -4
- package/src/services/ses.js.map +1 -1
|
@@ -1,73 +1,76 @@
|
|
|
1
|
-
import { BgWidget } from
|
|
1
|
+
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
2
|
+
const html = String.raw;
|
|
2
3
|
export class CmsRouter {
|
|
3
4
|
static main(gvc) {
|
|
4
5
|
return gvc.bindView(() => {
|
|
5
6
|
const id = gvc.glitter.getUUID();
|
|
6
7
|
return {
|
|
7
8
|
bind: id,
|
|
8
|
-
view: () => {
|
|
9
|
+
view: () => {
|
|
10
|
+
return '';
|
|
11
|
+
},
|
|
9
12
|
divCreate: {
|
|
10
13
|
class: `${id}`,
|
|
11
14
|
},
|
|
12
15
|
onCreate: () => {
|
|
13
|
-
new Promise(
|
|
16
|
+
new Promise(resolve => {
|
|
14
17
|
switch (gvc.glitter.getUrlParameter('page')) {
|
|
15
18
|
case 'blog_tag_setting':
|
|
16
|
-
gvc.glitter.getModule(new URL('./backend-manager/bg-blog.js', gvc.glitter.root_path).href,
|
|
19
|
+
gvc.glitter.getModule(new URL('./backend-manager/bg-blog.js', gvc.glitter.root_path).href, cl => {
|
|
17
20
|
resolve(cl.setCollection({
|
|
18
21
|
gvc: gvc,
|
|
19
|
-
key: 'blog_collection'
|
|
22
|
+
key: 'blog_collection',
|
|
20
23
|
}));
|
|
21
24
|
});
|
|
22
25
|
break;
|
|
23
26
|
case 'blog_global_setting':
|
|
24
|
-
gvc.glitter.getModule(new URL('./cms-plugin/seo-blog.js', gvc.glitter.root_path).href,
|
|
27
|
+
gvc.glitter.getModule(new URL('./cms-plugin/seo-blog.js', gvc.glitter.root_path).href, cl => {
|
|
25
28
|
resolve(cl.main(gvc));
|
|
26
29
|
});
|
|
27
30
|
break;
|
|
28
31
|
case 'fb_live':
|
|
29
32
|
case 'ig_live':
|
|
30
33
|
case 'line_plus':
|
|
31
|
-
resolve(`<div class="d-flex w-100 align-items-center justify-content-center">
|
|
32
|
-
<div class="insignia insignia-warning">功能優化中,預計於6月1號重新開放!</div>
|
|
33
|
-
</div>`);
|
|
34
|
+
resolve(html `<div class="d-flex w-100 align-items-center justify-content-center">
|
|
35
|
+
<div class="insignia insignia-warning">功能優化中,預計於6月1號重新開放!</div>
|
|
36
|
+
</div>`);
|
|
34
37
|
break;
|
|
35
38
|
case 'shipment_list':
|
|
36
39
|
case 'shipment_list_archive':
|
|
37
|
-
gvc.glitter.getModule(new URL('./cms-plugin/shopping-order-manager.js', gvc.glitter.root_path).href,
|
|
40
|
+
gvc.glitter.getModule(new URL('./cms-plugin/shopping-order-manager.js', gvc.glitter.root_path).href, cl => {
|
|
38
41
|
resolve(cl.main(gvc, {
|
|
39
42
|
isShipment: true,
|
|
40
|
-
isArchived: gvc.glitter.getUrlParameter('page') === 'shipment_list_archive'
|
|
43
|
+
isArchived: gvc.glitter.getUrlParameter('page') === 'shipment_list_archive',
|
|
41
44
|
}));
|
|
42
45
|
});
|
|
43
46
|
break;
|
|
44
47
|
case 'reconciliation_area':
|
|
45
|
-
gvc.glitter.getModule(new URL('./cms-plugin/reconciliation-area.js', gvc.glitter.root_path).href,
|
|
48
|
+
gvc.glitter.getModule(new URL('./cms-plugin/reconciliation-area.js', gvc.glitter.root_path).href, cl => {
|
|
46
49
|
resolve(cl.main(gvc));
|
|
47
50
|
});
|
|
48
51
|
break;
|
|
49
52
|
case 'app-design':
|
|
50
|
-
gvc.glitter.getModule(new URL('./cms-plugin/app-design.js', gvc.glitter.root_path).href,
|
|
53
|
+
gvc.glitter.getModule(new URL('./cms-plugin/app-design.js', gvc.glitter.root_path).href, cl => {
|
|
51
54
|
resolve(cl.main(gvc));
|
|
52
55
|
});
|
|
53
56
|
break;
|
|
54
57
|
case 'pos_setting':
|
|
55
|
-
gvc.glitter.getModule(new URL('./cms-plugin/pos-config-setting.js', gvc.glitter.root_path).href,
|
|
58
|
+
gvc.glitter.getModule(new URL('./cms-plugin/pos-config-setting.js', gvc.glitter.root_path).href, cl => {
|
|
56
59
|
resolve(cl.main(gvc));
|
|
57
60
|
});
|
|
58
61
|
break;
|
|
59
62
|
case 'auto_fcm_push':
|
|
60
|
-
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-push.js', gvc.glitter.root_path).href,
|
|
63
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-push.js', gvc.glitter.root_path).href, cl => {
|
|
61
64
|
resolve(cl.main(gvc));
|
|
62
65
|
});
|
|
63
66
|
break;
|
|
64
67
|
case 'auto_fcm_history':
|
|
65
|
-
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-history.js', gvc.glitter.root_path).href,
|
|
68
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-history.js', gvc.glitter.root_path).href, cl => {
|
|
66
69
|
resolve(cl.emailHistory(gvc));
|
|
67
70
|
});
|
|
68
71
|
break;
|
|
69
72
|
case 'auto_fcm_advertise':
|
|
70
|
-
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-advertise.js', gvc.glitter.root_path).href,
|
|
73
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-advertise.js', gvc.glitter.root_path).href, cl => {
|
|
71
74
|
resolve(cl.main(gvc));
|
|
72
75
|
});
|
|
73
76
|
break;
|
|
@@ -75,11 +78,14 @@ export class CmsRouter {
|
|
|
75
78
|
resolve('no page');
|
|
76
79
|
}
|
|
77
80
|
}).then((dd) => {
|
|
78
|
-
document.querySelector(`.${id}`).outerHTML = `<div
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
document.querySelector(`.${id}`).outerHTML = html `<div
|
|
82
|
+
class="vw-100"
|
|
83
|
+
style="background-color: #f5f5f5 !important; min-height: 100vh;"
|
|
84
|
+
>
|
|
85
|
+
${BgWidget.container(dd, {})}
|
|
86
|
+
</div>`;
|
|
81
87
|
});
|
|
82
|
-
}
|
|
88
|
+
},
|
|
83
89
|
};
|
|
84
90
|
});
|
|
85
91
|
}
|
|
@@ -1,105 +1,120 @@
|
|
|
1
|
-
import {GVC} from
|
|
2
|
-
import {BgWidget} from
|
|
1
|
+
import { GVC } from '../glitterBundle/GVController.js';
|
|
2
|
+
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
public static main(gvc:GVC){
|
|
6
|
-
return gvc.bindView(()=>{
|
|
7
|
-
const id=gvc.glitter.getUUID()
|
|
8
|
-
return {
|
|
9
|
-
bind:id,
|
|
10
|
-
view:()=>{return ``},
|
|
11
|
-
divCreate:{
|
|
12
|
-
class:`${id}`,
|
|
13
|
-
},
|
|
14
|
-
onCreate:()=>{
|
|
4
|
+
const html = String.raw;
|
|
15
5
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
6
|
+
export class CmsRouter {
|
|
7
|
+
public static main(gvc: GVC) {
|
|
8
|
+
return gvc.bindView(() => {
|
|
9
|
+
const id = gvc.glitter.getUUID();
|
|
10
|
+
return {
|
|
11
|
+
bind: id,
|
|
12
|
+
view: () => {
|
|
13
|
+
return '';
|
|
14
|
+
},
|
|
15
|
+
divCreate: {
|
|
16
|
+
class: `${id}`,
|
|
17
|
+
},
|
|
18
|
+
onCreate: () => {
|
|
19
|
+
new Promise(resolve => {
|
|
20
|
+
switch (gvc.glitter.getUrlParameter('page')) {
|
|
21
|
+
case 'blog_tag_setting':
|
|
22
|
+
gvc.glitter.getModule(new URL('./backend-manager/bg-blog.js', gvc.glitter.root_path).href, cl => {
|
|
23
|
+
resolve(
|
|
24
|
+
cl.setCollection({
|
|
25
|
+
gvc: gvc,
|
|
26
|
+
key: 'blog_collection',
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
break;
|
|
31
|
+
case 'blog_global_setting':
|
|
32
|
+
gvc.glitter.getModule(new URL('./cms-plugin/seo-blog.js', gvc.glitter.root_path).href, cl => {
|
|
33
|
+
resolve(cl.main(gvc));
|
|
34
|
+
});
|
|
35
|
+
break;
|
|
36
|
+
case 'fb_live':
|
|
37
|
+
case 'ig_live':
|
|
38
|
+
case 'line_plus':
|
|
39
|
+
resolve(
|
|
40
|
+
html`<div class="d-flex w-100 align-items-center justify-content-center">
|
|
41
|
+
<div class="insignia insignia-warning">功能優化中,預計於6月1號重新開放!</div>
|
|
42
|
+
</div>`
|
|
43
|
+
);
|
|
44
|
+
break;
|
|
45
|
+
// case 'fb_live':
|
|
46
|
+
// gvc.glitter.getModule(new URL('./cms-plugin/live_capture.js', gvc.glitter.root_path).href, cl => {
|
|
47
|
+
// resolve(cl.main(gvc, false));
|
|
48
|
+
// });
|
|
49
|
+
// break;
|
|
50
|
+
// case 'ig_live':
|
|
51
|
+
// case 'line_plus':
|
|
52
|
+
// gvc.glitter.getModule(new URL('./cms-plugin/live_capture.js', gvc.glitter.root_path).href, cl => {
|
|
53
|
+
// resolve(cl.main(gvc, true));
|
|
54
|
+
// });
|
|
55
|
+
// break;
|
|
56
|
+
case 'shipment_list':
|
|
57
|
+
case 'shipment_list_archive':
|
|
58
|
+
gvc.glitter.getModule(
|
|
59
|
+
new URL('./cms-plugin/shopping-order-manager.js', gvc.glitter.root_path).href,
|
|
60
|
+
cl => {
|
|
61
|
+
resolve(
|
|
62
|
+
cl.main(gvc, {
|
|
63
|
+
isShipment: true,
|
|
64
|
+
isArchived: gvc.glitter.getUrlParameter('page') === 'shipment_list_archive',
|
|
65
|
+
})
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
break;
|
|
70
|
+
case 'reconciliation_area':
|
|
71
|
+
gvc.glitter.getModule(
|
|
72
|
+
new URL('./cms-plugin/reconciliation-area.js', gvc.glitter.root_path).href,
|
|
73
|
+
cl => {
|
|
74
|
+
resolve(cl.main(gvc));
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
break;
|
|
78
|
+
case 'app-design':
|
|
79
|
+
gvc.glitter.getModule(new URL('./cms-plugin/app-design.js', gvc.glitter.root_path).href, cl => {
|
|
80
|
+
resolve(cl.main(gvc));
|
|
81
|
+
});
|
|
82
|
+
break;
|
|
83
|
+
case 'pos_setting':
|
|
84
|
+
gvc.glitter.getModule(new URL('./cms-plugin/pos-config-setting.js', gvc.glitter.root_path).href, cl => {
|
|
85
|
+
resolve(cl.main(gvc));
|
|
86
|
+
});
|
|
87
|
+
break;
|
|
88
|
+
case 'auto_fcm_push':
|
|
89
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-push.js', gvc.glitter.root_path).href, cl => {
|
|
90
|
+
resolve(cl.main(gvc));
|
|
91
|
+
});
|
|
92
|
+
break;
|
|
93
|
+
case 'auto_fcm_history':
|
|
94
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-history.js', gvc.glitter.root_path).href, cl => {
|
|
95
|
+
resolve(cl.emailHistory(gvc));
|
|
96
|
+
});
|
|
97
|
+
break;
|
|
98
|
+
case 'auto_fcm_advertise':
|
|
99
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-advertise.js', gvc.glitter.root_path).href, cl => {
|
|
100
|
+
resolve(cl.main(gvc));
|
|
101
|
+
});
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
resolve('no page');
|
|
105
|
+
}
|
|
106
|
+
}).then((dd: any) => {
|
|
107
|
+
(document.querySelector(`.${id}`) as any).outerHTML = html`<div
|
|
108
|
+
class="vw-100"
|
|
109
|
+
style="background-color: #f5f5f5 !important; min-height: 100vh;"
|
|
110
|
+
>
|
|
111
|
+
${BgWidget.container(dd, {})}
|
|
112
|
+
</div>`;
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
}
|
|
103
118
|
}
|
|
104
119
|
|
|
105
|
-
(window as any).glitter.setModule(import.meta.url,CmsRouter)
|
|
120
|
+
(window as any).glitter.setModule(import.meta.url, CmsRouter);
|
|
@@ -150,6 +150,17 @@ export class FilterOptions {
|
|
|
150
150
|
static getOrderFunnel() {
|
|
151
151
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
152
|
const levelData = yield this.getLevelData();
|
|
153
|
+
const supportPayment = yield PaymentConfig.getSupportPayment(true);
|
|
154
|
+
const paymentMethod = supportPayment
|
|
155
|
+
.sort((a, b) => (a.type === 'pos' ? 1 : -1) - (b.type === 'pos' ? 1 : -1))
|
|
156
|
+
.map(payment => {
|
|
157
|
+
if (payment.type === 'pos' && !payment.name.includes('POS')) {
|
|
158
|
+
payment.name = html `<div class="d-flex gap-2">
|
|
159
|
+
${[BgWidget.warningInsignia('POS', { size: 'sm' }), payment.name].join('')}
|
|
160
|
+
</div>`;
|
|
161
|
+
}
|
|
162
|
+
return payment;
|
|
163
|
+
});
|
|
153
164
|
return [
|
|
154
165
|
{ key: 'orderStatus', type: 'multi_checkbox', name: '訂單狀態', data: this.orderStatusOptions },
|
|
155
166
|
{ key: 'payload', type: 'multi_checkbox', name: '付款狀態', data: this.payloadStatusOptions },
|
|
@@ -158,22 +169,14 @@ export class FilterOptions {
|
|
|
158
169
|
key: 'payment_select',
|
|
159
170
|
type: 'multi_checkbox',
|
|
160
171
|
name: '付款方式',
|
|
161
|
-
data:
|
|
162
|
-
if (dd.type === 'pos' && !dd.name.includes('POS')) {
|
|
163
|
-
const name = dd.name;
|
|
164
|
-
dd.name = html `<div class="d-flex">
|
|
165
|
-
${[BgWidget.warningInsignia('POS'), name].join(html `<div class="mx-1"></div>`)}
|
|
166
|
-
</div>`;
|
|
167
|
-
}
|
|
168
|
-
return dd;
|
|
169
|
-
}),
|
|
172
|
+
data: paymentMethod,
|
|
170
173
|
},
|
|
171
174
|
{ key: 'progress', type: 'multi_checkbox', name: '出貨狀況', data: this.progressOptions },
|
|
172
175
|
{
|
|
173
176
|
key: 'shipment',
|
|
174
177
|
type: 'multi_checkbox',
|
|
175
178
|
name: '運送方式',
|
|
176
|
-
data: yield ShipmentConfig.shipmentMethod({ type: '
|
|
179
|
+
data: yield ShipmentConfig.shipmentMethod({ type: 'all' }),
|
|
177
180
|
},
|
|
178
181
|
{
|
|
179
182
|
key: 'created_time',
|
|
@@ -236,6 +239,17 @@ export class FilterOptions {
|
|
|
236
239
|
.concat(((_c = configData.custom_delivery) !== null && _c !== void 0 ? _c : []).map((dd) => {
|
|
237
240
|
return { key: dd.id, name: dd.name };
|
|
238
241
|
}));
|
|
242
|
+
const supportPayment = yield PaymentConfig.getSupportPayment(true);
|
|
243
|
+
const paymentMethod = supportPayment
|
|
244
|
+
.sort((a, b) => (a.type === 'pos' ? 1 : -1) - (b.type === 'pos' ? 1 : -1))
|
|
245
|
+
.map(payment => {
|
|
246
|
+
if (payment.type === 'pos' && !payment.name.includes('POS')) {
|
|
247
|
+
payment.name = html `<div class="d-flex gap-2">
|
|
248
|
+
${[BgWidget.warningInsignia('POS', { size: 'sm' }), payment.name].join('')}
|
|
249
|
+
</div>`;
|
|
250
|
+
}
|
|
251
|
+
return payment;
|
|
252
|
+
});
|
|
239
253
|
return [
|
|
240
254
|
{ key: 'orderStatus', type: 'multi_checkbox', name: '訂單狀態', data: this.orderStatusOptions },
|
|
241
255
|
{ key: 'reconciliation_status', type: 'multi_checkbox', name: '對帳狀態', data: this.reconciliationOptions },
|
|
@@ -243,13 +257,7 @@ export class FilterOptions {
|
|
|
243
257
|
key: 'payment_select',
|
|
244
258
|
type: 'multi_checkbox',
|
|
245
259
|
name: '付款方式',
|
|
246
|
-
data:
|
|
247
|
-
if (dd.type === 'pos' && !dd.name.includes('POS')) {
|
|
248
|
-
const name = dd.name;
|
|
249
|
-
dd.name = `<div class="d-flex">${[BgWidget.warningInsignia('POS'), name].join(`<div class="mx-1"></div>`)}</div>`;
|
|
250
|
-
}
|
|
251
|
-
return dd;
|
|
252
|
-
}),
|
|
260
|
+
data: paymentMethod,
|
|
253
261
|
},
|
|
254
262
|
{ key: 'progress', type: 'multi_checkbox', name: '出貨狀況', data: this.progressOptions },
|
|
255
263
|
{ key: 'shipment', type: 'multi_checkbox', name: '運送方式', data: shipmentOptions },
|
|
@@ -244,6 +244,18 @@ export class FilterOptions {
|
|
|
244
244
|
static async getOrderFunnel() {
|
|
245
245
|
const levelData = await this.getLevelData();
|
|
246
246
|
|
|
247
|
+
const supportPayment = await PaymentConfig.getSupportPayment(true);
|
|
248
|
+
const paymentMethod = supportPayment
|
|
249
|
+
.sort((a, b) => (a.type === 'pos' ? 1 : -1) - (b.type === 'pos' ? 1 : -1))
|
|
250
|
+
.map(payment => {
|
|
251
|
+
if (payment.type === 'pos' && !payment.name.includes('POS')) {
|
|
252
|
+
payment.name = html`<div class="d-flex gap-2">
|
|
253
|
+
${[BgWidget.warningInsignia('POS', { size: 'sm' }), payment.name].join('')}
|
|
254
|
+
</div>`;
|
|
255
|
+
}
|
|
256
|
+
return payment;
|
|
257
|
+
});
|
|
258
|
+
|
|
247
259
|
return [
|
|
248
260
|
{ key: 'orderStatus', type: 'multi_checkbox', name: '訂單狀態', data: this.orderStatusOptions },
|
|
249
261
|
{ key: 'payload', type: 'multi_checkbox', name: '付款狀態', data: this.payloadStatusOptions },
|
|
@@ -252,22 +264,14 @@ export class FilterOptions {
|
|
|
252
264
|
key: 'payment_select',
|
|
253
265
|
type: 'multi_checkbox',
|
|
254
266
|
name: '付款方式',
|
|
255
|
-
data:
|
|
256
|
-
if (dd.type === 'pos' && !dd.name.includes('POS')) {
|
|
257
|
-
const name = dd.name;
|
|
258
|
-
dd.name = html`<div class="d-flex">
|
|
259
|
-
${[BgWidget.warningInsignia('POS'), name].join(html`<div class="mx-1"></div>`)}
|
|
260
|
-
</div>`;
|
|
261
|
-
}
|
|
262
|
-
return dd;
|
|
263
|
-
}),
|
|
267
|
+
data: paymentMethod,
|
|
264
268
|
},
|
|
265
269
|
{ key: 'progress', type: 'multi_checkbox', name: '出貨狀況', data: this.progressOptions },
|
|
266
270
|
{
|
|
267
271
|
key: 'shipment',
|
|
268
272
|
type: 'multi_checkbox',
|
|
269
273
|
name: '運送方式',
|
|
270
|
-
data: await ShipmentConfig.shipmentMethod({ type: '
|
|
274
|
+
data: await ShipmentConfig.shipmentMethod({ type: 'all' }),
|
|
271
275
|
},
|
|
272
276
|
{
|
|
273
277
|
key: 'created_time',
|
|
@@ -336,6 +340,18 @@ export class FilterOptions {
|
|
|
336
340
|
})
|
|
337
341
|
);
|
|
338
342
|
|
|
343
|
+
const supportPayment = await PaymentConfig.getSupportPayment(true);
|
|
344
|
+
const paymentMethod = supportPayment
|
|
345
|
+
.sort((a, b) => (a.type === 'pos' ? 1 : -1) - (b.type === 'pos' ? 1 : -1))
|
|
346
|
+
.map(payment => {
|
|
347
|
+
if (payment.type === 'pos' && !payment.name.includes('POS')) {
|
|
348
|
+
payment.name = html`<div class="d-flex gap-2">
|
|
349
|
+
${[BgWidget.warningInsignia('POS', { size: 'sm' }), payment.name].join('')}
|
|
350
|
+
</div>`;
|
|
351
|
+
}
|
|
352
|
+
return payment;
|
|
353
|
+
});
|
|
354
|
+
|
|
339
355
|
return [
|
|
340
356
|
{ key: 'orderStatus', type: 'multi_checkbox', name: '訂單狀態', data: this.orderStatusOptions },
|
|
341
357
|
{ key: 'reconciliation_status', type: 'multi_checkbox', name: '對帳狀態', data: this.reconciliationOptions },
|
|
@@ -343,13 +359,7 @@ export class FilterOptions {
|
|
|
343
359
|
key: 'payment_select',
|
|
344
360
|
type: 'multi_checkbox',
|
|
345
361
|
name: '付款方式',
|
|
346
|
-
data:
|
|
347
|
-
if (dd.type === 'pos' && !dd.name.includes('POS')) {
|
|
348
|
-
const name = dd.name;
|
|
349
|
-
dd.name = `<div class="d-flex">${[BgWidget.warningInsignia('POS'), name].join(`<div class="mx-1"></div>`)}</div>`;
|
|
350
|
-
}
|
|
351
|
-
return dd;
|
|
352
|
-
}),
|
|
362
|
+
data: paymentMethod,
|
|
353
363
|
},
|
|
354
364
|
{ key: 'progress', type: 'multi_checkbox', name: '出貨狀況', data: this.progressOptions },
|
|
355
365
|
{ key: 'shipment', type: 'multi_checkbox', name: '運送方式', data: shipmentOptions },
|
|
@@ -798,6 +798,8 @@ export class ProductExcel {
|
|
|
798
798
|
limit: 250,
|
|
799
799
|
productType: pageType,
|
|
800
800
|
product_category: vm.support,
|
|
801
|
+
show_hidden: pageType === 'hidden',
|
|
802
|
+
filter_visible: pageType !== 'hidden',
|
|
801
803
|
};
|
|
802
804
|
const { search, searchType, orderBy, status, collection, accurate_search_collection } = apiJSON;
|
|
803
805
|
const formDataMap = {
|
|
@@ -987,6 +987,8 @@ export class ProductExcel {
|
|
|
987
987
|
limit: 250,
|
|
988
988
|
productType: pageType,
|
|
989
989
|
product_category: vm.support,
|
|
990
|
+
show_hidden: pageType === 'hidden',
|
|
991
|
+
filter_visible: pageType !== 'hidden',
|
|
990
992
|
};
|
|
991
993
|
|
|
992
994
|
const { search, searchType, orderBy, status, collection, accurate_search_collection } = apiJSON;
|
|
@@ -283,31 +283,32 @@ export class ProductSetting {
|
|
|
283
283
|
if (!data['stockList'][item.id]) {
|
|
284
284
|
data['stockList'][item.id] = { count: 0 };
|
|
285
285
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
292
|
-
value="${(_a = data['stockList'][item.id].count) !== null && _a !== void 0 ? _a : 0}"
|
|
293
|
-
min="0"
|
|
294
|
-
oninput="${gvc.event(e => {
|
|
286
|
+
const inputHTML = html `<input
|
|
287
|
+
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
288
|
+
value="${(_a = data['stockList'][item.id].count) !== null && _a !== void 0 ? _a : 0}"
|
|
289
|
+
min="0"
|
|
290
|
+
oninput="${gvc.event(e => {
|
|
295
291
|
const regex = /^[0-9]*$/;
|
|
296
292
|
if (!regex.test(e.value)) {
|
|
297
293
|
e.value = e.value.replace(/[^0-9]/g, '').replace(/e/gi, '');
|
|
298
294
|
}
|
|
299
295
|
})}"
|
|
300
|
-
|
|
296
|
+
onchange="${gvc.event(e => {
|
|
301
297
|
data['stockList'][item.id].count = Number(e.value);
|
|
302
298
|
let count = 0;
|
|
303
299
|
Object.values(data['stockList']).map((stock) => {
|
|
304
300
|
count += parseInt(stock.count, 10);
|
|
305
301
|
});
|
|
306
302
|
data['stock'] = count;
|
|
307
|
-
console.log(
|
|
303
|
+
console.log('data -- ', data);
|
|
308
304
|
gvc.notifyDataChange(vm.id);
|
|
309
305
|
})}"
|
|
310
|
-
|
|
306
|
+
/>`;
|
|
307
|
+
return html ` <div
|
|
308
|
+
class="flex-shrink-0 text-center"
|
|
309
|
+
style="color:#393939;font-size: 16px;font-weight: 400;width:${elementLength}px;"
|
|
310
|
+
>
|
|
311
|
+
${data.show_understocking === 'false' ? '-' : inputHTML}
|
|
311
312
|
</div>`;
|
|
312
313
|
})
|
|
313
314
|
.join('');
|
|
@@ -313,32 +313,35 @@ export class ProductSetting {
|
|
|
313
313
|
if (!(data as any)['stockList'][item.id]) {
|
|
314
314
|
(data as any)['stockList'][item.id] = { count: 0 };
|
|
315
315
|
}
|
|
316
|
+
|
|
317
|
+
const inputHTML = html`<input
|
|
318
|
+
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
319
|
+
value="${(data as any)['stockList'][item.id].count ?? 0}"
|
|
320
|
+
min="0"
|
|
321
|
+
oninput="${gvc.event(e => {
|
|
322
|
+
const regex = /^[0-9]*$/;
|
|
323
|
+
if (!regex.test(e.value)) {
|
|
324
|
+
e.value = e.value.replace(/[^0-9]/g, '').replace(/e/gi, '');
|
|
325
|
+
}
|
|
326
|
+
})}"
|
|
327
|
+
onchange="${gvc.event(e => {
|
|
328
|
+
(data as any)['stockList'][item.id].count = Number(e.value);
|
|
329
|
+
let count = 0;
|
|
330
|
+
Object.values((data as any)['stockList']).map((stock: any) => {
|
|
331
|
+
count += parseInt(stock.count, 10);
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
data['stock'] = count;
|
|
335
|
+
console.log('data -- ', data);
|
|
336
|
+
gvc.notifyDataChange(vm.id);
|
|
337
|
+
})}"
|
|
338
|
+
/>`;
|
|
339
|
+
|
|
316
340
|
return html` <div
|
|
317
|
-
class="flex-shrink-0"
|
|
341
|
+
class="flex-shrink-0 text-center"
|
|
318
342
|
style="color:#393939;font-size: 16px;font-weight: 400;width:${elementLength}px;"
|
|
319
343
|
>
|
|
320
|
-
|
|
321
|
-
style="width: 100%;height: 40px;padding: 0px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
322
|
-
value="${(data as any)['stockList'][item.id].count ?? 0}"
|
|
323
|
-
min="0"
|
|
324
|
-
oninput="${gvc.event(e => {
|
|
325
|
-
const regex = /^[0-9]*$/;
|
|
326
|
-
if (!regex.test(e.value)) {
|
|
327
|
-
e.value = e.value.replace(/[^0-9]/g, '').replace(/e/gi, '');
|
|
328
|
-
}
|
|
329
|
-
})}"
|
|
330
|
-
onchange="${gvc.event(e => {
|
|
331
|
-
(data as any)['stockList'][item.id].count = Number(e.value);
|
|
332
|
-
let count = 0;
|
|
333
|
-
Object.values((data as any)['stockList']).map((stock: any) => {
|
|
334
|
-
count += parseInt(stock.count, 10);
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
data['stock'] = count;
|
|
338
|
-
console.log("data -- " , data);
|
|
339
|
-
gvc.notifyDataChange(vm.id);
|
|
340
|
-
})}"
|
|
341
|
-
/>
|
|
344
|
+
${data.show_understocking === 'false' ? '-' : inputHTML}
|
|
342
345
|
</div>`;
|
|
343
346
|
})
|
|
344
347
|
.join('');
|