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
|
@@ -21,7 +21,7 @@ export class PosConfigSetting {
|
|
|
21
21
|
id: string;
|
|
22
22
|
tableId: string;
|
|
23
23
|
filterId: string;
|
|
24
|
-
type: 'basic' | 'function' | 'global';
|
|
24
|
+
type: 'basic' | 'function' | 'global' | 'finance';
|
|
25
25
|
data: any;
|
|
26
26
|
SEOData: any;
|
|
27
27
|
domain: any;
|
|
@@ -91,7 +91,6 @@ export class PosConfigSetting {
|
|
|
91
91
|
ApiUser.getPublicConfig('store-information', 'manager').then((response: any) => {
|
|
92
92
|
const data = response.response.value;
|
|
93
93
|
|
|
94
|
-
// 初始化 vm.data
|
|
95
94
|
vm.data = {
|
|
96
95
|
ubn: '',
|
|
97
96
|
email: '',
|
|
@@ -285,23 +284,25 @@ ${BgWidget.customButton({
|
|
|
285
284
|
button: { color: 'snow', size: 'md' },
|
|
286
285
|
text: { name: '編輯' },
|
|
287
286
|
event: gvc.event(() => {
|
|
288
|
-
vm.data.prdouct_card_layout=vm.data.prdouct_card_layout??'16:9'
|
|
287
|
+
vm.data.prdouct_card_layout = vm.data.prdouct_card_layout ?? '16:9';
|
|
289
288
|
BgWidget.settingDialog({
|
|
290
289
|
gvc,
|
|
291
290
|
title,
|
|
292
291
|
width: 600,
|
|
293
292
|
innerHTML: gvc => {
|
|
294
|
-
return
|
|
293
|
+
return BgWidget.editeInput({
|
|
295
294
|
gvc: gvc,
|
|
296
295
|
|
|
297
296
|
title: '卡片比例',
|
|
298
297
|
default: vm.data.prdouct_card_layout,
|
|
299
298
|
placeHolder: '請輸入卡片比例,範例: 16:9',
|
|
300
|
-
callback:
|
|
301
|
-
if(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
299
|
+
callback: text => {
|
|
300
|
+
if (
|
|
301
|
+
text.split(':').map(dd => {
|
|
302
|
+
return Number.isFinite(Number(dd));
|
|
303
|
+
}).length === 2
|
|
304
|
+
) {
|
|
305
|
+
vm.data.prdouct_card_layout = text;
|
|
305
306
|
}
|
|
306
307
|
},
|
|
307
308
|
});
|
|
@@ -451,11 +452,10 @@ ${BgWidget.customButton({
|
|
|
451
452
|
},
|
|
452
453
|
};
|
|
453
454
|
|
|
454
|
-
return
|
|
455
|
-
|
|
456
|
-
|
|
455
|
+
return [
|
|
456
|
+
html`<div class="title-container">${BgWidget.title('全站設定')}</div>`,
|
|
457
|
+
BgWidget.tab(
|
|
457
458
|
[
|
|
458
|
-
// { title: '商店訊息', key: 'basic' },
|
|
459
459
|
{ title: '功能管理', key: 'function' },
|
|
460
460
|
{ title: '金流設定', key: 'finance' },
|
|
461
461
|
],
|
|
@@ -463,25 +463,28 @@ ${BgWidget.customButton({
|
|
|
463
463
|
vm.type,
|
|
464
464
|
text => {
|
|
465
465
|
vm.type = text as any;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
466
|
+
},
|
|
467
|
+
vm.type === 'finance' ? 'margin-bottom: 0 !important;' : ''
|
|
468
|
+
),
|
|
469
|
+
typeMap[vm.type] ? typeMap[vm.type]() : '',
|
|
470
|
+
BgWidget.mbContainer(300),
|
|
471
|
+
vm.type === 'finance'
|
|
472
|
+
? ''
|
|
473
|
+
: html`<div class="update-bar-container">
|
|
474
|
+
${BgWidget.save(
|
|
475
|
+
gvc.event(async () => {
|
|
476
|
+
dialog.dataLoading({ visible: true });
|
|
477
|
+
await vm.save_info();
|
|
478
|
+
await Promise.all(PosConfigSetting.saveArray.map(dd => dd()));
|
|
479
|
+
PosConfigSetting.saveArray = [];
|
|
480
|
+
dialog.dataLoading({ visible: false });
|
|
481
|
+
dialog.successMessage({ text: '儲存成功' });
|
|
482
|
+
}),
|
|
483
|
+
'儲存',
|
|
484
|
+
'guide3-5'
|
|
485
|
+
)}
|
|
486
|
+
</div>`,
|
|
487
|
+
].join('');
|
|
485
488
|
},
|
|
486
489
|
divCreate: {
|
|
487
490
|
style: 'color: #393939; font-size: 14px;',
|
|
@@ -15,83 +15,91 @@ const html = String.raw;
|
|
|
15
15
|
export class PaymentFunction {
|
|
16
16
|
static cashFinish(gvc, total, callback) {
|
|
17
17
|
gvc.addStyle(`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
.dialog-box {
|
|
19
|
+
width: 100vw;
|
|
20
|
+
height: 100vh;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
25
|
+
z-index: 10000;
|
|
26
|
+
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
.dialog-absolute {
|
|
29
|
+
width: 100%;
|
|
30
|
+
border-top: 1px solid #e2e5f1;
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 0px;
|
|
33
|
+
bottom: 0px;
|
|
34
|
+
height: 40px;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
.hover-cancel {
|
|
42
|
+
background-color: #fff;
|
|
43
|
+
border-radius: 0 0 0 0.5rem;
|
|
44
|
+
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
.hover-cancel:hover {
|
|
47
|
+
background-color: #e6e6e6;
|
|
48
|
+
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
.hover-save {
|
|
51
|
+
background-color: #393939;
|
|
52
|
+
border-radius: 0 0 0.5rem;
|
|
53
|
+
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
.hover-save:hover {
|
|
56
|
+
background-color: #646464;
|
|
57
|
+
}
|
|
58
|
+
`);
|
|
59
59
|
const dialog = new ShareDialog(gvc.glitter);
|
|
60
60
|
gvc.glitter.innerDialog((gvc) => {
|
|
61
61
|
return html `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
<div class="dialog-box">
|
|
63
|
+
<div class="dialog-content position-relative pb-5" style="width: 452px;max-width: calc(100% - 20px);">
|
|
64
|
+
<div
|
|
65
|
+
class="my-3 fs-6 fw-500 text-center"
|
|
66
|
+
style="white-space: normal; overflow-wrap: anywhere;font-size: 28px;font-style: normal;font-weight: 700;line-height: normal;letter-spacing: 2.8px;"
|
|
67
|
+
>
|
|
68
|
+
請先收取現金後進行結帳
|
|
69
|
+
</div>
|
|
70
|
+
<div
|
|
71
|
+
style="font-size: 18px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.72px;"
|
|
72
|
+
>
|
|
73
|
+
本次結帳金額為
|
|
74
|
+
<span style="font-size: 28px;font-style: normal;font-weight: 700;line-height: 160%;"
|
|
75
|
+
>$${total.toLocaleString()}</span
|
|
76
|
+
>
|
|
77
|
+
</div>
|
|
78
|
+
<div
|
|
79
|
+
class="d-flex align-items-center justify-content-center"
|
|
80
|
+
style="margin-top: 24px;font-size: 16px;font-weight: 700;letter-spacing: 0.64px;"
|
|
81
|
+
>
|
|
82
|
+
<div
|
|
83
|
+
style="border-radius: 10px;border: 1px solid #DDD;background: #FFF;padding: 12px 24px;color: #393939;width:120px;text-align:center;"
|
|
84
|
+
onclick="${gvc.event(() => {
|
|
77
85
|
gvc.glitter.closeDiaLog();
|
|
78
86
|
})}"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
>
|
|
88
|
+
取消
|
|
89
|
+
</div>
|
|
90
|
+
<div
|
|
91
|
+
style="border-radius: 10px;background: #393939;padding: 12px 24px;color: #FFF;margin-left: 24px;width:120px;text-align:center;"
|
|
92
|
+
onclick="${gvc.event(() => {
|
|
85
93
|
gvc.closeDialog();
|
|
86
94
|
callback(true);
|
|
87
95
|
})}"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
>
|
|
97
|
+
確認
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
95
103
|
}, 'orderFinish', {
|
|
96
104
|
dismiss: () => {
|
|
97
105
|
},
|
|
@@ -112,7 +120,7 @@ export class PaymentFunction {
|
|
|
112
120
|
}, (res) => {
|
|
113
121
|
var _a;
|
|
114
122
|
const response = JSON.parse(res.result.data);
|
|
115
|
-
if (response.code ===
|
|
123
|
+
if (response.code === '250') {
|
|
116
124
|
gvc.closeDialog();
|
|
117
125
|
callback(true);
|
|
118
126
|
}
|
|
@@ -126,7 +134,7 @@ export class PaymentFunction {
|
|
|
126
134
|
gvc.glitter.share.credit_card_callback = (res) => {
|
|
127
135
|
var _a;
|
|
128
136
|
const response = JSON.parse(res.result.data);
|
|
129
|
-
if (response.code ===
|
|
137
|
+
if (response.code === '250') {
|
|
130
138
|
gvc.closeDialog();
|
|
131
139
|
callback(true);
|
|
132
140
|
}
|
|
@@ -150,27 +158,36 @@ export class PaymentFunction {
|
|
|
150
158
|
}, 100);
|
|
151
159
|
}
|
|
152
160
|
return html `
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
<div class="dialog-box">
|
|
162
|
+
<div class="dialog-content position-relative " style="width: 370px;max-width: calc(100% - 20px);">
|
|
163
|
+
<div
|
|
164
|
+
class="my-3 fw-500 text-center"
|
|
165
|
+
style="white-space: normal; overflow-wrap: anywhere;font-size: 20px;font-style: normal;font-weight: 700;line-height: normal;letter-spacing: 2.8px;"
|
|
166
|
+
>
|
|
167
|
+
請感應或插入信用卡進行付款
|
|
168
|
+
</div>
|
|
169
|
+
<div
|
|
170
|
+
style="font-size: 16px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.72px;"
|
|
171
|
+
>
|
|
172
|
+
若逾時將重新選擇付款方式
|
|
173
|
+
</div>
|
|
174
|
+
<img
|
|
175
|
+
class="mt-3"
|
|
176
|
+
style="max-width:70%;"
|
|
177
|
+
src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_scsds7s8sbsfs3s8_b00f1f368f2a9b9fb067a844f940ca2a.gif"
|
|
178
|
+
/>
|
|
179
|
+
<div
|
|
180
|
+
class="fw-500 w-100 mt-3"
|
|
181
|
+
style="border-radius: 10px;border: 1px solid #DDD;background: #FFF;padding: 12px 24px;color: #393939;width:120px;text-align:center;"
|
|
182
|
+
onclick="${gvc.event(() => {
|
|
168
183
|
gvc.glitter.closeDiaLog();
|
|
169
|
-
})}"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
184
|
+
})}"
|
|
185
|
+
>
|
|
186
|
+
取消付款
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
`;
|
|
174
191
|
}, 'orderFinish', {
|
|
175
192
|
dismiss: () => {
|
|
176
193
|
},
|
|
@@ -180,7 +197,7 @@ export class PaymentFunction {
|
|
|
180
197
|
const dialog = new ShareDialog(gvc.glitter);
|
|
181
198
|
gvc.glitter.innerDialog((gvc) => {
|
|
182
199
|
let block = false;
|
|
183
|
-
PayConfig.onPayment =
|
|
200
|
+
PayConfig.onPayment = scanText => {
|
|
184
201
|
if (block) {
|
|
185
202
|
return;
|
|
186
203
|
}
|
|
@@ -195,7 +212,7 @@ export class PaymentFunction {
|
|
|
195
212
|
})
|
|
196
213
|
.join(','),
|
|
197
214
|
oneTimeKey: scanText,
|
|
198
|
-
}).then(
|
|
215
|
+
}).then(res => {
|
|
199
216
|
dialog.dataLoading({ visible: false });
|
|
200
217
|
if (!res.result || !res.response.result) {
|
|
201
218
|
dialog.errorMessage({ text: '交易失敗' });
|
|
@@ -210,62 +227,67 @@ export class PaymentFunction {
|
|
|
210
227
|
};
|
|
211
228
|
let m_text = '';
|
|
212
229
|
return html `
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
<div class="dialog-box">
|
|
231
|
+
<div class="dialog-content position-relative " style="width: 370px;max-width: calc(100% - 20px);">
|
|
232
|
+
<div
|
|
233
|
+
class="my-3 fw-500 text-center"
|
|
234
|
+
style="white-space: normal; overflow-wrap: anywhere;font-size: 20px;font-style: normal;font-weight: 700;line-height: normal;letter-spacing: 2.8px;"
|
|
235
|
+
>
|
|
236
|
+
請掃描LINE Pay付款條碼
|
|
237
|
+
</div>
|
|
238
|
+
<img
|
|
239
|
+
class="mt-3"
|
|
240
|
+
style="max-width:70%;"
|
|
241
|
+
src="https://d3jnmi1tfjgtti.cloudfront.net/file/234285319/size1440_s*px$_s6sfs4scs5s3s0sa_Screenshot2024-09-06at12.28.00 PM.jpg"
|
|
242
|
+
/>
|
|
243
|
+
<div class="d-flex w-100 align-items-center mt-3" style="border:1px solid grey;height: 50px;">
|
|
244
|
+
<input
|
|
245
|
+
class="form-control h-100"
|
|
246
|
+
style="border: none;"
|
|
247
|
+
placeholder="請輸入或掃描付款代碼"
|
|
248
|
+
onchange="${gvc.event((e, event) => {
|
|
229
249
|
m_text = e.value;
|
|
230
250
|
})}"
|
|
231
|
-
|
|
232
|
-
|
|
251
|
+
value="${m_text || ''}"
|
|
252
|
+
onfocus="${gvc.event(() => {
|
|
233
253
|
block = true;
|
|
234
254
|
})}"
|
|
235
|
-
|
|
255
|
+
onblur="${gvc.event(() => {
|
|
236
256
|
block = false;
|
|
237
257
|
})}"
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
gvc.glitter.runJsInterFace('start_scan', {},
|
|
258
|
+
/>
|
|
259
|
+
<div class="flex-fill"></div>
|
|
260
|
+
<div
|
|
261
|
+
style="background: grey;width: 50px;"
|
|
262
|
+
class="d-flex align-items-center justify-content-center text-white h-100"
|
|
263
|
+
onclick="${gvc.event(() => {
|
|
264
|
+
gvc.glitter.runJsInterFace('start_scan', {}, res => {
|
|
245
265
|
PayConfig.onPayment(res.text);
|
|
246
266
|
});
|
|
247
267
|
})}"
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
268
|
+
>
|
|
269
|
+
<i class="fa-regular fa-barcode-read"></i>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
<div
|
|
273
|
+
class="d-flex align-items-center justify-content-center w-100"
|
|
274
|
+
style="margin-top: 24px;font-size: 16px;font-weight: 700;letter-spacing: 0.64px;"
|
|
275
|
+
>
|
|
276
|
+
<div
|
|
277
|
+
class="flex-fill"
|
|
278
|
+
style="border-radius: 10px;border: 1px solid #DDD;background: #FFF;padding: 12px 24px;color: #393939;text-align:center;"
|
|
279
|
+
onclick="${gvc.event(() => {
|
|
258
280
|
PayConfig.onPayment = undefined;
|
|
259
281
|
gvc.glitter.closeDiaLog();
|
|
260
282
|
})}"
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
283
|
+
>
|
|
284
|
+
取消
|
|
285
|
+
</div>
|
|
286
|
+
<div class="mx-2"></div>
|
|
287
|
+
<div
|
|
288
|
+
class="flex-fill"
|
|
289
|
+
style="border-radius: 10px;background: #393939;padding: 12px 24px;color: #FFF;text-align:center;"
|
|
290
|
+
onclick="${gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
269
291
|
if (!m_text) {
|
|
270
292
|
dialog.errorMessage({ text: '請輸入交易條碼' });
|
|
271
293
|
return;
|
|
@@ -273,17 +295,109 @@ export class PaymentFunction {
|
|
|
273
295
|
block = false;
|
|
274
296
|
PayConfig.onPayment(m_text);
|
|
275
297
|
}))}"
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
298
|
+
>
|
|
299
|
+
確定
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
`;
|
|
283
305
|
}, 'orderFinish', {
|
|
284
306
|
dismiss: () => {
|
|
285
307
|
gvc.glitter.share.scan_back = () => { };
|
|
286
308
|
},
|
|
287
309
|
});
|
|
288
310
|
}
|
|
311
|
+
static customFinish(gvc, total, callback) {
|
|
312
|
+
gvc.addStyle(`
|
|
313
|
+
.dialog-box {
|
|
314
|
+
width: 100vw;
|
|
315
|
+
height: 100vh;
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
justify-content: center;
|
|
319
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
320
|
+
z-index: 10000;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.dialog-absolute {
|
|
324
|
+
width: 100%;
|
|
325
|
+
border-top: 1px solid #e2e5f1;
|
|
326
|
+
position: absolute;
|
|
327
|
+
left: 0px;
|
|
328
|
+
bottom: 0px;
|
|
329
|
+
height: 40px;
|
|
330
|
+
display: flex;
|
|
331
|
+
align-items: center;
|
|
332
|
+
justify-content: center;
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.hover-cancel {
|
|
337
|
+
background-color: #fff;
|
|
338
|
+
border-radius: 0 0 0 0.5rem;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.hover-cancel:hover {
|
|
342
|
+
background-color: #e6e6e6;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.hover-save {
|
|
346
|
+
background-color: #393939;
|
|
347
|
+
border-radius: 0 0 0.5rem;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.hover-save:hover {
|
|
351
|
+
background-color: #646464;
|
|
352
|
+
}
|
|
353
|
+
`);
|
|
354
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
355
|
+
gvc.glitter.innerDialog((gvc) => {
|
|
356
|
+
return html `
|
|
357
|
+
<div class="dialog-box">
|
|
358
|
+
<div class="dialog-content position-relative pb-5" style="width: 452px;max-width: calc(100% - 20px);">
|
|
359
|
+
<div
|
|
360
|
+
class="my-3 fs-6 fw-500 text-center"
|
|
361
|
+
style="white-space: normal; overflow-wrap: anywhere;font-size: 28px;font-style: normal;font-weight: 700;line-height: normal;letter-spacing: 2.8px;"
|
|
362
|
+
>
|
|
363
|
+
請先收取款項後進行結帳
|
|
364
|
+
</div>
|
|
365
|
+
<div
|
|
366
|
+
style="font-size: 18px;font-style: normal;font-weight: 400;line-height: 160%;letter-spacing: 0.72px;"
|
|
367
|
+
>
|
|
368
|
+
本次結帳金額為
|
|
369
|
+
<span style="font-size: 28px;font-style: normal;font-weight: 700;line-height: 160%;"
|
|
370
|
+
>$${total.toLocaleString()}</span
|
|
371
|
+
>
|
|
372
|
+
</div>
|
|
373
|
+
<div
|
|
374
|
+
class="d-flex align-items-center justify-content-center"
|
|
375
|
+
style="margin-top: 24px;font-size: 16px;font-weight: 700;letter-spacing: 0.64px;"
|
|
376
|
+
>
|
|
377
|
+
<div
|
|
378
|
+
style="border-radius: 10px;border: 1px solid #DDD;background: #FFF;padding: 12px 24px;color: #393939;width:120px;text-align:center;"
|
|
379
|
+
onclick="${gvc.event(() => {
|
|
380
|
+
gvc.glitter.closeDiaLog();
|
|
381
|
+
})}"
|
|
382
|
+
>
|
|
383
|
+
取消
|
|
384
|
+
</div>
|
|
385
|
+
<div
|
|
386
|
+
style="border-radius: 10px;background: #393939;padding: 12px 24px;color: #FFF;margin-left: 24px;width:120px;text-align:center;"
|
|
387
|
+
onclick="${gvc.event(() => {
|
|
388
|
+
gvc.closeDialog();
|
|
389
|
+
callback(true);
|
|
390
|
+
})}"
|
|
391
|
+
>
|
|
392
|
+
確認
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
`;
|
|
398
|
+
}, 'orderFinish', {
|
|
399
|
+
dismiss: () => {
|
|
400
|
+
},
|
|
401
|
+
});
|
|
402
|
+
}
|
|
289
403
|
}
|