@pisell/private-materials 3.0.136 → 3.0.137
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/addons/model.d.ts +1 -2
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/model.d.ts +1 -2
- 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/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/utils/load.d.ts +11 -0
- package/es/utils/load.js +85 -0
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/model.d.ts +1 -2
- 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/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- 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
|
@@ -38,7 +38,7 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_store = require("../../store");
|
|
39
39
|
var import_header = __toESM(require("../header"));
|
|
40
40
|
var unknow_default = ({ className = "" }) => {
|
|
41
|
-
const {
|
|
41
|
+
const { form, mode } = (0, import_store.useContextData)();
|
|
42
42
|
const dispatch = (0, import_store.useDispatch)();
|
|
43
43
|
const onManually = () => {
|
|
44
44
|
dispatch(
|
|
@@ -56,10 +56,10 @@ var unknow_default = ({ className = "" }) => {
|
|
|
56
56
|
dispatch((0, import_store.updateComponent)("Manual"));
|
|
57
57
|
};
|
|
58
58
|
(0, import_react.useEffect)(() => {
|
|
59
|
-
if (
|
|
59
|
+
if (form === "Network" || form === "restore") {
|
|
60
60
|
dispatch((0, import_store.updateComponent)(""));
|
|
61
61
|
}
|
|
62
|
-
}, [
|
|
62
|
+
}, [form]);
|
|
63
63
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: "warn" }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, import_utils.locales.getText("page.eftpos-pay.text.unknown.title")(mode)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, import_utils.locales.getText("page.eftpos-pay.text.unknown.text")(mode)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
64
64
|
import_antd.Button,
|
|
65
65
|
{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StatusType } from '../../const';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const _default: ({ status, title, children }: {
|
|
4
|
+
declare const _default: ({ status, title, subTitle, children }: {
|
|
5
5
|
status: StatusType;
|
|
6
6
|
title?: string | undefined;
|
|
7
|
+
subTitle?: string | undefined;
|
|
7
8
|
children?: React.ReactNode;
|
|
8
9
|
}) => React.JSX.Element;
|
|
9
10
|
export default _default;
|
|
@@ -88,5 +88,6 @@ var Icon = ({ status }) => {
|
|
|
88
88
|
var header_default = ({
|
|
89
89
|
status,
|
|
90
90
|
title = "",
|
|
91
|
+
subTitle,
|
|
91
92
|
children
|
|
92
|
-
}) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-icon" }, /* @__PURE__ */ import_react.default.createElement(Icon, { status }), children), title ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-title" }, title) : null);
|
|
93
|
+
}) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-icon" }, /* @__PURE__ */ import_react.default.createElement(Icon, { status }), children), title ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-title" }, title) : null, subTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-sub-title" }, subTitle) : null);
|
|
@@ -24,16 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
.pisell-lowcode__eft-pay-load {
|
|
26
26
|
animation: spin 1s linear infinite;
|
|
27
|
-
}
|
|
28
|
-
// .pisell-lowcode__eft-pay-success{
|
|
29
|
-
|
|
30
|
-
// }
|
|
31
|
-
// .pisell-lowcode__eft-pay-warn{
|
|
32
|
-
|
|
33
|
-
// }
|
|
34
|
-
// .pisell-lowcode__eft-pay-fail{
|
|
35
|
-
|
|
36
|
-
// }
|
|
27
|
+
}
|
|
37
28
|
@keyframes spin {
|
|
38
29
|
from {
|
|
39
30
|
transform: rotate(0deg);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
3
|
import './index.less';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @title: 结果标记页面
|
|
6
|
+
* @Author: hongbing.wang
|
|
7
|
+
* @Date: 2024-08-20 11:46
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: ({ onChange, className, formatAmount }: ActionProps) => React.JSX.Element;
|
|
5
10
|
export default _default;
|
|
@@ -33,49 +33,146 @@ __export(manual_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(manual_exports);
|
|
35
35
|
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_decimal = require("decimal.js");
|
|
36
37
|
var import_antd = require("antd");
|
|
37
38
|
var import_react = __toESM(require("react"));
|
|
38
39
|
var import_usePrefix = __toESM(require("../../../../hooks/usePrefix"));
|
|
39
40
|
var import_const = require("../../const");
|
|
40
41
|
var import_store = require("../../store");
|
|
42
|
+
var import_helper = require("../../helper");
|
|
41
43
|
var import_index = require("./index.less");
|
|
42
|
-
var manual_default = ({ onChange, className = "" }) => {
|
|
43
|
-
const
|
|
44
|
+
var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
45
|
+
const dispatch = (0, import_store.useDispatch)();
|
|
46
|
+
const { symbol, manual, order_id, mode, device, number, pay, amount } = (0, import_store.useContextData)();
|
|
47
|
+
const start = (0, import_react.useMemo)(() => {
|
|
48
|
+
if (typeof (manual == null ? void 0 : manual.money) === "number") {
|
|
49
|
+
return manual == null ? void 0 : manual.money;
|
|
50
|
+
}
|
|
51
|
+
if (typeof (pay == null ? void 0 : pay.total) === "number") {
|
|
52
|
+
return pay == null ? void 0 : pay.total;
|
|
53
|
+
}
|
|
54
|
+
return amount;
|
|
55
|
+
}, [manual == null ? void 0 : manual.money, pay == null ? void 0 : pay.total, amount]);
|
|
56
|
+
const [money, setMoney] = (0, import_react.useState)(start);
|
|
44
57
|
const [disabled, setDisabled] = (0, import_react.useState)(false);
|
|
45
58
|
const prefix = (0, import_usePrefix.default)();
|
|
59
|
+
const [isUpdateAmount, updateAmountStatus] = (0, import_react.useState)(manual == null ? void 0 : manual.status);
|
|
46
60
|
const onSuccess = () => {
|
|
47
61
|
if (disabled) {
|
|
48
62
|
return;
|
|
49
63
|
}
|
|
50
|
-
setDisabled(true);
|
|
51
64
|
if (mode === import_const.ModeEnum.Pay) {
|
|
52
|
-
|
|
65
|
+
setDisabled(true);
|
|
66
|
+
const obj = pay || {};
|
|
53
67
|
onChange("success", {
|
|
54
68
|
...obj,
|
|
55
|
-
number
|
|
56
|
-
device
|
|
69
|
+
number,
|
|
70
|
+
device,
|
|
71
|
+
order_id
|
|
57
72
|
});
|
|
58
73
|
return;
|
|
59
74
|
}
|
|
60
75
|
if (mode === import_const.ModeEnum.Refund) {
|
|
61
|
-
|
|
76
|
+
setDisabled(true);
|
|
62
77
|
onChange("success", {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
78
|
+
amount,
|
|
79
|
+
total: amount,
|
|
80
|
+
number,
|
|
81
|
+
device,
|
|
82
|
+
order_id
|
|
66
83
|
});
|
|
67
84
|
return;
|
|
68
85
|
}
|
|
69
|
-
|
|
86
|
+
updateAmountStatus(true);
|
|
87
|
+
dispatch((0, import_store.updateState)({ manual: { ...manual, status: true } }));
|
|
70
88
|
};
|
|
71
89
|
const onFail = () => {
|
|
72
90
|
if (disabled) {
|
|
73
91
|
return;
|
|
74
92
|
}
|
|
75
93
|
setDisabled(true);
|
|
76
|
-
onChange("fail");
|
|
94
|
+
onChange("fail", { number, device, order_id });
|
|
77
95
|
};
|
|
78
|
-
|
|
96
|
+
const onSubmit = () => {
|
|
97
|
+
if (disabled) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
setDisabled(true);
|
|
101
|
+
if (mode !== import_const.ModeEnum.Pay) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const prevMoneyDeci = new import_decimal.Decimal((pay == null ? void 0 : pay.total) || 0);
|
|
105
|
+
const moneyDeci = new import_decimal.Decimal(Number(money || 0));
|
|
106
|
+
let surMoneyDeci = new import_decimal.Decimal(Number((pay == null ? void 0 : pay.surMoney) || 0));
|
|
107
|
+
let surchargeDeci = new import_decimal.Decimal(Number(pay == null ? void 0 : pay.surcharge));
|
|
108
|
+
const diff = moneyDeci.sub(prevMoneyDeci);
|
|
109
|
+
const flag = diff.comparedTo(0);
|
|
110
|
+
if (flag < 0) {
|
|
111
|
+
setDisabled(false);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (flag > 0) {
|
|
115
|
+
surMoneyDeci = surMoneyDeci.add(diff);
|
|
116
|
+
surchargeDeci = surchargeDeci.add(diff);
|
|
117
|
+
}
|
|
118
|
+
const obj = pay || {};
|
|
119
|
+
onChange("success", {
|
|
120
|
+
...obj,
|
|
121
|
+
surMoney: surMoneyDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
122
|
+
surcharge: surchargeDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
123
|
+
total: moneyDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP),
|
|
124
|
+
totalUnit: formatAmount(moneyDeci.toFixed(2, import_decimal.Decimal.ROUND_HALF_UP), 2, symbol),
|
|
125
|
+
number,
|
|
126
|
+
device,
|
|
127
|
+
order_id
|
|
128
|
+
});
|
|
129
|
+
return;
|
|
130
|
+
};
|
|
131
|
+
const onCancel = () => {
|
|
132
|
+
updateAmountStatus(false);
|
|
133
|
+
setMoney(pay == null ? void 0 : pay.total);
|
|
134
|
+
dispatch((0, import_store.updateState)({ manual: { ...manual, status: true, money: pay == null ? void 0 : pay.total } }));
|
|
135
|
+
};
|
|
136
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-manual ${className}` }, isUpdateAmount ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-title" }, import_utils.locales.getText("page.eftpos-pay.text.manual.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-body" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.subtitle")(formatAmount(pay == null ? void 0 : pay.total, 2, symbol)), " ", /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.manual.confirm"), /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.manual.diff")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-act" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.tip")), /* @__PURE__ */ import_react.default.createElement(
|
|
137
|
+
import_antd.InputNumber,
|
|
138
|
+
{
|
|
139
|
+
addonBefore: symbol || "$",
|
|
140
|
+
min: pay == null ? void 0 : pay.total,
|
|
141
|
+
precision: 2,
|
|
142
|
+
style: { width: "100%" },
|
|
143
|
+
formatter: import_helper.limitDecimals,
|
|
144
|
+
parser: import_helper.limitDecimals,
|
|
145
|
+
defaultValue: money,
|
|
146
|
+
onChange: (event) => {
|
|
147
|
+
if (event !== null && event !== void 0) {
|
|
148
|
+
setMoney(event || 0);
|
|
149
|
+
dispatch(
|
|
150
|
+
(0, import_store.updateState)({ manual: { ...manual, money: event || 0 } })
|
|
151
|
+
);
|
|
152
|
+
} else {
|
|
153
|
+
setMoney(0);
|
|
154
|
+
dispatch((0, import_store.updateState)({ manual: { ...manual, money: 0 } }));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
159
|
+
import_antd.Button,
|
|
160
|
+
{
|
|
161
|
+
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
162
|
+
block: true,
|
|
163
|
+
onClick: onCancel
|
|
164
|
+
},
|
|
165
|
+
import_utils.locales.getText("page.eftpos-pay.text.cancel")
|
|
166
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
167
|
+
import_antd.Button,
|
|
168
|
+
{
|
|
169
|
+
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
170
|
+
block: true,
|
|
171
|
+
type: "primary",
|
|
172
|
+
onClick: onSubmit
|
|
173
|
+
},
|
|
174
|
+
import_utils.locales.getText("page.eftpos-pay.text.manual.btn.confirm")(formatAmount(money, 2, symbol))
|
|
175
|
+
))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-title" }, manual == null ? void 0 : manual.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-txt" }, manual == null ? void 0 : manual.text), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card-box" }, /* @__PURE__ */ import_react.default.createElement(
|
|
79
176
|
"div",
|
|
80
177
|
{
|
|
81
178
|
className: "pisell-lowcode__eft-pay-manual-card",
|
|
@@ -88,26 +185,20 @@ var manual_default = ({ onChange, className = "" }) => {
|
|
|
88
185
|
style: { backgroundImage: `url(${prefix}/pay_success.png)` }
|
|
89
186
|
}
|
|
90
187
|
),
|
|
91
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
92
|
-
import_antd.Button,
|
|
93
|
-
{
|
|
94
|
-
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
95
|
-
block: true
|
|
96
|
-
},
|
|
97
|
-
import_utils.locales.getText("page.eftpos-pay.text.successful")(mode)
|
|
98
|
-
)
|
|
99
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card", onClick: onFail }, /* @__PURE__ */ import_react.default.createElement(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
className: "pisell-lowcode__eft-pay-manual-img",
|
|
103
|
-
style: { backgroundImage: `url(${prefix}/pay_error.png)` }
|
|
104
|
-
}
|
|
188
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { className: "pisell-lowcode__eft-pay-manual-btn", block: true }, import_utils.locales.getText("page.eftpos-pay.text.successful")(mode))
|
|
105
189
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
-
|
|
190
|
+
"div",
|
|
107
191
|
{
|
|
108
|
-
className: "pisell-lowcode__eft-pay-manual-
|
|
109
|
-
|
|
192
|
+
className: "pisell-lowcode__eft-pay-manual-card",
|
|
193
|
+
onClick: onFail
|
|
110
194
|
},
|
|
111
|
-
|
|
195
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
className: "pisell-lowcode__eft-pay-manual-img",
|
|
199
|
+
style: { backgroundImage: `url(${prefix}/pay_error.png)` }
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { className: "pisell-lowcode__eft-pay-manual-btn", block: true }, import_utils.locales.getText("page.eftpos-pay.text.failed")(mode))
|
|
112
203
|
))));
|
|
113
204
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.pisell-lowcode__eft-pay-manual{
|
|
1
|
+
.pisell-lowcode__eft-pay-manual {
|
|
2
2
|
padding: var(--pisel-lc-pos-manual-padding, 24px);
|
|
3
3
|
width: var(--pisel-lc-pos-manual-width, 600px);
|
|
4
4
|
}
|
|
@@ -7,16 +7,48 @@
|
|
|
7
7
|
color: var(--text-text_1, #1b1b1b);
|
|
8
8
|
|
|
9
9
|
/* H6/Semi Bold */
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
font-size: 16px;
|
|
12
12
|
font-style: normal;
|
|
13
13
|
font-weight: 600;
|
|
14
14
|
line-height: 22px; /* 137.5% */
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
.pisell-lowcode__eft-pay-manual-edit-title {
|
|
18
|
+
color: var(--Gray-900, #101828);
|
|
19
|
+
font-size: 18px;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
line-height: 28px; /* 155.556% */
|
|
23
|
+
padding: 0 0 16px 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pisell-lowcode__eft-pay-manual-edit-body {
|
|
27
|
+
border-top: 1px solid var(--Gray-200, #eaecf0);
|
|
28
|
+
padding: 16px 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 16px;
|
|
32
|
+
flex: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pisell-lowcode__eft-pay-manual-edit-act{
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: 6px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pisell-lowcode__eft-pay-manual-edit-text {
|
|
42
|
+
color: var(--Gray-900, #101828);
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
line-height: 24px; /* 150% */
|
|
47
|
+
}
|
|
16
48
|
.pisell-lowcode__eft-pay-manual-txt {
|
|
17
49
|
color: var(--text-text_1, #1b1b1b);
|
|
18
50
|
/* Paragraph/Regular */
|
|
19
|
-
|
|
51
|
+
|
|
20
52
|
font-size: 14px;
|
|
21
53
|
font-style: normal;
|
|
22
54
|
font-weight: 400;
|
|
@@ -51,14 +83,14 @@
|
|
|
51
83
|
background-position: center;
|
|
52
84
|
background-size: cover;
|
|
53
85
|
}
|
|
54
|
-
.pisell-lowcode__eft-pay-manual-card-box{
|
|
86
|
+
.pisell-lowcode__eft-pay-manual-card-box {
|
|
55
87
|
flex: 1;
|
|
56
88
|
overflow: auto;
|
|
57
89
|
}
|
|
58
90
|
|
|
59
91
|
@media only screen and (max-width: 499px) {
|
|
60
92
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
61
|
-
gap:10px;
|
|
93
|
+
gap: 10px;
|
|
62
94
|
}
|
|
63
95
|
.pisell-lowcode__eft-pay-manual-card {
|
|
64
96
|
flex: 1;
|
|
@@ -68,35 +100,31 @@
|
|
|
68
100
|
width: 110px;
|
|
69
101
|
height: 150px;
|
|
70
102
|
}
|
|
71
|
-
.pisell-lowcode__eft-pay-manual-card .pisell-lowcode__eft-pay-manual-btn{
|
|
103
|
+
.pisell-lowcode__eft-pay-manual-card .pisell-lowcode__eft-pay-manual-btn {
|
|
72
104
|
font-size: 12px !important;
|
|
73
105
|
}
|
|
74
106
|
}
|
|
75
107
|
|
|
76
|
-
|
|
77
108
|
@media only screen and (min-width: 500px) and (max-width: 601px) {
|
|
78
|
-
.pisell-lowcode__eft-pay-terminal .pisell-lowcode__eft-pay-manual-card-box{
|
|
109
|
+
.pisell-lowcode__eft-pay-terminal .pisell-lowcode__eft-pay-manual-card-box {
|
|
79
110
|
flex: none;
|
|
80
111
|
height: 360px;
|
|
81
112
|
}
|
|
82
113
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
83
|
-
gap:10px;
|
|
114
|
+
gap: 10px;
|
|
84
115
|
height: 400px;
|
|
85
|
-
|
|
86
116
|
}
|
|
87
117
|
.pisell-lowcode__eft-pay-manual-card {
|
|
88
118
|
flex: 1;
|
|
89
119
|
padding: 20px;
|
|
90
|
-
gap:30px;
|
|
120
|
+
gap: 30px;
|
|
91
121
|
}
|
|
92
|
-
.pisell-lowcode__eft-pay-manual-img{
|
|
122
|
+
.pisell-lowcode__eft-pay-manual-img {
|
|
93
123
|
width: 200px;
|
|
94
124
|
height: 200px;
|
|
95
125
|
}
|
|
96
126
|
}
|
|
97
127
|
|
|
98
|
-
|
|
99
|
-
|
|
100
128
|
@media only screen and (min-width: 601px) {
|
|
101
129
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
102
130
|
margin: 24px auto 0;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 取消签名确认页
|
|
5
|
+
* @Author: hongbing.wang
|
|
6
|
+
* @Date: 2024-08-20 11:49
|
|
7
|
+
*/
|
|
3
8
|
declare const _default: ({ api, className }: ActionProps) => React.JSX.Element;
|
|
4
9
|
export default _default;
|
|
@@ -39,7 +39,7 @@ var import_store = require("../../store");
|
|
|
39
39
|
var import_header = __toESM(require("../header"));
|
|
40
40
|
var signature_default = ({ api, className = "" }) => {
|
|
41
41
|
const dispatch = (0, import_store.useDispatch)();
|
|
42
|
-
const {
|
|
42
|
+
const { number, mode } = (0, import_store.useContextData)();
|
|
43
43
|
const [disabled, setDisabled] = (0, import_react.useState)(false);
|
|
44
44
|
const onBack = () => {
|
|
45
45
|
dispatch((0, import_store.updateComponent)(""));
|
|
@@ -48,7 +48,7 @@ var signature_default = ({ api, className = "" }) => {
|
|
|
48
48
|
setDisabled(true);
|
|
49
49
|
api.update({
|
|
50
50
|
type: "NO",
|
|
51
|
-
number
|
|
51
|
+
number
|
|
52
52
|
}).then(() => {
|
|
53
53
|
setDisabled(false);
|
|
54
54
|
dispatch((0, import_store.updateComponent)(""));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { StatusType } from '../../const';
|
|
3
3
|
declare const _default: (props: {
|
|
4
4
|
status: StatusType;
|
|
5
|
-
warn?:
|
|
6
|
-
text?:
|
|
7
|
-
tip?:
|
|
8
|
-
loading?:
|
|
9
|
-
success?:
|
|
10
|
-
fail?:
|
|
5
|
+
warn?: string | undefined;
|
|
6
|
+
text?: string | undefined;
|
|
7
|
+
tip?: string | undefined;
|
|
8
|
+
loading?: string | undefined;
|
|
9
|
+
success?: string | undefined;
|
|
10
|
+
fail?: string | undefined;
|
|
11
11
|
}) => React.JSX.Element;
|
|
12
12
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
declare const _default: (props: {
|
|
3
3
|
status: string;
|
|
4
|
-
pedding?:
|
|
5
|
-
resolve?:
|
|
6
|
-
reject?:
|
|
4
|
+
pedding?: string | undefined;
|
|
5
|
+
resolve?: string | undefined;
|
|
6
|
+
reject?: string | undefined;
|
|
7
7
|
className?: string | undefined;
|
|
8
8
|
}) => React.JSX.Element;
|
|
9
9
|
export default _default;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare enum EftposEnum {
|
|
2
|
+
/** 后端支付 - 仅支付 */
|
|
2
3
|
Payo = "payo",
|
|
4
|
+
/** 前端支付 */
|
|
3
5
|
Tyro = "tyro",
|
|
6
|
+
/** 后端支付 - 支付 + 退款 */
|
|
4
7
|
Windcave = "windcave",
|
|
5
|
-
Stripe = "stripe"
|
|
6
|
-
Eftpos = "eftpos"
|
|
8
|
+
Stripe = "stripe"
|
|
7
9
|
}
|
|
8
10
|
export declare enum StatusEnum {
|
|
9
11
|
Loading = "loading",
|
|
@@ -53,13 +55,17 @@ export interface PosProps {
|
|
|
53
55
|
onChangeStatus: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page', params?: {
|
|
54
56
|
[keys: string]: unknown;
|
|
55
57
|
} | string) => void;
|
|
58
|
+
onChangeParams(...agrn: unknown[]): void;
|
|
56
59
|
terminal: {
|
|
57
60
|
network: boolean;
|
|
58
61
|
};
|
|
59
62
|
device?: {
|
|
60
63
|
[key: string]: unknown;
|
|
61
64
|
};
|
|
62
|
-
|
|
65
|
+
mode: ModeEnum;
|
|
66
|
+
tyroUrl?: string;
|
|
67
|
+
tyroVersion?: string;
|
|
68
|
+
source: 'normal' | 'restore';
|
|
63
69
|
}
|
|
64
70
|
export interface PayProps {
|
|
65
71
|
api: ReturnType<PosProps['getApi']>;
|
|
@@ -80,6 +86,8 @@ export declare type Amount = {
|
|
|
80
86
|
surMoney: number;
|
|
81
87
|
/** 手续费-是否存在 */
|
|
82
88
|
surcharge: boolean;
|
|
89
|
+
/** 是否使用原始手续费 */
|
|
90
|
+
useOriginSurcharge: boolean;
|
|
83
91
|
};
|
|
84
92
|
export declare type PayAmount = {
|
|
85
93
|
/** 手续费-百分比-带百分号 例: 1% =》 数据为 0.01 */
|
|
@@ -118,7 +126,13 @@ export declare enum PayStatus {
|
|
|
118
126
|
/** 交易等待超时 */
|
|
119
127
|
'PayTimeout' = "701006",
|
|
120
128
|
/** 连接失败 */
|
|
121
|
-
'SocketError' = "701007"
|
|
129
|
+
'SocketError' = "701007",
|
|
130
|
+
/** 银行拒绝 */
|
|
131
|
+
'PayBankRefuses' = "701008",
|
|
132
|
+
/** 签名拒绝 */
|
|
133
|
+
'SignatureDeclined' = "701009",
|
|
134
|
+
/** 配置参数错误 */
|
|
135
|
+
'UserConfigError' = "701010"
|
|
122
136
|
}
|
|
123
137
|
export interface ActionProps {
|
|
124
138
|
onChange: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page', params?: {
|
|
@@ -129,4 +143,5 @@ export interface ActionProps {
|
|
|
129
143
|
};
|
|
130
144
|
className?: string;
|
|
131
145
|
isIpad?: boolean;
|
|
146
|
+
formatAmount: (amount: number | string, precision: number, symbol: string) => string;
|
|
132
147
|
}
|
|
@@ -32,7 +32,6 @@ var EftposEnum = /* @__PURE__ */ ((EftposEnum2) => {
|
|
|
32
32
|
EftposEnum2["Tyro"] = "tyro";
|
|
33
33
|
EftposEnum2["Windcave"] = "windcave";
|
|
34
34
|
EftposEnum2["Stripe"] = "stripe";
|
|
35
|
-
EftposEnum2["Eftpos"] = "eftpos";
|
|
36
35
|
return EftposEnum2;
|
|
37
36
|
})(EftposEnum || {});
|
|
38
37
|
var StatusEnum = /* @__PURE__ */ ((StatusEnum2) => {
|
|
@@ -73,6 +72,9 @@ var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
|
|
|
73
72
|
PayStatus2["NoNetWork"] = "701005";
|
|
74
73
|
PayStatus2["PayTimeout"] = "701006";
|
|
75
74
|
PayStatus2["SocketError"] = "701007";
|
|
75
|
+
PayStatus2["PayBankRefuses"] = "701008";
|
|
76
|
+
PayStatus2["SignatureDeclined"] = "701009";
|
|
77
|
+
PayStatus2["UserConfigError"] = "701010";
|
|
76
78
|
return PayStatus2;
|
|
77
79
|
})(PayStatus || {});
|
|
78
80
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PayProps, PosProps } from './const';
|
|
3
3
|
import './device.less';
|
|
4
|
+
/**
|
|
5
|
+
* @title: 设备选择页
|
|
6
|
+
* @description: 选择设备信息,无设备增加提示;仅有一条,默认选中跳走;多条记录则停留等待用户选择
|
|
7
|
+
* @return React.Element
|
|
8
|
+
* @Author: hongbing.wang
|
|
9
|
+
* @Date: 2024-08-12 11:40
|
|
10
|
+
*/
|
|
4
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isIpad, net, }: {
|
|
5
12
|
api: PayProps['api'];
|
|
6
13
|
className?: string | undefined;
|
|
@@ -1,3 +1,57 @@
|
|
|
1
|
+
import { State } from './store';
|
|
1
2
|
export declare function getUuid(): string;
|
|
3
|
+
/**
|
|
4
|
+
* @title: Promise化 setTimeout
|
|
5
|
+
* @param {number} time
|
|
6
|
+
* @Author: hongbing.wang
|
|
7
|
+
* @Date: 2024-08-20 13:03
|
|
8
|
+
*/
|
|
2
9
|
export declare const sleep: (time: number) => Promise<unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* @title: 克隆
|
|
12
|
+
* @Author: hongbing.wang
|
|
13
|
+
* @Date: 2024-08-20 13:03
|
|
14
|
+
*/
|
|
3
15
|
export declare function cloneDeep(source: any, hash?: WeakMap<object, any>): any;
|
|
16
|
+
declare type key = 'mode' | 'amount' | 'order_id' | 'number' | 'device' | 'pay' | 'custom';
|
|
17
|
+
/**
|
|
18
|
+
* @title: 获取支付回调参数
|
|
19
|
+
* @Author: hongbing.wang
|
|
20
|
+
* @Date: 2024-08-20 20:26
|
|
21
|
+
*/
|
|
22
|
+
export declare const getPayParams: (data: Partial<Omit<State, key>> & Pick<State, Extract<key, keyof State>>, statue: 'success' | 'fail') => {
|
|
23
|
+
number: string | number | undefined;
|
|
24
|
+
device: {
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
} | undefined;
|
|
27
|
+
order_id: string | number;
|
|
28
|
+
amount?: undefined;
|
|
29
|
+
total?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
cardReaderSurcharge: {};
|
|
32
|
+
surMoney: string;
|
|
33
|
+
surcharge: string;
|
|
34
|
+
total: string;
|
|
35
|
+
number: string | number | undefined;
|
|
36
|
+
device: {
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
} | undefined;
|
|
39
|
+
order_id: string | number;
|
|
40
|
+
amount?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
amount: string | number;
|
|
43
|
+
total: string | number;
|
|
44
|
+
number: string | number | undefined;
|
|
45
|
+
device: {
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
} | undefined;
|
|
48
|
+
order_id: string | number;
|
|
49
|
+
} | {
|
|
50
|
+
amount: string | number;
|
|
51
|
+
total: string | number;
|
|
52
|
+
number: string | number | undefined;
|
|
53
|
+
order_id: string | number;
|
|
54
|
+
device?: undefined;
|
|
55
|
+
};
|
|
56
|
+
export declare const limitDecimals: (value: any) => any;
|
|
57
|
+
export {};
|