ts-glitter 22.5.6 → 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 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/index.ts +16 -1
- 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/database.js +5 -1
- package/src/modules/database.js.map +1 -1
- package/src/modules/database.ts +5 -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
|
@@ -4,237 +4,247 @@ import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
|
4
4
|
|
|
5
5
|
const html = String.raw;
|
|
6
6
|
export class PosCheckoutSetting {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
public static paymentMethod() {}
|
|
7
|
+
public static main(gvc: GVC) {
|
|
8
|
+
return `<div>${PosCheckoutSetting.invoiceSetting(gvc)}</div>`;
|
|
9
|
+
}
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
const saasConfig: {
|
|
15
|
-
config: any;
|
|
16
|
-
api: any;
|
|
17
|
-
} = (window.parent as any).saasConfig;
|
|
18
|
-
const glitter = (window as any).glitter;
|
|
19
|
-
const vm: {
|
|
20
|
-
id: string;
|
|
21
|
-
loading: boolean;
|
|
22
|
-
data: any;
|
|
23
|
-
} = {
|
|
24
|
-
id: glitter.getUUID(),
|
|
25
|
-
loading: true,
|
|
26
|
-
data: {},
|
|
27
|
-
};
|
|
28
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
11
|
+
public static paymentMethod() {}
|
|
29
12
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
13
|
+
public static invoiceSetting(gvc: GVC) {
|
|
14
|
+
const saasConfig: {
|
|
15
|
+
config: any;
|
|
16
|
+
api: any;
|
|
17
|
+
} = (window.parent as any).saasConfig;
|
|
18
|
+
const glitter = (window as any).glitter;
|
|
19
|
+
const vm: {
|
|
20
|
+
id: string;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
data: any;
|
|
23
|
+
} = {
|
|
24
|
+
id: glitter.getUUID(),
|
|
25
|
+
loading: true,
|
|
26
|
+
data: {},
|
|
27
|
+
};
|
|
28
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
43
29
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const id = gvc.glitter.getUUID();
|
|
58
|
-
return {
|
|
59
|
-
bind: id,
|
|
60
|
-
view: () => {
|
|
61
|
-
return new Promise(async (resolve, reject) => {
|
|
62
|
-
const data = await saasConfig.api.getPrivateConfig(saasConfig.config.appName, `invoice_setting`);
|
|
63
|
-
if (data.response.result[0]) {
|
|
64
|
-
vm.data = data.response.result[0].value;
|
|
65
|
-
}
|
|
66
|
-
if (vm.data.point === 'beta') {
|
|
67
|
-
vm.data.whiteList = vm.data.whiteList ?? [];
|
|
68
|
-
vm.data.whiteListExpand = vm.data.whiteListExpand ?? {};
|
|
69
|
-
}
|
|
70
|
-
resolve(
|
|
71
|
-
gvc.bindView(() => {
|
|
72
|
-
vm.data.fincial = vm.data.fincial ?? 'ezpay';
|
|
73
|
-
vm.data.point = vm.data.point ?? 'beta';
|
|
74
|
-
const id = gvc.glitter.getUUID();
|
|
75
|
-
return {
|
|
76
|
-
bind: id,
|
|
77
|
-
view: () => {
|
|
78
|
-
return html`
|
|
79
|
-
<div class="d-flex flex-column" style="gap:18px;">
|
|
80
|
-
${[
|
|
81
|
-
{
|
|
82
|
-
title: html` <div class="d-flex flex-column">
|
|
83
|
-
開立發票
|
|
84
|
-
<span style="color:#8D8D8D;font-size: 12px;">串接綠界電子發票系統進行發票開立</span>
|
|
85
|
-
</div>`,
|
|
86
|
-
value: 'ecpay',
|
|
87
|
-
},
|
|
88
|
-
// {
|
|
89
|
-
// title: html` <div class="d-flex flex-column">
|
|
90
|
-
// 線下開立
|
|
91
|
-
// <span style="color:#8D8D8D;font-size: 12px;">顧客需填寫發票資訊,由店家自行開立發票</span>
|
|
92
|
-
// </div>`,
|
|
93
|
-
// value: 'off_line',
|
|
94
|
-
// },
|
|
95
|
-
{
|
|
96
|
-
title: html` <div class="d-flex flex-column">不開立發票</div>`,
|
|
97
|
-
value: 'nouse',
|
|
98
|
-
},
|
|
99
|
-
]
|
|
100
|
-
.map((dd) => {
|
|
101
|
-
return html` <div>
|
|
102
|
-
${[
|
|
103
|
-
html` <div
|
|
104
|
-
class="d-flex align-items-center cursor_pointer"
|
|
105
|
-
style="gap:8px;"
|
|
106
|
-
onclick="${gvc.event(() => {
|
|
107
|
-
vm.data.fincial = dd.value;
|
|
108
|
-
gvc.notifyDataChange(id);
|
|
109
|
-
})}"
|
|
110
|
-
>
|
|
111
|
-
${vm.data.fincial === dd.value
|
|
112
|
-
? `<i class="fa-sharp fa-solid fa-circle-dot color39"></i>`
|
|
113
|
-
: ` <div class="c_39_checkbox"></div>`}
|
|
114
|
-
<div class="tx_normal fw-normal">${dd.title}</div>
|
|
115
|
-
</div>`,
|
|
116
|
-
html` <div class="d-flex position-relative mt-2" >
|
|
117
|
-
<div class="ms-2 border-end position-absolute h-100" style="left: 0px;"></div>
|
|
118
|
-
<div class="flex-fill " style="margin-left:30px;max-width: 518px;">
|
|
119
|
-
${(() => {
|
|
120
|
-
if (
|
|
121
|
-
vm.data.fincial === 'nouse' ||
|
|
122
|
-
vm.data.fincial === 'off_line' ||
|
|
123
|
-
vm.data.fincial !== dd.value
|
|
124
|
-
) {
|
|
125
|
-
return [].join('');
|
|
126
|
-
} else {
|
|
127
|
-
return [
|
|
128
|
-
BgWidget.inlineCheckBox({
|
|
129
|
-
title: '站點',
|
|
130
|
-
gvc: gvc,
|
|
131
|
-
def: vm.data.point,
|
|
132
|
-
array: [
|
|
133
|
-
{
|
|
134
|
-
title: '測試區',
|
|
135
|
-
value: 'beta',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
title: '正式區',
|
|
139
|
-
value: 'official',
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
callback: (text) => {
|
|
143
|
-
vm.data.point = text;
|
|
144
|
-
if (vm.data.point == 'beta') {
|
|
145
|
-
vm.data.hashkey = vm.data.bhashkey;
|
|
146
|
-
vm.data.hashiv = vm.data.bhashiv;
|
|
147
|
-
} else {
|
|
148
|
-
vm.data.hashkey = vm.data.ohashkey;
|
|
149
|
-
vm.data.hashiv = vm.data.ohashiv;
|
|
150
|
-
}
|
|
151
|
-
gvc.notifyDataChange(id);
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
BgWidget.editeInput({
|
|
155
|
-
gvc: gvc,
|
|
156
|
-
title: '特店編號',
|
|
157
|
-
default: vm.data.merchNO ?? '',
|
|
158
|
-
type: 'text',
|
|
159
|
-
placeHolder: '請輸入特店編號',
|
|
160
|
-
callback: (text) => {
|
|
161
|
-
vm.data.merchNO = text;
|
|
162
|
-
},
|
|
163
|
-
}),
|
|
164
|
-
BgWidget.editeInput({
|
|
165
|
-
gvc: gvc,
|
|
166
|
-
title: 'HashKey',
|
|
167
|
-
default: vm.data.hashkey ?? '',
|
|
168
|
-
type: 'text',
|
|
169
|
-
placeHolder: '請輸入HashKey',
|
|
170
|
-
callback: (text) => {
|
|
171
|
-
vm.data.hashkey = text;
|
|
172
|
-
if (vm.data.point == 'beta') {
|
|
173
|
-
vm.data.bhashkey = text;
|
|
174
|
-
} else {
|
|
175
|
-
vm.data.ohashkey = text;
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
}),
|
|
179
|
-
BgWidget.editeInput({
|
|
180
|
-
gvc: gvc,
|
|
181
|
-
title: 'HashIV',
|
|
182
|
-
default: vm.data.hashiv ?? '',
|
|
183
|
-
type: 'text',
|
|
184
|
-
placeHolder: '請輸入HashIV',
|
|
185
|
-
callback: (text) => {
|
|
186
|
-
vm.data.hashiv = text;
|
|
187
|
-
if (vm.data.point == 'beta') {
|
|
188
|
-
vm.data.bhashiv = text;
|
|
189
|
-
} else {
|
|
190
|
-
vm.data.ohashiv = text;
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
}),
|
|
194
|
-
].join(html` <div style="height: 12px;"></div>`);
|
|
195
|
-
}
|
|
196
|
-
})()}
|
|
197
|
-
</div>
|
|
198
|
-
</div>`,
|
|
199
|
-
].join('')}
|
|
200
|
-
</div>`;
|
|
201
|
-
})
|
|
202
|
-
.join('')}
|
|
203
|
-
</div>
|
|
204
|
-
`;
|
|
205
|
-
},
|
|
206
|
-
divCreate: {
|
|
207
|
-
style: ``,
|
|
208
|
-
class: `w-100`,
|
|
209
|
-
},
|
|
210
|
-
};
|
|
211
|
-
})
|
|
212
|
-
);
|
|
213
|
-
});
|
|
214
|
-
},
|
|
215
|
-
divCreate: {
|
|
216
|
-
class: 'd-flex flex-column flex-column-reverse flex-md-row px-0',
|
|
217
|
-
style: 'gap:10px;',
|
|
218
|
-
},
|
|
219
|
-
};
|
|
220
|
-
})
|
|
221
|
-
),
|
|
222
|
-
BgWidget.mbContainer(240),
|
|
223
|
-
html` <div class="update-bar-container">
|
|
224
|
-
${BgWidget.save(
|
|
225
|
-
gvc.event(() => {
|
|
226
|
-
save(() => {
|
|
227
|
-
dialog.successMessage({ text: '設定成功' });
|
|
228
|
-
});
|
|
229
|
-
})
|
|
230
|
-
)}
|
|
231
|
-
</div>`,
|
|
232
|
-
].join('')
|
|
233
|
-
)}
|
|
234
|
-
`
|
|
235
|
-
);
|
|
236
|
-
},
|
|
30
|
+
function save(next: () => void) {
|
|
31
|
+
dialog.dataLoading({ visible: true, text: '請稍候...' });
|
|
32
|
+
saasConfig.api
|
|
33
|
+
.setPrivateConfig(saasConfig.config.appName, `invoice_setting`, vm.data)
|
|
34
|
+
.then((r: { response: any; result: boolean }) => {
|
|
35
|
+
setTimeout(() => {
|
|
36
|
+
dialog.dataLoading({ visible: false, text: '請稍候...' });
|
|
37
|
+
if (r.response) {
|
|
38
|
+
next();
|
|
39
|
+
} else {
|
|
40
|
+
dialog.errorMessage({ text: '設定失敗' });
|
|
41
|
+
}
|
|
42
|
+
}, 1000);
|
|
237
43
|
});
|
|
238
44
|
}
|
|
45
|
+
|
|
46
|
+
return gvc.bindView({
|
|
47
|
+
bind: vm.id,
|
|
48
|
+
view: () => {
|
|
49
|
+
return BgWidget.container(html`
|
|
50
|
+
<div class="title-container">
|
|
51
|
+
${BgWidget.title(`發票設定`)}
|
|
52
|
+
<div class="flex-fill"></div>
|
|
53
|
+
</div>
|
|
54
|
+
${BgWidget.container(
|
|
55
|
+
[
|
|
56
|
+
BgWidget.mainCard(
|
|
57
|
+
gvc.bindView(() => {
|
|
58
|
+
const id = gvc.glitter.getUUID();
|
|
59
|
+
return {
|
|
60
|
+
bind: id,
|
|
61
|
+
view: () => {
|
|
62
|
+
return new Promise(async (resolve, reject) => {
|
|
63
|
+
const data = await saasConfig.api.getPrivateConfig(
|
|
64
|
+
saasConfig.config.appName,
|
|
65
|
+
`invoice_setting`
|
|
66
|
+
);
|
|
67
|
+
if (data.response.result[0]) {
|
|
68
|
+
vm.data = data.response.result[0].value;
|
|
69
|
+
}
|
|
70
|
+
if (vm.data.point === 'beta') {
|
|
71
|
+
vm.data.whiteList = vm.data.whiteList ?? [];
|
|
72
|
+
vm.data.whiteListExpand = vm.data.whiteListExpand ?? {};
|
|
73
|
+
}
|
|
74
|
+
resolve(
|
|
75
|
+
gvc.bindView(() => {
|
|
76
|
+
vm.data.fincial = vm.data.fincial ?? 'ezpay';
|
|
77
|
+
vm.data.point = vm.data.point ?? 'beta';
|
|
78
|
+
const id = gvc.glitter.getUUID();
|
|
79
|
+
return {
|
|
80
|
+
bind: id,
|
|
81
|
+
view: () => {
|
|
82
|
+
return html`
|
|
83
|
+
<div class="d-flex flex-column" style="gap:18px;">
|
|
84
|
+
${[
|
|
85
|
+
{
|
|
86
|
+
title: html` <div class="d-flex flex-column">
|
|
87
|
+
開立發票
|
|
88
|
+
<span style="color:#8D8D8D;font-size: 12px;"
|
|
89
|
+
>串接綠界電子發票系統進行發票開立</span
|
|
90
|
+
>
|
|
91
|
+
</div>`,
|
|
92
|
+
value: 'ecpay',
|
|
93
|
+
},
|
|
94
|
+
// {
|
|
95
|
+
// title: html` <div class="d-flex flex-column">
|
|
96
|
+
// 線下開立
|
|
97
|
+
// <span style="color:#8D8D8D;font-size: 12px;"
|
|
98
|
+
// >顧客需填寫發票資訊,由店家自行開立發票</span
|
|
99
|
+
// >
|
|
100
|
+
// </div>`,
|
|
101
|
+
// value: 'off_line',
|
|
102
|
+
// },
|
|
103
|
+
{
|
|
104
|
+
title: html` <div class="d-flex flex-column">不開立發票</div>`,
|
|
105
|
+
value: 'nouse',
|
|
106
|
+
},
|
|
107
|
+
]
|
|
108
|
+
.map(dd => {
|
|
109
|
+
return html` <div>
|
|
110
|
+
${[
|
|
111
|
+
html` <div
|
|
112
|
+
class="d-flex align-items-center cursor_pointer"
|
|
113
|
+
style="gap:8px;"
|
|
114
|
+
onclick="${gvc.event(() => {
|
|
115
|
+
vm.data.fincial = dd.value;
|
|
116
|
+
gvc.notifyDataChange(id);
|
|
117
|
+
})}"
|
|
118
|
+
>
|
|
119
|
+
${vm.data.fincial === dd.value
|
|
120
|
+
? `<i class="fa-sharp fa-solid fa-circle-dot color39"></i>`
|
|
121
|
+
: ` <div class="c_39_checkbox"></div>`}
|
|
122
|
+
<div class="tx_normal fw-normal">${dd.title}</div>
|
|
123
|
+
</div>`,
|
|
124
|
+
html` <div class="d-flex position-relative mt-2">
|
|
125
|
+
<div
|
|
126
|
+
class="ms-2 border-end position-absolute h-100"
|
|
127
|
+
style="left: 0px;"
|
|
128
|
+
></div>
|
|
129
|
+
<div class="flex-fill " style="margin-left:30px;max-width: 518px;">
|
|
130
|
+
${(() => {
|
|
131
|
+
if (
|
|
132
|
+
vm.data.fincial === 'nouse' ||
|
|
133
|
+
vm.data.fincial === 'off_line' ||
|
|
134
|
+
vm.data.fincial !== dd.value
|
|
135
|
+
) {
|
|
136
|
+
return [].join('');
|
|
137
|
+
} else {
|
|
138
|
+
return [
|
|
139
|
+
BgWidget.inlineCheckBox({
|
|
140
|
+
title: '站點',
|
|
141
|
+
gvc: gvc,
|
|
142
|
+
def: vm.data.point,
|
|
143
|
+
array: [
|
|
144
|
+
{
|
|
145
|
+
title: '測試區',
|
|
146
|
+
value: 'beta',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
title: '正式區',
|
|
150
|
+
value: 'official',
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
callback: text => {
|
|
154
|
+
vm.data.point = text;
|
|
155
|
+
if (vm.data.point == 'beta') {
|
|
156
|
+
vm.data.hashkey = vm.data.bhashkey;
|
|
157
|
+
vm.data.hashiv = vm.data.bhashiv;
|
|
158
|
+
} else {
|
|
159
|
+
vm.data.hashkey = vm.data.ohashkey;
|
|
160
|
+
vm.data.hashiv = vm.data.ohashiv;
|
|
161
|
+
}
|
|
162
|
+
gvc.notifyDataChange(id);
|
|
163
|
+
},
|
|
164
|
+
}),
|
|
165
|
+
BgWidget.editeInput({
|
|
166
|
+
gvc: gvc,
|
|
167
|
+
title: '商店代號',
|
|
168
|
+
default: vm.data.merchNO ?? '',
|
|
169
|
+
type: 'text',
|
|
170
|
+
placeHolder: '請輸入商店代號',
|
|
171
|
+
callback: text => {
|
|
172
|
+
vm.data.merchNO = text;
|
|
173
|
+
},
|
|
174
|
+
}),
|
|
175
|
+
BgWidget.editeInput({
|
|
176
|
+
gvc: gvc,
|
|
177
|
+
title: 'HashKey',
|
|
178
|
+
default: vm.data.hashkey ?? '',
|
|
179
|
+
type: 'text',
|
|
180
|
+
placeHolder: '請輸入HashKey',
|
|
181
|
+
callback: text => {
|
|
182
|
+
vm.data.hashkey = text;
|
|
183
|
+
if (vm.data.point == 'beta') {
|
|
184
|
+
vm.data.bhashkey = text;
|
|
185
|
+
} else {
|
|
186
|
+
vm.data.ohashkey = text;
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
}),
|
|
190
|
+
BgWidget.editeInput({
|
|
191
|
+
gvc: gvc,
|
|
192
|
+
title: 'HashIV',
|
|
193
|
+
default: vm.data.hashiv ?? '',
|
|
194
|
+
type: 'text',
|
|
195
|
+
placeHolder: '請輸入HashIV',
|
|
196
|
+
callback: text => {
|
|
197
|
+
vm.data.hashiv = text;
|
|
198
|
+
if (vm.data.point == 'beta') {
|
|
199
|
+
vm.data.bhashiv = text;
|
|
200
|
+
} else {
|
|
201
|
+
vm.data.ohashiv = text;
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
}),
|
|
205
|
+
].join(html` <div style="height: 12px;"></div>`);
|
|
206
|
+
}
|
|
207
|
+
})()}
|
|
208
|
+
</div>
|
|
209
|
+
</div>`,
|
|
210
|
+
].join('')}
|
|
211
|
+
</div>`;
|
|
212
|
+
})
|
|
213
|
+
.join('')}
|
|
214
|
+
</div>
|
|
215
|
+
`;
|
|
216
|
+
},
|
|
217
|
+
divCreate: {
|
|
218
|
+
style: ``,
|
|
219
|
+
class: `w-100`,
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
})
|
|
223
|
+
);
|
|
224
|
+
});
|
|
225
|
+
},
|
|
226
|
+
divCreate: {
|
|
227
|
+
class: 'd-flex flex-column flex-column-reverse flex-md-row px-0',
|
|
228
|
+
style: 'gap:10px;',
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
})
|
|
232
|
+
),
|
|
233
|
+
BgWidget.mbContainer(240),
|
|
234
|
+
html` <div class="update-bar-container">
|
|
235
|
+
${BgWidget.save(
|
|
236
|
+
gvc.event(() => {
|
|
237
|
+
save(() => {
|
|
238
|
+
dialog.successMessage({ text: '設定成功' });
|
|
239
|
+
});
|
|
240
|
+
})
|
|
241
|
+
)}
|
|
242
|
+
</div>`,
|
|
243
|
+
].join('')
|
|
244
|
+
)}
|
|
245
|
+
`);
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
}
|
|
239
249
|
}
|
|
240
250
|
(window as any).glitter.setModule(import.meta.url, PosCheckoutSetting);
|
|
@@ -246,8 +246,8 @@ ${BgWidget.customButton({
|
|
|
246
246
|
title: '卡片比例',
|
|
247
247
|
default: vm.data.prdouct_card_layout,
|
|
248
248
|
placeHolder: '請輸入卡片比例,範例: 16:9',
|
|
249
|
-
callback:
|
|
250
|
-
if (text.split(':').map(
|
|
249
|
+
callback: text => {
|
|
250
|
+
if (text.split(':').map(dd => {
|
|
251
251
|
return Number.isFinite(Number(dd));
|
|
252
252
|
}).length === 2) {
|
|
253
253
|
vm.data.prdouct_card_layout = text;
|
|
@@ -383,27 +383,29 @@ ${BgWidget.customButton({
|
|
|
383
383
|
return ShoppingFinanceSetting.main(gvc, true);
|
|
384
384
|
},
|
|
385
385
|
};
|
|
386
|
-
return
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
386
|
+
return [
|
|
387
|
+
html `<div class="title-container">${BgWidget.title('全站設定')}</div>`,
|
|
388
|
+
BgWidget.tab([
|
|
389
|
+
{ title: '功能管理', key: 'function' },
|
|
390
|
+
{ title: '金流設定', key: 'finance' },
|
|
391
|
+
], gvc, vm.type, text => {
|
|
392
|
+
vm.type = text;
|
|
393
|
+
}, vm.type === 'finance' ? 'margin-bottom: 0 !important;' : ''),
|
|
394
|
+
typeMap[vm.type] ? typeMap[vm.type]() : '',
|
|
395
|
+
BgWidget.mbContainer(300),
|
|
396
|
+
vm.type === 'finance'
|
|
397
|
+
? ''
|
|
398
|
+
: html `<div class="update-bar-container">
|
|
399
|
+
${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
400
|
+
dialog.dataLoading({ visible: true });
|
|
401
|
+
yield vm.save_info();
|
|
402
|
+
yield Promise.all(PosConfigSetting.saveArray.map(dd => dd()));
|
|
403
|
+
PosConfigSetting.saveArray = [];
|
|
404
|
+
dialog.dataLoading({ visible: false });
|
|
405
|
+
dialog.successMessage({ text: '儲存成功' });
|
|
406
|
+
})), '儲存', 'guide3-5')}
|
|
407
|
+
</div>`,
|
|
408
|
+
].join('');
|
|
407
409
|
},
|
|
408
410
|
divCreate: {
|
|
409
411
|
style: 'color: #393939; font-size: 14px;',
|