@pisell/private-materials 3.0.136 → 3.0.138
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/forms/single/index.js +3 -0
- package/es/components/eftpos/const.d.ts +26 -0
- package/es/components/eftpos/const.js +40 -8
- package/es/components/eftpos/device.d.ts +3 -2
- package/es/components/eftpos/device.js +6 -5
- package/es/components/eftpos/form/index.d.ts +5 -0
- package/es/components/eftpos/form/index.js +8 -0
- package/es/components/eftpos/hooks.d.ts +34 -0
- package/es/components/{eftposPay/windcave/hook.js → eftpos/hooks.js} +96 -122
- package/es/components/eftpos/icon/apiKey.d.ts +5 -0
- package/es/components/eftpos/icon/apiKey.js +17 -0
- package/es/components/eftpos/icon/device.d.ts +5 -0
- package/es/components/eftpos/icon/device.js +19 -0
- package/es/components/eftpos/index.d.ts +10 -0
- package/es/components/eftpos/index.js +329 -46
- package/es/components/eftpos/index.less +38 -1
- package/es/components/eftpos/locales.d.ts +12 -0
- package/es/components/eftpos/locales.js +15 -3
- package/es/components/eftpos/log.d.ts +8 -0
- package/es/components/eftpos/log.js +85 -0
- package/es/components/eftpos/pos.d.ts +1 -1
- package/es/components/eftpos/pos.js +8 -5
- package/es/components/eftpos/surcharge/index.d.ts +25 -2
- package/es/components/eftpos/surcharge/index.js +100 -16
- package/es/components/eftpos/table.d.ts +4 -0
- package/es/components/eftpos/table.js +102 -10
- package/es/components/eftposPay/amount.d.ts +7 -1
- package/es/components/eftposPay/amount.js +65 -38
- package/es/components/eftposPay/component/fail/failCustom.js +65 -20
- package/es/components/eftposPay/component/fail/index.js +60 -30
- package/es/components/eftposPay/component/fail/network.d.ts +5 -0
- package/es/components/eftposPay/component/fail/network.js +13 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +6 -0
- package/es/components/eftposPay/component/fail/unknow.js +18 -3
- package/es/components/eftposPay/component/header/index.d.ts +2 -1
- package/es/components/eftposPay/component/header/index.js +4 -1
- package/es/components/eftposPay/component/header/index.less +1 -10
- package/es/components/eftposPay/component/manual/index.d.ts +6 -1
- package/es/components/eftposPay/component/manual/index.js +174 -23
- package/es/components/eftposPay/component/manual/index.less +42 -14
- package/es/components/eftposPay/component/signature/index.d.ts +5 -0
- package/es/components/eftposPay/component/signature/index.js +20 -2
- package/es/components/eftposPay/component/step/index.d.ts +7 -7
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/const.d.ts +19 -4
- package/es/components/eftposPay/const.js +4 -2
- package/es/components/eftposPay/device.d.ts +7 -0
- package/es/components/eftposPay/device.js +22 -0
- package/es/components/eftposPay/helper.d.ts +54 -0
- package/es/components/eftposPay/helper.js +93 -1
- package/es/components/eftposPay/hooks.d.ts +30 -1
- package/es/components/eftposPay/hooks.js +181 -26
- package/es/components/eftposPay/index.d.ts +2 -4
- package/es/components/eftposPay/index.js +119 -31
- package/es/components/eftposPay/index.less +27 -19
- package/es/components/eftposPay/locales.d.ts +45 -0
- package/es/components/eftposPay/locales.js +348 -3
- package/es/components/eftposPay/manufacturer.d.ts +2 -2
- package/es/components/eftposPay/manufacturer.js +9 -10
- package/es/components/eftposPay/pay.d.ts +10 -1
- package/es/components/eftposPay/pay.js +112 -34
- package/es/components/eftposPay/payo/config.js +137 -270
- package/es/components/eftposPay/payo/const.d.ts +22 -2
- package/es/components/eftposPay/payo/const.js +83 -33
- package/es/components/eftposPay/payo/hooks.d.ts +5 -0
- package/es/components/eftposPay/payo/hooks.js +19 -2
- package/es/components/eftposPay/store/index.d.ts +154 -53
- package/es/components/eftposPay/store/index.js +112 -60
- package/es/components/eftposPay/tyro/const.d.ts +17 -0
- package/es/components/eftposPay/{eftpos → tyro}/const.js +71 -90
- package/es/components/eftposPay/tyro/hooks.d.ts +14 -0
- package/es/components/eftposPay/tyro/hooks.js +40 -0
- package/es/components/eftposPay/tyro/index.d.ts +9 -0
- package/es/components/eftposPay/tyro/index.js +575 -0
- package/es/components/eftposPay/windcave/const.d.ts +24 -9
- package/es/components/eftposPay/windcave/const.js +90 -81
- package/es/components/eftposPay/windcave/helper.d.ts +16 -2
- package/es/components/eftposPay/windcave/helper.js +175 -42
- package/es/components/eftposPay/windcave/receiptAction.d.ts +12 -0
- package/es/components/eftposPay/windcave/receiptAction.js +91 -43
- package/es/components/eftposPay/windcave/timer.d.ts +13 -1
- package/es/components/eftposPay/windcave/timer.js +18 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +2 -1
- package/es/components/eftposPay/windcave/windcave.js +155 -139
- package/es/utils/load.d.ts +11 -0
- package/es/utils/load.js +85 -0
- package/lib/components/booking/forms/single/index.js +1 -0
- package/lib/components/eftpos/const.d.ts +26 -0
- package/lib/components/eftpos/const.js +13 -1
- package/lib/components/eftpos/device.d.ts +3 -2
- package/lib/components/eftpos/device.js +2 -2
- package/lib/components/eftpos/form/index.d.ts +5 -0
- package/lib/components/eftpos/hooks.d.ts +34 -0
- package/lib/components/eftpos/hooks.js +106 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +5 -0
- package/lib/components/eftpos/icon/apiKey.js +57 -0
- package/lib/components/eftpos/icon/device.d.ts +5 -0
- package/lib/components/eftpos/icon/device.js +57 -0
- package/lib/components/eftpos/index.d.ts +10 -0
- package/lib/components/eftpos/index.js +262 -97
- package/lib/components/eftpos/index.less +38 -1
- package/lib/components/eftpos/locales.d.ts +12 -0
- package/lib/components/eftpos/locales.js +15 -3
- package/lib/components/eftpos/log.d.ts +8 -0
- package/lib/components/eftpos/log.js +87 -0
- package/lib/components/eftpos/pos.d.ts +1 -1
- package/lib/components/eftpos/pos.js +5 -4
- package/lib/components/eftpos/surcharge/index.d.ts +25 -2
- package/lib/components/eftpos/surcharge/index.js +36 -6
- package/lib/components/eftpos/table.d.ts +4 -0
- package/lib/components/eftpos/table.js +40 -8
- package/lib/components/eftposPay/amount.d.ts +7 -1
- package/lib/components/eftposPay/amount.js +10 -33
- package/lib/components/eftposPay/component/fail/failCustom.js +27 -6
- package/lib/components/eftposPay/component/fail/index.js +39 -18
- package/lib/components/eftposPay/component/fail/network.d.ts +5 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +6 -0
- package/lib/components/eftposPay/component/fail/unknow.js +3 -3
- package/lib/components/eftposPay/component/header/index.d.ts +2 -1
- package/lib/components/eftposPay/component/header/index.js +2 -1
- package/lib/components/eftposPay/component/header/index.less +1 -10
- package/lib/components/eftposPay/component/manual/index.d.ts +6 -1
- package/lib/components/eftposPay/component/manual/index.js +122 -31
- package/lib/components/eftposPay/component/manual/index.less +42 -14
- package/lib/components/eftposPay/component/signature/index.d.ts +5 -0
- package/lib/components/eftposPay/component/signature/index.js +2 -2
- package/lib/components/eftposPay/component/step/index.d.ts +7 -7
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/const.d.ts +19 -4
- package/lib/components/eftposPay/const.js +3 -1
- package/lib/components/eftposPay/device.d.ts +7 -0
- package/lib/components/eftposPay/helper.d.ts +54 -0
- package/lib/components/eftposPay/helper.js +64 -0
- package/lib/components/eftposPay/hooks.d.ts +30 -1
- package/lib/components/eftposPay/hooks.js +182 -44
- package/lib/components/eftposPay/index.d.ts +2 -4
- package/lib/components/eftposPay/index.js +74 -27
- package/lib/components/eftposPay/index.less +27 -19
- package/lib/components/eftposPay/locales.d.ts +45 -0
- package/lib/components/eftposPay/locales.js +352 -3
- package/lib/components/eftposPay/manufacturer.d.ts +2 -2
- package/lib/components/eftposPay/manufacturer.js +13 -13
- package/lib/components/eftposPay/pay.d.ts +10 -1
- package/lib/components/eftposPay/pay.js +86 -25
- package/lib/components/eftposPay/payo/config.js +121 -268
- package/lib/components/eftposPay/payo/const.d.ts +22 -2
- package/lib/components/eftposPay/payo/const.js +55 -36
- package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
- package/lib/components/eftposPay/payo/hooks.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +154 -53
- package/lib/components/eftposPay/store/index.js +7 -66
- package/lib/components/eftposPay/tyro/const.d.ts +17 -0
- package/lib/components/eftposPay/tyro/const.js +114 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +14 -0
- package/lib/components/eftposPay/{eftpos/index.js → tyro/hooks.js} +31 -36
- package/lib/components/eftposPay/tyro/index.d.ts +9 -0
- package/lib/components/eftposPay/tyro/index.js +558 -0
- package/lib/components/eftposPay/windcave/const.d.ts +24 -9
- package/lib/components/eftposPay/windcave/const.js +53 -104
- package/lib/components/eftposPay/windcave/helper.d.ts +16 -2
- package/lib/components/eftposPay/windcave/helper.js +163 -48
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +12 -0
- package/lib/components/eftposPay/windcave/receiptAction.js +15 -47
- package/lib/components/eftposPay/windcave/timer.d.ts +13 -1
- package/lib/components/eftposPay/windcave/timer.js +5 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +2 -1
- package/lib/components/eftposPay/windcave/windcave.js +130 -130
- package/lib/utils/load.d.ts +11 -0
- package/lib/utils/load.js +100 -0
- package/lowcode/eftpos/meta.ts +202 -160
- package/lowcode/eftpos-pay/meta.ts +45 -12
- package/package.json +4 -4
- package/es/components/eftposPay/eftpos/config.d.ts +0 -11
- package/es/components/eftposPay/eftpos/config.js +0 -178
- package/es/components/eftposPay/eftpos/const.d.ts +0 -10
- package/es/components/eftposPay/eftpos/index.d.ts +0 -7
- package/es/components/eftposPay/eftpos/index.js +0 -35
- package/es/components/eftposPay/windcave/action.d.ts +0 -8
- package/es/components/eftposPay/windcave/action.js +0 -104
- package/es/components/eftposPay/windcave/hook.d.ts +0 -14
- package/es/components/eftposPay/windcave/index.d.ts +0 -8
- package/es/components/eftposPay/windcave/index.js +0 -49
- package/es/components/eftposPay/windcave/pos.d.ts +0 -8
- package/es/components/eftposPay/windcave/pos.js +0 -180
- package/es/components/eftposPay/windcave/pwd.d.ts +0 -8
- package/es/components/eftposPay/windcave/pwd.js +0 -124
- package/es/components/eftposPay/windcave/receipet.d.ts +0 -6
- package/es/components/eftposPay/windcave/receipet.js +0 -67
- package/es/components/eftposPay/windcave/wait.d.ts +0 -12
- package/es/components/eftposPay/windcave/wait.js +0 -139
- package/lib/components/eftposPay/eftpos/config.d.ts +0 -11
- package/lib/components/eftposPay/eftpos/config.js +0 -199
- package/lib/components/eftposPay/eftpos/const.d.ts +0 -10
- package/lib/components/eftposPay/eftpos/const.js +0 -165
- package/lib/components/eftposPay/eftpos/index.d.ts +0 -7
- package/lib/components/eftposPay/windcave/action.d.ts +0 -8
- package/lib/components/eftposPay/windcave/action.js +0 -143
- package/lib/components/eftposPay/windcave/hook.d.ts +0 -14
- package/lib/components/eftposPay/windcave/hook.js +0 -139
- package/lib/components/eftposPay/windcave/index.d.ts +0 -8
- package/lib/components/eftposPay/windcave/index.js +0 -78
- package/lib/components/eftposPay/windcave/pos.d.ts +0 -8
- package/lib/components/eftposPay/windcave/pos.js +0 -197
- package/lib/components/eftposPay/windcave/pwd.d.ts +0 -8
- package/lib/components/eftposPay/windcave/pwd.js +0 -143
- package/lib/components/eftposPay/windcave/receipet.d.ts +0 -6
- package/lib/components/eftposPay/windcave/receipet.js +0 -93
- package/lib/components/eftposPay/windcave/wait.d.ts +0 -12
- package/lib/components/eftposPay/windcave/wait.js +0 -163
|
@@ -15,8 +15,16 @@ import { locales } from '@pisell/utils';
|
|
|
15
15
|
import { Button } from 'antd';
|
|
16
16
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import { StatusEnum } from "../const";
|
|
18
|
-
import { useContextData, useDispatch, updateState, updateCustom, updateStatus
|
|
18
|
+
import { useContextData, useDispatch, updateState, updateCustom, updateStatus } from "../store";
|
|
19
|
+
import { useStoreRef } from "../hooks";
|
|
19
20
|
import { StemTypeEnum, StepStatusEnum, getStepMapping } from "./const";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @title: 按钮操作区
|
|
24
|
+
* @description: 仅包含签名
|
|
25
|
+
* @Author: hongbing.wang
|
|
26
|
+
* @Date: 2024-08-20 12:33
|
|
27
|
+
*/
|
|
20
28
|
export var ReceiptAction = function ReceiptAction(_ref) {
|
|
21
29
|
var api = _ref.api,
|
|
22
30
|
onChange = _ref.onChange;
|
|
@@ -24,7 +32,8 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
24
32
|
var _useContextData = useContextData(),
|
|
25
33
|
custom = _useContextData.custom,
|
|
26
34
|
mode = _useContextData.mode;
|
|
27
|
-
var
|
|
35
|
+
var _useStoreRef = useStoreRef(),
|
|
36
|
+
numRef = _useStoreRef.numRef;
|
|
28
37
|
var listRef = useRef(custom === null || custom === void 0 ? void 0 : custom.list);
|
|
29
38
|
var _useState = useState((custom === null || custom === void 0 ? void 0 : custom.receiptLoading) || false),
|
|
30
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -42,15 +51,20 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
42
51
|
useEffect(function () {
|
|
43
52
|
listRef.current = custom === null || custom === void 0 ? void 0 : custom.list;
|
|
44
53
|
}, [custom === null || custom === void 0 ? void 0 : custom.list]);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @title: 确认签名
|
|
57
|
+
* @description: 确认签名 不阻碍-查询
|
|
58
|
+
* @return null
|
|
59
|
+
* @Author: hongbing.wang
|
|
60
|
+
* @Date: 2024-08-12 11:30
|
|
61
|
+
*/
|
|
48
62
|
var onAccept = function onAccept() {
|
|
49
63
|
// 确认签名
|
|
50
64
|
dispatch(updateStatus(StatusEnum.Loading));
|
|
51
65
|
dispatch(updateCustom({
|
|
52
66
|
list: listRef.current.map(function (item) {
|
|
53
|
-
return item.index ===
|
|
67
|
+
return item.index === StepStatusEnum.Receipt ? _objectSpread(_objectSpread({}, item), {}, {
|
|
54
68
|
status: 'resolve'
|
|
55
69
|
}) : item;
|
|
56
70
|
})
|
|
@@ -61,12 +75,12 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
61
75
|
setReceiptLoading(true);
|
|
62
76
|
api.update({
|
|
63
77
|
type: 'YES',
|
|
64
|
-
number:
|
|
78
|
+
number: numRef.current
|
|
65
79
|
}).then(function (res) {
|
|
66
80
|
if (unloadRef.current) {
|
|
67
81
|
return res;
|
|
68
82
|
}
|
|
69
|
-
if (res && (res.code ===
|
|
83
|
+
if (res && "".concat(res.code) === '200') {
|
|
70
84
|
setReceiptLoading(false);
|
|
71
85
|
var current = listRef.current.map(function (item) {
|
|
72
86
|
if (Number(item === null || item === void 0 ? void 0 : item.index) < StepStatusEnum.Wait) {
|
|
@@ -91,8 +105,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
91
105
|
}
|
|
92
106
|
dispatch(updateCustom({
|
|
93
107
|
step: StepStatusEnum.Wait,
|
|
94
|
-
list: current
|
|
95
|
-
isDeclineReceipt: false
|
|
108
|
+
list: current
|
|
96
109
|
}));
|
|
97
110
|
onChange(true);
|
|
98
111
|
return res;
|
|
@@ -107,8 +120,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
107
120
|
return item.index === StepStatusEnum.Receipt ? _objectSpread(_objectSpread({}, item), {}, {
|
|
108
121
|
status: 'pedding'
|
|
109
122
|
}) : item;
|
|
110
|
-
})
|
|
111
|
-
isDeclineReceipt: false
|
|
123
|
+
})
|
|
112
124
|
}));
|
|
113
125
|
dispatch(updateState({
|
|
114
126
|
title: locales.getText('page.eftpos-pay.text.waiting.signature') // 等待签名
|
|
@@ -119,6 +131,13 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
119
131
|
onChange(false);
|
|
120
132
|
});
|
|
121
133
|
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @title: 后退
|
|
137
|
+
* @description:
|
|
138
|
+
* @Author: hongbing.wang
|
|
139
|
+
* @Date: 2024-08-20 12:34
|
|
140
|
+
*/
|
|
122
141
|
var onBack = function onBack() {
|
|
123
142
|
dispatch(updateState({
|
|
124
143
|
title: locales.getText('page.eftpos-pay.text.waiting.signature'),
|
|
@@ -129,6 +148,14 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
129
148
|
receiptPage: 'receipt'
|
|
130
149
|
}));
|
|
131
150
|
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @title: 取消签名
|
|
154
|
+
* @description: 取消签名 不阻碍-状态查询
|
|
155
|
+
* @return null
|
|
156
|
+
* @Author: hongbing.wang
|
|
157
|
+
* @Date: 2024-08-12 11:30
|
|
158
|
+
*/
|
|
132
159
|
var onConfirm = function onConfirm() {
|
|
133
160
|
// 取消签名
|
|
134
161
|
dispatch(updateState({
|
|
@@ -146,13 +173,13 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
146
173
|
setReceiptLoading(true);
|
|
147
174
|
api.update({
|
|
148
175
|
type: 'NO',
|
|
149
|
-
number:
|
|
176
|
+
number: numRef.current
|
|
150
177
|
}).then(function (res) {
|
|
151
178
|
if (unloadRef.current) {
|
|
152
179
|
return res;
|
|
153
180
|
}
|
|
154
181
|
setReceiptLoading(false);
|
|
155
|
-
if (res && (res.code ===
|
|
182
|
+
if (res && "".concat(res.code) === '200') {
|
|
156
183
|
// 取消接口
|
|
157
184
|
var current = listRef.current.map(function (item) {
|
|
158
185
|
if (Number(item === null || item === void 0 ? void 0 : item.index) === StepStatusEnum.Receipt) {
|
|
@@ -184,8 +211,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
184
211
|
}
|
|
185
212
|
dispatch(updateCustom({
|
|
186
213
|
step: StepStatusEnum.Wait,
|
|
187
|
-
list: current
|
|
188
|
-
isDeclineReceipt: true
|
|
214
|
+
list: current
|
|
189
215
|
}));
|
|
190
216
|
onChange(true);
|
|
191
217
|
return res;
|
|
@@ -202,8 +228,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
202
228
|
return item.index === StepStatusEnum.Receipt ? _objectSpread(_objectSpread({}, item), {}, {
|
|
203
229
|
status: 'pedding'
|
|
204
230
|
}) : item;
|
|
205
|
-
})
|
|
206
|
-
isDeclineReceipt: false
|
|
231
|
+
})
|
|
207
232
|
}));
|
|
208
233
|
dispatch(updateState({
|
|
209
234
|
title: locales.getText('page.eftpos-pay.text.waiting.signature') // 等待签名
|
|
@@ -213,13 +238,18 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
213
238
|
setReceiptLoading(false);
|
|
214
239
|
});
|
|
215
240
|
};
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @title: 前往取消签名
|
|
244
|
+
* @description: 前往取消签名确认流程
|
|
245
|
+
* @Author: hongbing.wang
|
|
246
|
+
* @Date: 2024-08-20 12:40
|
|
247
|
+
*/
|
|
216
248
|
var onDecline = function onDecline() {
|
|
217
249
|
dispatch(updateState({
|
|
218
250
|
title: locales.getText('page.eftpos-pay.text.signature.title'),
|
|
219
251
|
// 'page.eftpos-pay.text.waiting.signature'), // 等待签名
|
|
220
|
-
status: StatusEnum.Warn
|
|
221
|
-
}));
|
|
222
|
-
dispatch(updateState({
|
|
252
|
+
status: StatusEnum.Warn,
|
|
223
253
|
custom: _objectSpread(_objectSpread({}, custom), {}, {
|
|
224
254
|
receiptPage: 'again'
|
|
225
255
|
})
|
|
@@ -230,6 +260,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
230
260
|
unloadRef.current = true;
|
|
231
261
|
};
|
|
232
262
|
}, []);
|
|
263
|
+
// 在 签名操作状态(确认/取消) 时 取消按钮
|
|
233
264
|
if (receiptLoading) {
|
|
234
265
|
return /*#__PURE__*/React.createElement("div", {
|
|
235
266
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
@@ -239,6 +270,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
239
270
|
disabled: true
|
|
240
271
|
}, locales.getText('page.eftpos-pay.text.leave')));
|
|
241
272
|
}
|
|
273
|
+
// 在 签名 常规操作项
|
|
242
274
|
if (receiptPage === 'receipt') {
|
|
243
275
|
return /*#__PURE__*/React.createElement("div", {
|
|
244
276
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
@@ -253,6 +285,8 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
253
285
|
onClick: onAccept
|
|
254
286
|
}, locales.getText('page.eftpos-pay.text.accept')));
|
|
255
287
|
}
|
|
288
|
+
|
|
289
|
+
// 在 取消签名 操作项目
|
|
256
290
|
return /*#__PURE__*/React.createElement("div", {
|
|
257
291
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
258
292
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -267,6 +301,13 @@ export var ReceiptAction = function ReceiptAction(_ref) {
|
|
|
267
301
|
disabled: receiptLoading
|
|
268
302
|
}, locales.getText('page.eftpos-pay.text.confirm.decline')));
|
|
269
303
|
};
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @title: 按钮操作区
|
|
307
|
+
* @description: 不包含签名
|
|
308
|
+
* @Author: hongbing.wang
|
|
309
|
+
* @Date: 2024-08-20 12:32
|
|
310
|
+
*/
|
|
270
311
|
var Action = function Action(_ref2) {
|
|
271
312
|
var index = _ref2.index,
|
|
272
313
|
onCancel = _ref2.onCancel,
|
|
@@ -275,16 +316,26 @@ var Action = function Action(_ref2) {
|
|
|
275
316
|
var _useContextData2 = useContextData(),
|
|
276
317
|
custom = _useContextData2.custom,
|
|
277
318
|
mode = _useContextData2.mode;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @title: 前往手动标记页
|
|
322
|
+
* @Author: hongbing.wang
|
|
323
|
+
* @Date: 2024-08-20 12:18
|
|
324
|
+
*/
|
|
325
|
+
// const onManually = () => {
|
|
326
|
+
// dispatch(
|
|
327
|
+
// updateState({
|
|
328
|
+
// manual: {
|
|
329
|
+
// title: locales.getText('page.eftpos-pay.text.request.title')(mode),
|
|
330
|
+
// text: locales.getText('page.eftpos-pay.text.request.text')(mode),
|
|
331
|
+
// },
|
|
332
|
+
// })
|
|
333
|
+
// );
|
|
334
|
+
// dispatch(updateComponent('Manual', true));
|
|
335
|
+
// };
|
|
336
|
+
|
|
337
|
+
// 在选择卡片应用之前 可取消支付
|
|
338
|
+
if (index < StepStatusEnum.Application) {
|
|
288
339
|
return /*#__PURE__*/React.createElement("div", {
|
|
289
340
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
290
341
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -294,7 +345,9 @@ var Action = function Action(_ref2) {
|
|
|
294
345
|
disabled: disabled
|
|
295
346
|
}, locales.getText('page.eftpos-pay.text.cancel')));
|
|
296
347
|
}
|
|
297
|
-
|
|
348
|
+
|
|
349
|
+
// 在选择卡片应用,和签名之间,不可进行用户操作
|
|
350
|
+
if (index >= StepStatusEnum.Application && index < StepStatusEnum.Receipt) {
|
|
298
351
|
return /*#__PURE__*/React.createElement("div", {
|
|
299
352
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
300
353
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -303,24 +356,19 @@ var Action = function Action(_ref2) {
|
|
|
303
356
|
disabled: true
|
|
304
357
|
}, locales.getText('page.eftpos-pay.text.leave')));
|
|
305
358
|
}
|
|
359
|
+
|
|
360
|
+
// 签名期间 渲染 ReceiptAction 组件
|
|
306
361
|
if (index === StepStatusEnum.Receipt) {
|
|
307
362
|
return null;
|
|
308
363
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
312
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
313
|
-
block: true,
|
|
314
|
-
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
315
|
-
disabled: true
|
|
316
|
-
}, locales.getText('page.eftpos-pay.text.leave')));
|
|
317
|
-
}
|
|
364
|
+
|
|
365
|
+
// 其他场景 可前往 标记签名页
|
|
318
366
|
return /*#__PURE__*/React.createElement("div", {
|
|
319
367
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
320
368
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
321
369
|
block: true,
|
|
322
370
|
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
323
|
-
|
|
324
|
-
}, locales.getText('page.eftpos-pay.text.
|
|
371
|
+
disabled: true
|
|
372
|
+
}, locales.getText('page.eftpos-pay.text.leave')));
|
|
325
373
|
};
|
|
326
374
|
export default Action;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 定时,轮询
|
|
3
|
+
* @description: 双层 proxy , 1. 轮询 2. 定时 关闭轮询 ,特殊状态码,前端 701001 超时关闭 -1 外部用户关闭
|
|
4
|
+
* @return null
|
|
5
|
+
* @Author: hongbing.wang
|
|
6
|
+
* @Date: 2024-08-12 11:25
|
|
7
|
+
*/
|
|
1
8
|
export default class XhrTimer {
|
|
2
9
|
clearTimeout: number;
|
|
3
10
|
isTimeoutClose: boolean;
|
|
@@ -10,8 +17,13 @@ export default class XhrTimer {
|
|
|
10
17
|
constructor({ xhr, timeout, callback, max, }: {
|
|
11
18
|
xhr: (...agrn: unknown[]) => Promise<unknown>;
|
|
12
19
|
timeout: number;
|
|
13
|
-
callback: (...agrn:
|
|
20
|
+
callback: (...agrn: any[]) => unknown;
|
|
14
21
|
max?: number;
|
|
15
22
|
});
|
|
23
|
+
/**
|
|
24
|
+
* @title: 关闭 循环
|
|
25
|
+
* @Author: hongbing.wang
|
|
26
|
+
* @Date: 2024-08-20 12:48
|
|
27
|
+
*/
|
|
16
28
|
close(): void;
|
|
17
29
|
}
|
|
@@ -13,6 +13,14 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
13
13
|
import { PayStatus } from "../const";
|
|
14
14
|
import { sleep, getUuid } from "../helper";
|
|
15
15
|
var MaxTime = 5000;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @title: 定时,轮询
|
|
19
|
+
* @description: 双层 proxy , 1. 轮询 2. 定时 关闭轮询 ,特殊状态码,前端 701001 超时关闭 -1 外部用户关闭
|
|
20
|
+
* @return null
|
|
21
|
+
* @Author: hongbing.wang
|
|
22
|
+
* @Date: 2024-08-12 11:25
|
|
23
|
+
*/
|
|
16
24
|
var XhrTimer = /*#__PURE__*/function () {
|
|
17
25
|
function XhrTimer(_ref) {
|
|
18
26
|
var xhr = _ref.xhr,
|
|
@@ -34,6 +42,7 @@ var XhrTimer = /*#__PURE__*/function () {
|
|
|
34
42
|
this.num = getUuid();
|
|
35
43
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
36
44
|
var self = this;
|
|
45
|
+
// 此处 使用 Proxy 循环发送 被代理函数,直到用户关闭,其中在循环过程中 设置上限去对函数执行间隔进行限制
|
|
37
46
|
var xhrApi = new Proxy(xhr, {
|
|
38
47
|
apply: function apply(target, ctx, agrns) {
|
|
39
48
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -86,7 +95,7 @@ var XhrTimer = /*#__PURE__*/function () {
|
|
|
86
95
|
result = _context.sent;
|
|
87
96
|
case 12:
|
|
88
97
|
currentTime = Date.now();
|
|
89
|
-
diff = currentTime - laster;
|
|
98
|
+
diff = currentTime - laster; // 未到执行时长上限 则进入等待 直到执行时长上限 进行下一步行为
|
|
90
99
|
if (!(self.flag && diff < max)) {
|
|
91
100
|
_context.next = 17;
|
|
92
101
|
break;
|
|
@@ -106,6 +115,8 @@ var XhrTimer = /*#__PURE__*/function () {
|
|
|
106
115
|
}))();
|
|
107
116
|
}
|
|
108
117
|
});
|
|
118
|
+
|
|
119
|
+
// 此处使用 Proxy 对 被代理函数,执行整体计时处理, 当到达执行时长上限 则将上述循环中断,并返回结果
|
|
109
120
|
this.run = new Proxy(xhrApi, {
|
|
110
121
|
apply: function apply(target, ctx, agrns) {
|
|
111
122
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
@@ -164,6 +175,12 @@ var XhrTimer = /*#__PURE__*/function () {
|
|
|
164
175
|
}
|
|
165
176
|
});
|
|
166
177
|
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @title: 关闭 循环
|
|
181
|
+
* @Author: hongbing.wang
|
|
182
|
+
* @Date: 2024-08-20 12:48
|
|
183
|
+
*/
|
|
167
184
|
_createClass(XhrTimer, [{
|
|
168
185
|
key: "close",
|
|
169
186
|
value: function close() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const _default: ({ api, onChange }: {
|
|
2
|
+
declare const _default: ({ api, onChange, formatAmount, }: {
|
|
3
3
|
api: any;
|
|
4
4
|
onChange: any;
|
|
5
|
+
formatAmount(amount: number | string, precision: number, symbol: string): string;
|
|
5
6
|
}) => React.JSX.Element;
|
|
6
7
|
export default _default;
|