ts-glitter 21.2.7 → 21.2.9
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-widget.js +3 -0
- package/lowcode/backend-manager/bg-widget.ts +4 -0
- package/lowcode/cms-plugin/POS-setting.js +14 -1
- package/lowcode/cms-plugin/POS-setting.ts +15 -1
- package/lowcode/cms-plugin/pos-pages/credit-card.js +103 -0
- package/lowcode/cms-plugin/pos-pages/credit-card.ts +114 -0
- package/lowcode/cms-plugin/pos-pages/payment-function.js +8 -6
- package/lowcode/cms-plugin/pos-pages/payment-function.ts +13 -12
- package/lowcode/cms-plugin/pos-pages/payment-page.js +8 -3
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +8 -3
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +1 -1
- package/lowcode/cms-plugin/shopping-finance-setting.js +11 -8
- package/lowcode/cms-plugin/shopping-finance-setting.ts +11 -8
- package/lowcode/cms-plugin/shopping-invoice-manager.js +8 -2
- package/lowcode/cms-plugin/shopping-invoice-manager.ts +11 -10
- package/lowcode/cms-plugin/shopping-order-manager.js +38 -30
- package/lowcode/cms-plugin/shopping-order-manager.ts +40 -29
- package/lowcode/index.html +1 -0
- package/package.json +1 -1
- package/src/api-public/controllers/shop.js +4 -4
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +1 -3
- package/src/api-public/services/checkout-event.js +14 -20
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +12 -7
- package/src/api-public/services/financial-service.js +1 -1
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +0 -1
package/lowcode/Entry.js
CHANGED
|
@@ -146,7 +146,7 @@ export class Entry {
|
|
|
146
146
|
}
|
|
147
147
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
148
148
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
149
|
-
glitter.share.editerVersion = 'V_21.2.
|
|
149
|
+
glitter.share.editerVersion = 'V_21.2.9';
|
|
150
150
|
glitter.share.start = new Date();
|
|
151
151
|
const vm = { appConfig: [] };
|
|
152
152
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -150,7 +150,7 @@ export class Entry {
|
|
|
150
150
|
}
|
|
151
151
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
152
152
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
153
|
-
glitter.share.editerVersion = 'V_21.2.
|
|
153
|
+
glitter.share.editerVersion = 'V_21.2.9';
|
|
154
154
|
glitter.share.start = new Date();
|
|
155
155
|
const vm = { appConfig: [] };
|
|
156
156
|
(window as any).saasConfig = {
|
|
@@ -765,6 +765,9 @@ export class BgWidget {
|
|
|
765
765
|
obj.default = e.value;
|
|
766
766
|
obj.oninput && obj.oninput(e.value);
|
|
767
767
|
})}"
|
|
768
|
+
onclick="${obj.gvc.event((e) => {
|
|
769
|
+
obj.onclick && obj.onclick(e);
|
|
770
|
+
})}"
|
|
768
771
|
value="${((_e = obj.default) !== null && _e !== void 0 ? _e : '').replace(/"/g, '"')}"
|
|
769
772
|
${obj.readonly ? `readonly` : ``}
|
|
770
773
|
/>
|
|
@@ -919,6 +919,7 @@ export class BgWidget {
|
|
|
919
919
|
startText?: string;
|
|
920
920
|
endText?: string;
|
|
921
921
|
oninput?: (text: string) => void;
|
|
922
|
+
onclick?: (e: Event) => void;
|
|
922
923
|
global_language?: boolean;
|
|
923
924
|
}) {
|
|
924
925
|
obj.title = obj.title ?? '';
|
|
@@ -976,6 +977,9 @@ export class BgWidget {
|
|
|
976
977
|
obj.default = e.value;
|
|
977
978
|
obj.oninput && obj.oninput(e.value);
|
|
978
979
|
})}"
|
|
980
|
+
onclick="${obj.gvc.event((e)=>{
|
|
981
|
+
obj.onclick && obj.onclick(e)
|
|
982
|
+
})}"
|
|
979
983
|
value="${(obj.default ?? '').replace(/"/g, '"')}"
|
|
980
984
|
${obj.readonly ? `readonly` : ``}
|
|
981
985
|
/>
|
|
@@ -29,6 +29,7 @@ import { ApiPos } from '../glitter-base/route/pos.js';
|
|
|
29
29
|
import { PosWidget } from './pos-widget.js';
|
|
30
30
|
import { SaasOffer } from '../saas-offer.js';
|
|
31
31
|
import { Language } from '../glitter-base/global/language.js';
|
|
32
|
+
import { CreditCard } from './pos-pages/credit-card.js';
|
|
32
33
|
const html = String.raw;
|
|
33
34
|
export class POSSetting {
|
|
34
35
|
static loginManager(gvc, mode, result) {
|
|
@@ -1275,6 +1276,18 @@ export class POSSetting {
|
|
|
1275
1276
|
...[
|
|
1276
1277
|
...(PayConfig.deviceType === 'pos'
|
|
1277
1278
|
? [
|
|
1279
|
+
html `<a
|
|
1280
|
+
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
1281
|
+
style="gap:10px;"
|
|
1282
|
+
onclick="${gvc.event(() => {
|
|
1283
|
+
CreditCard.refundView(gvc);
|
|
1284
|
+
})}"
|
|
1285
|
+
><i
|
|
1286
|
+
class="fa-regular fa-credit-card d-flex align-items-center justify-content-center"
|
|
1287
|
+
style="width:20px;"
|
|
1288
|
+
></i
|
|
1289
|
+
>信用卡刷退</a
|
|
1290
|
+
>`,
|
|
1278
1291
|
html ` <a
|
|
1279
1292
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
1280
1293
|
style="gap:10px;"
|
|
@@ -1380,7 +1393,7 @@ export class POSSetting {
|
|
|
1380
1393
|
});
|
|
1381
1394
|
}
|
|
1382
1395
|
else if (vm.type === 'order') {
|
|
1383
|
-
return html ` <div class="vw-
|
|
1396
|
+
return html ` <div class="vw-50 px-lg-3" style="overflow-y: scroll;">
|
|
1384
1397
|
${ShoppingOrderManager.main(gvc, { isPOS: true })}
|
|
1385
1398
|
</div>`;
|
|
1386
1399
|
}
|
|
@@ -21,6 +21,7 @@ import { ApiPos } from '../glitter-base/route/pos.js';
|
|
|
21
21
|
import { PosWidget } from './pos-widget.js';
|
|
22
22
|
import { SaasOffer } from '../saas-offer.js';
|
|
23
23
|
import { Language } from '../glitter-base/global/language.js';
|
|
24
|
+
import { CreditCard } from './pos-pages/credit-card.js';
|
|
24
25
|
|
|
25
26
|
const html = String.raw;
|
|
26
27
|
|
|
@@ -1388,8 +1389,21 @@ export class POSSetting {
|
|
|
1388
1389
|
<div class="dropdown-menu position-absolute" style="top:50px; right: 0;">
|
|
1389
1390
|
${[
|
|
1390
1391
|
...[
|
|
1392
|
+
|
|
1391
1393
|
...(PayConfig.deviceType === 'pos'
|
|
1392
1394
|
? [
|
|
1395
|
+
html`<a
|
|
1396
|
+
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
1397
|
+
style="gap:10px;"
|
|
1398
|
+
onclick="${gvc.event(() => {
|
|
1399
|
+
CreditCard.refundView(gvc)
|
|
1400
|
+
})}"
|
|
1401
|
+
><i
|
|
1402
|
+
class="fa-regular fa-credit-card d-flex align-items-center justify-content-center"
|
|
1403
|
+
style="width:20px;"
|
|
1404
|
+
></i
|
|
1405
|
+
>信用卡刷退</a
|
|
1406
|
+
>`,
|
|
1393
1407
|
html` <a
|
|
1394
1408
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
1395
1409
|
style="gap:10px;"
|
|
@@ -1500,7 +1514,7 @@ export class POSSetting {
|
|
|
1500
1514
|
vm: vm,
|
|
1501
1515
|
});
|
|
1502
1516
|
} else if (vm.type === 'order') {
|
|
1503
|
-
return html` <div class="vw-
|
|
1517
|
+
return html` <div class="vw-50 px-lg-3" style="overflow-y: scroll;">
|
|
1504
1518
|
${ShoppingOrderManager.main(gvc, { isPOS: true })}
|
|
1505
1519
|
</div>`;
|
|
1506
1520
|
} else if (vm.type === 'member') {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
11
|
+
import { ShareDialog } from '../../glitterBundle/dialog/ShareDialog.js';
|
|
12
|
+
import { PosFunction } from './pos-function.js';
|
|
13
|
+
const html = String.raw;
|
|
14
|
+
export class CreditCard {
|
|
15
|
+
static refundView(gvc) {
|
|
16
|
+
const vm = {
|
|
17
|
+
orderID: '',
|
|
18
|
+
transactionID: '',
|
|
19
|
+
refund: '',
|
|
20
|
+
};
|
|
21
|
+
BgWidget.settingDialog({
|
|
22
|
+
gvc: gvc,
|
|
23
|
+
title: '信用卡刷退',
|
|
24
|
+
innerHTML: (gvc) => {
|
|
25
|
+
return `<div>${[
|
|
26
|
+
BgWidget.editeInput({
|
|
27
|
+
title: '訂單編號',
|
|
28
|
+
gvc: gvc,
|
|
29
|
+
style: `background:white;`,
|
|
30
|
+
default: vm.orderID,
|
|
31
|
+
placeHolder: '請輸入訂單編號',
|
|
32
|
+
callback: text => {
|
|
33
|
+
},
|
|
34
|
+
onclick: () => {
|
|
35
|
+
PosFunction.setMoney(gvc, vm.orderID, money => {
|
|
36
|
+
vm.orderID = `${money}`;
|
|
37
|
+
gvc.recreateView();
|
|
38
|
+
}, '退款金額');
|
|
39
|
+
},
|
|
40
|
+
readonly: true
|
|
41
|
+
}),
|
|
42
|
+
BgWidget.editeInput({
|
|
43
|
+
title: '金流編號',
|
|
44
|
+
gvc: gvc,
|
|
45
|
+
style: `background:white;`,
|
|
46
|
+
default: vm.transactionID,
|
|
47
|
+
placeHolder: '請輸入金流編號',
|
|
48
|
+
callback: text => {
|
|
49
|
+
},
|
|
50
|
+
onclick: () => {
|
|
51
|
+
PosFunction.setMoney(gvc, vm.transactionID, money => {
|
|
52
|
+
vm.transactionID = `${money}`;
|
|
53
|
+
gvc.recreateView();
|
|
54
|
+
}, '金流編號');
|
|
55
|
+
},
|
|
56
|
+
readonly: true
|
|
57
|
+
}),
|
|
58
|
+
BgWidget.editeInput({
|
|
59
|
+
title: '退款金額',
|
|
60
|
+
gvc: gvc,
|
|
61
|
+
style: `background:white;`,
|
|
62
|
+
default: `${vm.refund}`,
|
|
63
|
+
placeHolder: '請輸入退款金額',
|
|
64
|
+
callback: text => {
|
|
65
|
+
},
|
|
66
|
+
onclick: () => {
|
|
67
|
+
PosFunction.setMoney(gvc, vm.refund, money => {
|
|
68
|
+
vm.refund = `${money}`;
|
|
69
|
+
gvc.recreateView();
|
|
70
|
+
}, '退款金額');
|
|
71
|
+
},
|
|
72
|
+
readonly: true
|
|
73
|
+
})
|
|
74
|
+
].join('')}</div>`;
|
|
75
|
+
},
|
|
76
|
+
footer_html: gvc => {
|
|
77
|
+
return [
|
|
78
|
+
BgWidget.save(gvc.event(() => {
|
|
79
|
+
gvc.glitter.runJsInterFace('toCreditCardHistory', {}, () => { });
|
|
80
|
+
}), '查詢刷卡紀錄'),
|
|
81
|
+
BgWidget.danger(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
83
|
+
dialog.dataLoading({
|
|
84
|
+
visible: true,
|
|
85
|
+
});
|
|
86
|
+
const saasConfig = window.parent.saasConfig;
|
|
87
|
+
gvc.glitter.runJsInterFace('CreditCardRefund', {
|
|
88
|
+
order_id: vm.orderID,
|
|
89
|
+
transaction_id: vm.transactionID,
|
|
90
|
+
amount: `${vm.refund}`,
|
|
91
|
+
pwd: (yield saasConfig.api.getPrivateConfig(saasConfig.config.appName, 'glitter_finance')).response.result[0]['value'].ut_credit_card.pwd
|
|
92
|
+
}, () => {
|
|
93
|
+
dialog.dataLoading({
|
|
94
|
+
visible: false,
|
|
95
|
+
});
|
|
96
|
+
gvc.closeDialog();
|
|
97
|
+
});
|
|
98
|
+
})), '退刷'),
|
|
99
|
+
].join('');
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { GVC } from '../../glitterBundle/GVController.js';
|
|
2
|
+
import { BgWidget } from '../../backend-manager/bg-widget.js';
|
|
3
|
+
import { ShareDialog } from '../../glitterBundle/dialog/ShareDialog.js';
|
|
4
|
+
import { PosFunction } from './pos-function.js';
|
|
5
|
+
|
|
6
|
+
const html = String.raw;
|
|
7
|
+
|
|
8
|
+
export class CreditCard {
|
|
9
|
+
public static refundView(gvc: GVC) {
|
|
10
|
+
const vm = {
|
|
11
|
+
orderID: '',
|
|
12
|
+
transactionID: '',
|
|
13
|
+
refund: '',
|
|
14
|
+
};
|
|
15
|
+
BgWidget.settingDialog({
|
|
16
|
+
gvc: gvc,
|
|
17
|
+
title: '信用卡刷退',
|
|
18
|
+
innerHTML: (gvc) => {
|
|
19
|
+
return `<div>${[
|
|
20
|
+
BgWidget.editeInput({
|
|
21
|
+
title: '訂單編號',
|
|
22
|
+
gvc: gvc,
|
|
23
|
+
style:`background:white;`,
|
|
24
|
+
default: vm.orderID,
|
|
25
|
+
placeHolder: '請輸入訂單編號',
|
|
26
|
+
callback: text => {
|
|
27
|
+
},
|
|
28
|
+
onclick:()=>{
|
|
29
|
+
PosFunction.setMoney(gvc,vm.orderID , money => {
|
|
30
|
+
vm.orderID = `${money}`;
|
|
31
|
+
gvc.recreateView();
|
|
32
|
+
},'退款金額');
|
|
33
|
+
},
|
|
34
|
+
readonly:true
|
|
35
|
+
}),
|
|
36
|
+
BgWidget.editeInput({
|
|
37
|
+
title: '金流編號',
|
|
38
|
+
gvc: gvc,
|
|
39
|
+
style:`background:white;`,
|
|
40
|
+
default: vm.transactionID,
|
|
41
|
+
placeHolder: '請輸入金流編號',
|
|
42
|
+
callback: text => {
|
|
43
|
+
|
|
44
|
+
},
|
|
45
|
+
onclick:()=>{
|
|
46
|
+
PosFunction.setMoney(gvc, vm.transactionID, money => {
|
|
47
|
+
vm.transactionID = `${money}`;
|
|
48
|
+
gvc.recreateView();
|
|
49
|
+
},'金流編號');
|
|
50
|
+
},
|
|
51
|
+
readonly:true
|
|
52
|
+
}),
|
|
53
|
+
BgWidget.editeInput({
|
|
54
|
+
title: '退款金額',
|
|
55
|
+
gvc: gvc,
|
|
56
|
+
style:`background:white;`,
|
|
57
|
+
default: `${vm.refund}`,
|
|
58
|
+
placeHolder: '請輸入退款金額',
|
|
59
|
+
callback: text => {
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
onclick:()=>{
|
|
63
|
+
PosFunction.setMoney(gvc, vm.refund, money => {
|
|
64
|
+
vm.refund = `${money}`;
|
|
65
|
+
gvc.recreateView();
|
|
66
|
+
},'退款金額');
|
|
67
|
+
},
|
|
68
|
+
readonly:true
|
|
69
|
+
})
|
|
70
|
+
].join('')}</div>`;
|
|
71
|
+
},
|
|
72
|
+
footer_html: gvc => {
|
|
73
|
+
|
|
74
|
+
return [
|
|
75
|
+
BgWidget.save(
|
|
76
|
+
gvc.event(() => {
|
|
77
|
+
gvc.glitter.runJsInterFace('toCreditCardHistory', {}, () => {});
|
|
78
|
+
}),
|
|
79
|
+
'查詢刷卡紀錄'
|
|
80
|
+
),
|
|
81
|
+
BgWidget.danger(
|
|
82
|
+
gvc.event(async () => {
|
|
83
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
84
|
+
dialog.dataLoading({
|
|
85
|
+
visible: true,
|
|
86
|
+
});
|
|
87
|
+
const saasConfig: {
|
|
88
|
+
config: any;
|
|
89
|
+
api: any;
|
|
90
|
+
} = (window as any).parent.saasConfig;
|
|
91
|
+
gvc.glitter.runJsInterFace(
|
|
92
|
+
'CreditCardRefund',
|
|
93
|
+
{
|
|
94
|
+
order_id: vm.orderID,
|
|
95
|
+
transaction_id: vm.transactionID,
|
|
96
|
+
amount:`${vm.refund}`,
|
|
97
|
+
pwd:(await saasConfig.api.getPrivateConfig(saasConfig.config.appName, 'glitter_finance')).response.result[0]['value'].ut_credit_card.pwd
|
|
98
|
+
},
|
|
99
|
+
() => {
|
|
100
|
+
|
|
101
|
+
dialog.dataLoading({
|
|
102
|
+
visible: false,
|
|
103
|
+
});
|
|
104
|
+
gvc.closeDialog()
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}),
|
|
108
|
+
'退刷'
|
|
109
|
+
),
|
|
110
|
+
].join('');
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -110,27 +110,29 @@ export class PaymentFunction {
|
|
|
110
110
|
orderID: orderDetail.orderID,
|
|
111
111
|
pwd: pwd,
|
|
112
112
|
}, (res) => {
|
|
113
|
-
|
|
113
|
+
var _a;
|
|
114
|
+
const response = JSON.parse(res.result.data);
|
|
115
|
+
if (response.code === "250") {
|
|
114
116
|
gvc.closeDialog();
|
|
115
117
|
callback(true);
|
|
116
118
|
}
|
|
117
119
|
else {
|
|
118
120
|
gvc.closeDialog();
|
|
119
|
-
|
|
120
|
-
dialog.errorMessage({ text: '交易失敗' });
|
|
121
|
+
dialog.errorMessage({ text: `交易失敗,失敗原因:${(_a = response.msg) !== null && _a !== void 0 ? _a : ''}` });
|
|
121
122
|
}
|
|
122
123
|
});
|
|
123
124
|
}
|
|
124
125
|
else if (ConnectionMode.on_connected_device) {
|
|
125
126
|
gvc.glitter.share.credit_card_callback = (res) => {
|
|
126
|
-
|
|
127
|
+
var _a;
|
|
128
|
+
const response = JSON.parse(res.result.data);
|
|
129
|
+
if (response.code === "250") {
|
|
127
130
|
gvc.closeDialog();
|
|
128
131
|
callback(true);
|
|
129
132
|
}
|
|
130
133
|
else {
|
|
131
134
|
gvc.closeDialog();
|
|
132
|
-
|
|
133
|
-
dialog.errorMessage({ text: '交易失敗' });
|
|
135
|
+
dialog.errorMessage({ text: `交易失敗,失敗原因:${(_a = response.msg) !== null && _a !== void 0 ? _a : ''}` });
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
138
|
ConnectionMode.sendCommand({
|
|
@@ -116,32 +116,33 @@ export class PaymentFunction {
|
|
|
116
116
|
pwd: pwd,
|
|
117
117
|
},
|
|
118
118
|
(res: any) => {
|
|
119
|
-
|
|
119
|
+
const response=JSON.parse(res.result.data);
|
|
120
|
+
if (response.code === "250" ) {
|
|
120
121
|
gvc.closeDialog();
|
|
121
122
|
callback(true);
|
|
122
123
|
} else {
|
|
123
124
|
gvc.closeDialog();
|
|
124
|
-
callback(false);
|
|
125
|
-
dialog.errorMessage({ text: '
|
|
125
|
+
// callback(false);
|
|
126
|
+
dialog.errorMessage({ text: `交易失敗,失敗原因:${response.msg ?? ''}` });
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
);
|
|
129
130
|
} else if (ConnectionMode.on_connected_device) {
|
|
130
131
|
gvc.glitter.share.credit_card_callback = (res: any) => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
const response=JSON.parse(res.result.data);
|
|
133
|
+
if (response.code === "250" ) {
|
|
134
|
+
gvc.closeDialog();
|
|
135
|
+
callback(true);
|
|
136
|
+
} else {
|
|
137
|
+
gvc.closeDialog();
|
|
138
|
+
dialog.errorMessage({ text: `交易失敗,失敗原因:${response.msg ?? ''}` });
|
|
139
|
+
}
|
|
139
140
|
};
|
|
140
141
|
ConnectionMode.sendCommand({
|
|
141
142
|
cmd: 'credit_card',
|
|
142
143
|
amount: `${total}`,
|
|
143
144
|
memo: `訂單ID:${orderDetail.orderID}`,
|
|
144
|
-
|
|
145
|
+
orderID:orderDetail.orderID,
|
|
145
146
|
pwd: pwd,
|
|
146
147
|
});
|
|
147
148
|
} else {
|
|
@@ -2197,11 +2197,16 @@ export class PaymentPage {
|
|
|
2197
2197
|
>
|
|
2198
2198
|
<input
|
|
2199
2199
|
class="form-control h-100"
|
|
2200
|
-
style="border: none;"
|
|
2200
|
+
style="border: none;background: white;"
|
|
2201
2201
|
placeholder="請輸入統一編號"
|
|
2202
|
-
|
|
2203
|
-
|
|
2202
|
+
value="${c_vm.value}"
|
|
2203
|
+
onclick="${gvc.event(() => {
|
|
2204
|
+
PosFunction.setMoney(gvc, c_vm.value || '0', (text) => {
|
|
2205
|
+
c_vm.value = `${text}`;
|
|
2206
|
+
gvc.recreateView();
|
|
2207
|
+
}, '統一編號');
|
|
2204
2208
|
})}"
|
|
2209
|
+
readonly
|
|
2205
2210
|
/>
|
|
2206
2211
|
<div class="flex-fill"></div>
|
|
2207
2212
|
<div
|
|
@@ -2390,11 +2390,16 @@ export class PaymentPage {
|
|
|
2390
2390
|
>
|
|
2391
2391
|
<input
|
|
2392
2392
|
class="form-control h-100"
|
|
2393
|
-
style="border: none;"
|
|
2393
|
+
style="border: none;background: white;"
|
|
2394
2394
|
placeholder="請輸入統一編號"
|
|
2395
|
-
|
|
2396
|
-
|
|
2395
|
+
value="${c_vm.value}"
|
|
2396
|
+
onclick="${gvc.event(() => {
|
|
2397
|
+
PosFunction.setMoney(gvc,c_vm.value || '0',(text)=>{
|
|
2398
|
+
c_vm.value=`${text}`
|
|
2399
|
+
gvc.recreateView()
|
|
2400
|
+
},'統一編號')
|
|
2397
2401
|
})}"
|
|
2402
|
+
readonly
|
|
2398
2403
|
/>
|
|
2399
2404
|
<div class="flex-fill"></div>
|
|
2400
2405
|
<div
|
|
@@ -476,7 +476,7 @@ export class PosFunction {
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
// SetMoney
|
|
479
|
-
public static setMoney(gvc: GVC, def: number, callback: (money: number) => void, title?: string) {
|
|
479
|
+
public static setMoney(gvc: GVC, def: string|number, callback: (money: number) => void, title?: string) {
|
|
480
480
|
gvc.glitter.innerDialog(gvc => {
|
|
481
481
|
const c_vm = {
|
|
482
482
|
id: gvc.glitter.getUUID(),
|
|
@@ -231,16 +231,17 @@ export class ShoppingFinanceSetting {
|
|
|
231
231
|
.map(dd => {
|
|
232
232
|
var _a;
|
|
233
233
|
keyData[dd.key] = (_a = keyData[dd.key]) !== null && _a !== void 0 ? _a : {};
|
|
234
|
-
return html ` <div class="col-12 col-
|
|
234
|
+
return html ` <div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
235
235
|
<div
|
|
236
236
|
class="w-100 position-relative main-card"
|
|
237
237
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
238
238
|
>
|
|
239
|
-
<div class="position-absolute fw-500" style="cursor:pointer;right:
|
|
239
|
+
<div class="position-absolute fw-500" style="cursor:pointer;right:0px;top:0px;">
|
|
240
240
|
${BgWidget.customButton({
|
|
241
241
|
button: {
|
|
242
242
|
color: 'gray',
|
|
243
243
|
size: 'sm',
|
|
244
|
+
style: `border-top-left-radius: 0px !important;border-bottom-right-radius: 0px !important;`
|
|
244
245
|
},
|
|
245
246
|
text: {
|
|
246
247
|
name: '金流設定',
|
|
@@ -620,19 +621,20 @@ export class ShoppingFinanceSetting {
|
|
|
620
621
|
<div class="row">
|
|
621
622
|
${offlinePayArray
|
|
622
623
|
.map((dd) => {
|
|
623
|
-
return html ` <div class="col-12 col-
|
|
624
|
+
return html ` <div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
624
625
|
<div
|
|
625
626
|
class="w-100 position-relative main-card"
|
|
626
627
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
627
628
|
>
|
|
628
629
|
<div
|
|
629
630
|
class="position-absolute fw-500 ${dd.hide_setting ? `d-none` : ``}"
|
|
630
|
-
style="cursor:pointer;right:
|
|
631
|
+
style="cursor:pointer;right:0px;top:0px;"
|
|
631
632
|
>
|
|
632
633
|
${BgWidget.customButton({
|
|
633
634
|
button: {
|
|
634
635
|
color: 'gray',
|
|
635
636
|
size: 'sm',
|
|
637
|
+
style: `border-top-left-radius: 0px !important;border-bottom-right-radius: 0px !important;`
|
|
636
638
|
},
|
|
637
639
|
text: {
|
|
638
640
|
name: '金流設定',
|
|
@@ -711,7 +713,7 @@ export class ShoppingFinanceSetting {
|
|
|
711
713
|
})
|
|
712
714
|
.join('')}
|
|
713
715
|
<div
|
|
714
|
-
class="col-12 col-
|
|
716
|
+
class="col-12 col-xl-3 col-md-4 p-0 p-md-2"
|
|
715
717
|
style="cursor: pointer;"
|
|
716
718
|
onclick="${gvc.event(() => {
|
|
717
719
|
updateCustomFinance({ function: 'plus' });
|
|
@@ -740,16 +742,17 @@ export class ShoppingFinanceSetting {
|
|
|
740
742
|
${PaymentConfig.onlinePay
|
|
741
743
|
.filter(item => item.type === 'pos')
|
|
742
744
|
.map(dd => {
|
|
743
|
-
return html ` <div class="col-12 col-
|
|
745
|
+
return html ` <div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
744
746
|
<div
|
|
745
747
|
class="w-100 position-relative main-card"
|
|
746
748
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
747
749
|
>
|
|
748
|
-
<div class="position-absolute fw-500" style="cursor:pointer;right:
|
|
750
|
+
<div class="position-absolute fw-500" style="cursor:pointer;right:0px;top:0px;">
|
|
749
751
|
${BgWidget.customButton({
|
|
750
752
|
button: {
|
|
751
753
|
color: 'gray',
|
|
752
754
|
size: 'sm',
|
|
755
|
+
style: `border-top-left-radius: 0px !important;border-bottom-right-radius: 0px !important;`
|
|
753
756
|
},
|
|
754
757
|
text: {
|
|
755
758
|
name: '金流設定',
|
|
@@ -2232,7 +2235,7 @@ export class ShoppingFinanceSetting {
|
|
|
2232
2235
|
]
|
|
2233
2236
|
.map(dd => {
|
|
2234
2237
|
return html `
|
|
2235
|
-
<div class="col-12 col-
|
|
2238
|
+
<div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
2236
2239
|
<div
|
|
2237
2240
|
class="w-100 position-relative main-card"
|
|
2238
2241
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
@@ -277,16 +277,17 @@ export class ShoppingFinanceSetting {
|
|
|
277
277
|
.filter(item => item.type !== 'pos')
|
|
278
278
|
.map(dd => {
|
|
279
279
|
keyData[dd.key] = keyData[dd.key] ?? {};
|
|
280
|
-
return html` <div class="col-12 col-
|
|
280
|
+
return html` <div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
281
281
|
<div
|
|
282
282
|
class="w-100 position-relative main-card"
|
|
283
283
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
284
284
|
>
|
|
285
|
-
<div class="position-absolute fw-500" style="cursor:pointer;right:
|
|
285
|
+
<div class="position-absolute fw-500" style="cursor:pointer;right:0px;top:0px;">
|
|
286
286
|
${BgWidget.customButton({
|
|
287
287
|
button: {
|
|
288
288
|
color: 'gray',
|
|
289
289
|
size: 'sm',
|
|
290
|
+
style:`border-top-left-radius: 0px !important;border-bottom-right-radius: 0px !important;`
|
|
290
291
|
},
|
|
291
292
|
text: {
|
|
292
293
|
name: '金流設定',
|
|
@@ -682,19 +683,20 @@ export class ShoppingFinanceSetting {
|
|
|
682
683
|
<div class="row">
|
|
683
684
|
${offlinePayArray
|
|
684
685
|
.map((dd: any) => {
|
|
685
|
-
return html` <div class="col-12 col-
|
|
686
|
+
return html` <div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
686
687
|
<div
|
|
687
688
|
class="w-100 position-relative main-card"
|
|
688
689
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
689
690
|
>
|
|
690
691
|
<div
|
|
691
692
|
class="position-absolute fw-500 ${dd.hide_setting ? `d-none` : ``}"
|
|
692
|
-
style="cursor:pointer;right:
|
|
693
|
+
style="cursor:pointer;right:0px;top:0px;"
|
|
693
694
|
>
|
|
694
695
|
${BgWidget.customButton({
|
|
695
696
|
button: {
|
|
696
697
|
color: 'gray',
|
|
697
698
|
size: 'sm',
|
|
699
|
+
style:`border-top-left-radius: 0px !important;border-bottom-right-radius: 0px !important;`
|
|
698
700
|
},
|
|
699
701
|
text: {
|
|
700
702
|
name: '金流設定',
|
|
@@ -780,7 +782,7 @@ export class ShoppingFinanceSetting {
|
|
|
780
782
|
})
|
|
781
783
|
.join('')}
|
|
782
784
|
<div
|
|
783
|
-
class="col-12 col-
|
|
785
|
+
class="col-12 col-xl-3 col-md-4 p-0 p-md-2"
|
|
784
786
|
style="cursor: pointer;"
|
|
785
787
|
onclick="${gvc.event(() => {
|
|
786
788
|
updateCustomFinance({ function: 'plus' });
|
|
@@ -811,16 +813,17 @@ export class ShoppingFinanceSetting {
|
|
|
811
813
|
${PaymentConfig.onlinePay
|
|
812
814
|
.filter(item => item.type === 'pos')
|
|
813
815
|
.map(dd => {
|
|
814
|
-
return html` <div class="col-12 col-
|
|
816
|
+
return html` <div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
815
817
|
<div
|
|
816
818
|
class="w-100 position-relative main-card"
|
|
817
819
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|
|
818
820
|
>
|
|
819
|
-
<div class="position-absolute fw-500" style="cursor:pointer;right:
|
|
821
|
+
<div class="position-absolute fw-500" style="cursor:pointer;right:0px;top:0px;">
|
|
820
822
|
${BgWidget.customButton({
|
|
821
823
|
button: {
|
|
822
824
|
color: 'gray',
|
|
823
825
|
size: 'sm',
|
|
826
|
+
style:`border-top-left-radius: 0px !important;border-bottom-right-radius: 0px !important;`
|
|
824
827
|
},
|
|
825
828
|
text: {
|
|
826
829
|
name: '金流設定',
|
|
@@ -2506,7 +2509,7 @@ export class ShoppingFinanceSetting {
|
|
|
2506
2509
|
]
|
|
2507
2510
|
.map(dd => {
|
|
2508
2511
|
return html`
|
|
2509
|
-
<div class="col-12 col-
|
|
2512
|
+
<div class="col-12 col-xl-3 col-md-4 p-0 p-md-2">
|
|
2510
2513
|
<div
|
|
2511
2514
|
class="w-100 position-relative main-card"
|
|
2512
2515
|
style="padding: 24px 32px; background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: inline-flex;"
|