@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftpos/log.tsx
|
|
30
|
+
var log_exports = {};
|
|
31
|
+
__export(log_exports, {
|
|
32
|
+
default: () => Log
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(log_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_hooks = require("./hooks");
|
|
37
|
+
function Log({
|
|
38
|
+
device,
|
|
39
|
+
type,
|
|
40
|
+
tyroUrl,
|
|
41
|
+
tyroVersion
|
|
42
|
+
}) {
|
|
43
|
+
const [TyroRef, load] = (0, import_hooks.useTyro)({ url: tyroUrl, version: tyroVersion });
|
|
44
|
+
const iClientRef = (0, import_react.useRef)();
|
|
45
|
+
const [src, setSrc] = (0, import_react.useState)("");
|
|
46
|
+
(0, import_react.useEffect)(() => {
|
|
47
|
+
if (load && TyroRef.current) {
|
|
48
|
+
const IClient = TyroRef.current.IClient;
|
|
49
|
+
const { apiKey, posProductData } = device.config;
|
|
50
|
+
const iclient = new IClient(apiKey, posProductData);
|
|
51
|
+
iClientRef.current = iclient;
|
|
52
|
+
getTerminalInfo(() => {
|
|
53
|
+
const src2 = (tyroUrl || "https://iclientsimulator.test.tyro.com") + "/logs.html";
|
|
54
|
+
setSrc(src2);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}, [load]);
|
|
58
|
+
const getTerminalInfo = (cb) => {
|
|
59
|
+
const iClient = iClientRef.current;
|
|
60
|
+
if (!iClient) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const { integrationKey, tid, mid } = device;
|
|
64
|
+
iClient.terminalInfo(
|
|
65
|
+
({ status, message, terminalInfo }) => {
|
|
66
|
+
if (status === "success") {
|
|
67
|
+
cb(status, message, terminalInfo);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
mid,
|
|
72
|
+
tid,
|
|
73
|
+
integrationKey
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
(0, import_react.useEffect)(() => {
|
|
78
|
+
console.log(device);
|
|
79
|
+
}, [device]);
|
|
80
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, height: "100%" } }, src ? /* @__PURE__ */ import_react.default.createElement(
|
|
81
|
+
"iframe",
|
|
82
|
+
{
|
|
83
|
+
src,
|
|
84
|
+
style: { width: "100%", height: "100%", border: "none" }
|
|
85
|
+
}
|
|
86
|
+
) : null);
|
|
87
|
+
}
|
|
@@ -5,5 +5,5 @@ interface PosProps {
|
|
|
5
5
|
formItemList: any[];
|
|
6
6
|
onSave: (device: DeviceProp) => void;
|
|
7
7
|
}
|
|
8
|
-
declare const PosForm: ({
|
|
8
|
+
declare const PosForm: ({ onSave, formItemList }: PosProps) => React.JSX.Element;
|
|
9
9
|
export default PosForm;
|
|
@@ -38,18 +38,19 @@ var import_const = require("./const");
|
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_form = __toESM(require("./form"));
|
|
40
40
|
var { Title } = import_antd.Typography;
|
|
41
|
-
var PosForm = ({
|
|
41
|
+
var PosForm = ({ onSave, formItemList }) => {
|
|
42
42
|
const initialValues = (0, import_const.getDefaultValue)(formItemList);
|
|
43
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-form-box" }, /* @__PURE__ */ import_react.default.createElement(Title, { level: 4, className: "pisell-lowcode__pos-title" },
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-form-box" }, /* @__PURE__ */ import_react.default.createElement(Title, { level: 4, className: "pisell-lowcode__pos-title" }, import_utils.locales.getText("page.eftpos.text.setting")), /* @__PURE__ */ import_react.default.createElement(
|
|
44
44
|
import_antd.Form,
|
|
45
45
|
{
|
|
46
46
|
layout: "vertical",
|
|
47
47
|
onFinish: onSave,
|
|
48
48
|
initialValues,
|
|
49
|
-
className: "pisell-lowcode__pos-form"
|
|
49
|
+
className: "pisell-lowcode__pos-form",
|
|
50
|
+
key: formItemList
|
|
50
51
|
},
|
|
51
52
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-form-content" }, /* @__PURE__ */ import_react.default.createElement(import_form.default, { formItemList })),
|
|
52
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-form-btn" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { htmlType: "submit", block: true }, import_utils.locales.getText("page.eftpos.text.save"))))
|
|
53
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-form-btn" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { htmlType: "submit", block: true, style: { height: "48px" } }, import_utils.locales.getText("page.eftpos.text.save"))))
|
|
53
54
|
));
|
|
54
55
|
};
|
|
55
56
|
var pos_default = PosForm;
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.css';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 自定义组件设置
|
|
5
|
+
* @description: 自定义组件设置
|
|
6
|
+
* @param {any} commConfig 当前组件配置
|
|
7
|
+
* @param {string} name 上游name(用于嵌套 xxx:{yyy:''})
|
|
8
|
+
* @return {*}
|
|
9
|
+
* @Author: hongbing.wang
|
|
10
|
+
* @Date: 2024-08-20 11:10
|
|
11
|
+
*/
|
|
3
12
|
export declare const getCommName: (commConfig: any, name: string[]) => any;
|
|
13
|
+
/**
|
|
14
|
+
* @title: 自定义组件结果设置
|
|
15
|
+
* @description: 自定义组件结果设置
|
|
16
|
+
* @param {any} commConfig 当前组件配置
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @Author: hongbing.wang
|
|
19
|
+
* @Date: 2024-08-20 11:11
|
|
20
|
+
*/
|
|
4
21
|
export declare const getCommDefaultVal: (commConfig: any) => {
|
|
5
22
|
[x: number]: any;
|
|
6
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* @title: 自定义表单
|
|
26
|
+
* @description: 若干 antd 组件不能满足需求 则可以创建自定义组件
|
|
27
|
+
* @Author: hongbing.wang
|
|
28
|
+
* @Date: 2024-08-20 13:22
|
|
29
|
+
*/
|
|
7
30
|
declare const _default: (props: any) => React.JSX.Element;
|
|
8
31
|
export default _default;
|
|
@@ -39,17 +39,21 @@ var import_react = __toESM(require("react"));
|
|
|
39
39
|
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
40
40
|
var import_index = require("./index.css");
|
|
41
41
|
var getCommName = (commConfig, name) => {
|
|
42
|
+
commConfig.origin.__sourceName = commConfig.origin.name;
|
|
42
43
|
commConfig.top.__sourceName = commConfig.top.name;
|
|
43
44
|
commConfig.left.__sourceName = commConfig.left.name;
|
|
44
45
|
commConfig.right.__sourceName = commConfig.right.name;
|
|
46
|
+
commConfig.origin.name = name.length > 0 ? [...name, commConfig.origin.name] : commConfig.origin.name;
|
|
45
47
|
commConfig.top.name = name.length > 0 ? [...name, commConfig.top.name] : commConfig.top.name;
|
|
46
48
|
commConfig.left.name = name.length > 0 ? [...name, commConfig.left.name] : commConfig.left.name;
|
|
47
49
|
commConfig.right.name = name.length > 0 ? [...name, commConfig.right.name] : commConfig.right.name;
|
|
48
50
|
return commConfig;
|
|
49
51
|
};
|
|
50
52
|
var getCommDefaultVal = (commConfig) => {
|
|
51
|
-
|
|
53
|
+
const top = commConfig.top.input.defaultValue;
|
|
54
|
+
const origin = commConfig.origin.input.defaultValue;
|
|
52
55
|
return {
|
|
56
|
+
[commConfig.origin.__sourceName]: typeof origin === "undefined" ? true : origin,
|
|
53
57
|
[commConfig.top.__sourceName]: typeof top === "undefined" ? true : top,
|
|
54
58
|
[commConfig.left.__sourceName]: commConfig.left.input.defaultValue || 0,
|
|
55
59
|
[commConfig.right.__sourceName]: commConfig.right.input.defaultValue || 0
|
|
@@ -57,9 +61,10 @@ var getCommDefaultVal = (commConfig) => {
|
|
|
57
61
|
};
|
|
58
62
|
var surcharge_default = (props) => {
|
|
59
63
|
var _a, _b, _c, _d;
|
|
60
|
-
const { top, left, right } = props;
|
|
64
|
+
const { origin, top, left, right } = props;
|
|
61
65
|
const leftRef = (0, import_react.useRef)(left.input.default || 0);
|
|
62
66
|
const rightRef = (0, import_react.useRef)(right.input.default || 0);
|
|
67
|
+
const [statusOrigin, setStatusOrigin] = (0, import_react.useState)(origin.input.defaultValue);
|
|
63
68
|
const [status, setStatus] = (0, import_react.useState)(top.input.defaultValue);
|
|
64
69
|
const context = (0, import_useEngineContext.default)();
|
|
65
70
|
const { store } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
@@ -73,7 +78,30 @@ var surcharge_default = (props) => {
|
|
|
73
78
|
const onChangeMoney = (val) => {
|
|
74
79
|
rightRef.current = val;
|
|
75
80
|
};
|
|
76
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_sur_box" }, /* @__PURE__ */ import_react.default.createElement(
|
|
81
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_sur_box" }, /* @__PURE__ */ import_react.default.createElement(
|
|
82
|
+
import_antd.Form.Item,
|
|
83
|
+
{
|
|
84
|
+
label: origin.label,
|
|
85
|
+
name: origin.name,
|
|
86
|
+
rules: origin.rules || [],
|
|
87
|
+
style: origin.style || {}
|
|
88
|
+
},
|
|
89
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
import_antd.Radio.Group,
|
|
91
|
+
{
|
|
92
|
+
value: origin.input.defaultValue,
|
|
93
|
+
onChange: (e) => {
|
|
94
|
+
setStatusOrigin(e.target.value);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical" }, origin.input.options.map((item) => {
|
|
98
|
+
if (typeof item === "object") {
|
|
99
|
+
const { label, value, ...other } = item;
|
|
100
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Radio, { ...other, value, key: `${item.value}` }, label);
|
|
101
|
+
}
|
|
102
|
+
}))
|
|
103
|
+
)
|
|
104
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { style: { display: statusOrigin ? "none" : "contents" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label: top.label, name: top.name, rules: top.rules || [], style: top.style || {} }, /* @__PURE__ */ import_react.default.createElement(import_antd.Radio.Group, { value: top.input.defaultValue, onChange: onValueChange }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical" }, top.input.options.map((item) => {
|
|
77
105
|
if (typeof item === "object") {
|
|
78
106
|
const { label, value, ...other } = item;
|
|
79
107
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Radio, { ...other, value, key: `${item.value}` }, label);
|
|
@@ -83,7 +111,8 @@ var surcharge_default = (props) => {
|
|
|
83
111
|
{
|
|
84
112
|
label: left.label,
|
|
85
113
|
name: left.name,
|
|
86
|
-
rules: left.rules || []
|
|
114
|
+
rules: left.rules || [],
|
|
115
|
+
style: left.style || {}
|
|
87
116
|
},
|
|
88
117
|
/* @__PURE__ */ import_react.default.createElement(
|
|
89
118
|
import_antd.InputNumber,
|
|
@@ -102,7 +131,8 @@ var surcharge_default = (props) => {
|
|
|
102
131
|
{
|
|
103
132
|
label: right.label,
|
|
104
133
|
name: right.name,
|
|
105
|
-
rules: right.rules || []
|
|
134
|
+
rules: right.rules || [],
|
|
135
|
+
style: right.style || {}
|
|
106
136
|
},
|
|
107
137
|
/* @__PURE__ */ import_react.default.createElement(
|
|
108
138
|
import_antd.InputNumber,
|
|
@@ -116,7 +146,7 @@ var surcharge_default = (props) => {
|
|
|
116
146
|
onChange: onChangeMoney
|
|
117
147
|
}
|
|
118
148
|
)
|
|
119
|
-
))) : null);
|
|
149
|
+
))) : null));
|
|
120
150
|
};
|
|
121
151
|
// Annotate the CommonJS export names for ESM import in node:
|
|
122
152
|
0 && (module.exports = {
|
|
@@ -13,5 +13,9 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
13
13
|
onEdit: (device?: DeviceProp | undefined) => void;
|
|
14
14
|
onDel: (id: string | number) => Promise<any>;
|
|
15
15
|
onRepair: (device: DeviceProp) => void;
|
|
16
|
+
onLog: (device: DeviceProp) => void;
|
|
17
|
+
useTyroLog?: boolean | undefined;
|
|
18
|
+
systemConfigStatus?: boolean | undefined;
|
|
19
|
+
onClickByTip: () => void;
|
|
16
20
|
} & React.RefAttributes<unknown>>;
|
|
17
21
|
export default _default;
|
|
@@ -46,7 +46,11 @@ var App = ({
|
|
|
46
46
|
onEdit,
|
|
47
47
|
onDel,
|
|
48
48
|
onRepair,
|
|
49
|
-
|
|
49
|
+
onLog,
|
|
50
|
+
style,
|
|
51
|
+
useTyroLog,
|
|
52
|
+
systemConfigStatus,
|
|
53
|
+
onClickByTip
|
|
50
54
|
}, ref) => {
|
|
51
55
|
const size = (0, import_react.useMemo)(() => {
|
|
52
56
|
if (Array.isArray(tableSize)) {
|
|
@@ -54,10 +58,10 @@ var App = ({
|
|
|
54
58
|
tableSize[0] || 200,
|
|
55
59
|
tableSize[1] || 120,
|
|
56
60
|
tableSize[2] || 120,
|
|
57
|
-
tableSize[3] ||
|
|
61
|
+
tableSize[3] || 260
|
|
58
62
|
];
|
|
59
63
|
}
|
|
60
|
-
return [200, 120, 120,
|
|
64
|
+
return [200, 120, 120, 260];
|
|
61
65
|
}, [tableSize]);
|
|
62
66
|
const totalSize = (0, import_react.useMemo)(() => {
|
|
63
67
|
return size.reduce(
|
|
@@ -116,8 +120,16 @@ var App = ({
|
|
|
116
120
|
...setting || {}
|
|
117
121
|
});
|
|
118
122
|
};
|
|
119
|
-
const
|
|
120
|
-
|
|
123
|
+
const onLogDevice = (device) => {
|
|
124
|
+
const { connection, setting, ...other } = device;
|
|
125
|
+
onLog({
|
|
126
|
+
...other,
|
|
127
|
+
...connection || {},
|
|
128
|
+
...setting || {}
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const onDelDevice = (device) => {
|
|
132
|
+
deviceRef.current = device.id;
|
|
121
133
|
setModalOpen(true);
|
|
122
134
|
};
|
|
123
135
|
const onChangeSize = (num) => {
|
|
@@ -142,8 +154,25 @@ var App = ({
|
|
|
142
154
|
...style || {}
|
|
143
155
|
}
|
|
144
156
|
},
|
|
157
|
+
type === "windcave" && !systemConfigStatus ? /* @__PURE__ */ import_react.default.createElement(
|
|
158
|
+
import_antd.Alert,
|
|
159
|
+
{
|
|
160
|
+
message: import_utils.locales.getText("page.eftpos.text.setting.tip"),
|
|
161
|
+
type: "error",
|
|
162
|
+
style: { margin: "10px 0 0 0" },
|
|
163
|
+
action: /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", type: "text", onClick: onClickByTip }, import_utils.locales.getText("page.eftpos.text.setting.btn"))
|
|
164
|
+
}
|
|
165
|
+
) : null,
|
|
145
166
|
/* @__PURE__ */ import_react.default.createElement(Title, { level: 4, className: "pisell-lowcode__pos-title" }, eftposName, " ", import_utils.locales.getText("page.eftpos.text.device")),
|
|
146
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-table-act" }, /* @__PURE__ */ import_react.default.createElement(Text, null, import_utils.locales.getText("page.eftpos.text.device.list")), /* @__PURE__ */ import_react.default.createElement(
|
|
167
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-table-act" }, /* @__PURE__ */ import_react.default.createElement(Text, null, import_utils.locales.getText("page.eftpos.text.device.list")), /* @__PURE__ */ import_react.default.createElement(
|
|
168
|
+
import_antd.Button,
|
|
169
|
+
{
|
|
170
|
+
type: "primary",
|
|
171
|
+
onClick: onAddDevice,
|
|
172
|
+
style: { height: "48px" }
|
|
173
|
+
},
|
|
174
|
+
import_utils.locales.getText("page.eftpos.text.device.add")()
|
|
175
|
+
)),
|
|
147
176
|
/* @__PURE__ */ import_react.default.createElement(
|
|
148
177
|
import_antd.Table,
|
|
149
178
|
{
|
|
@@ -152,7 +181,7 @@ var App = ({
|
|
|
152
181
|
pagination: false,
|
|
153
182
|
loading,
|
|
154
183
|
bordered: true,
|
|
155
|
-
scroll: { y: "600px", x:
|
|
184
|
+
scroll: { y: "600px", x: "100%" },
|
|
156
185
|
tableLayout: "fixed"
|
|
157
186
|
},
|
|
158
187
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -191,6 +220,9 @@ var App = ({
|
|
|
191
220
|
if (!setting) {
|
|
192
221
|
return /* @__PURE__ */ import_react.default.createElement(Text, null, "-");
|
|
193
222
|
}
|
|
223
|
+
if (setting.useOriginSurcharge) {
|
|
224
|
+
return /* @__PURE__ */ import_react.default.createElement(Text, null, "-");
|
|
225
|
+
}
|
|
194
226
|
const array = [
|
|
195
227
|
setting.constant_rate ? setting.constant_rate + "%" : "",
|
|
196
228
|
setting.constant_money
|
|
@@ -210,7 +242,7 @@ var App = ({
|
|
|
210
242
|
width: size[3],
|
|
211
243
|
key: "opeartion",
|
|
212
244
|
className: "pisell-lowcode__pos-table-col",
|
|
213
|
-
render: (record) => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "middle" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onRepairDevice(record) }, import_utils.locales.getText("page.eftpos.text.repair")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onEditDevice(record) }, import_utils.locales.getText("page.eftpos.text.edit")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onDelDevice(record) }, import_utils.locales.getText("page.eftpos.text.delete")))
|
|
245
|
+
render: (record) => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "middle" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onRepairDevice(record) }, import_utils.locales.getText("page.eftpos.text.repair")), useTyroLog && type === "tyro" ? /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onLogDevice(record) }, import_utils.locales.getText("page.eftpos.text.log")) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onEditDevice(record) }, import_utils.locales.getText("page.eftpos.text.edit")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onDelDevice(record) }, import_utils.locales.getText("page.eftpos.text.delete")))
|
|
214
246
|
}
|
|
215
247
|
)
|
|
216
248
|
),
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PosProps } from './const';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 支付金额信息配置页
|
|
5
|
+
* @description: 配置支付金额与手续费
|
|
6
|
+
* @return React.Element
|
|
7
|
+
* @Author: hongbing.wang
|
|
8
|
+
* @Date: 2024-08-12 11:35
|
|
9
|
+
*/
|
|
3
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isIpad, net, }: {
|
|
4
11
|
className?: string | undefined;
|
|
5
12
|
onChange?: ((status: "page" | "success" | "fail", params?: string | {
|
|
@@ -11,4 +18,3 @@ declare const _default: ({ className, onChange, onClose, formatAmount, isIpad, n
|
|
|
11
18
|
net: boolean;
|
|
12
19
|
}) => React.JSX.Element;
|
|
13
20
|
export default _default;
|
|
14
|
-
export declare const limitDecimals: (value: any) => any;
|
|
@@ -29,8 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/eftposPay/amount.tsx
|
|
30
30
|
var amount_exports = {};
|
|
31
31
|
__export(amount_exports, {
|
|
32
|
-
default: () => amount_default
|
|
33
|
-
limitDecimals: () => limitDecimals
|
|
32
|
+
default: () => amount_default
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(amount_exports);
|
|
36
35
|
var import_utils = require("@pisell/utils");
|
|
@@ -40,6 +39,7 @@ var import_react = __toESM(require("react"));
|
|
|
40
39
|
var import_alert = __toESM(require("./component/alert"));
|
|
41
40
|
var import_titlebar = __toESM(require("./component/header/titlebar"));
|
|
42
41
|
var import_manufacturer = require("./manufacturer");
|
|
42
|
+
var import_helper = require("./helper");
|
|
43
43
|
var import_store = require("./store");
|
|
44
44
|
var amount_default = ({
|
|
45
45
|
className = "",
|
|
@@ -58,8 +58,9 @@ var amount_default = ({
|
|
|
58
58
|
money,
|
|
59
59
|
amount: lastMoney,
|
|
60
60
|
surRate,
|
|
61
|
-
surMoney
|
|
62
|
-
|
|
61
|
+
surMoney,
|
|
62
|
+
useOriginSurcharge
|
|
63
|
+
} = (0, import_manufacturer.getAmonunt)(store);
|
|
63
64
|
const [curSurRate, setSurRate] = (0, import_react.useState)(surRate);
|
|
64
65
|
const [curSurMoney, setSurMoney] = (0, import_react.useState)(surMoney);
|
|
65
66
|
const [currentMoney, setCurrentMoney] = (0, import_react.useState)(lastMoney);
|
|
@@ -86,9 +87,6 @@ var amount_default = ({
|
|
|
86
87
|
const currentMoneyDeci = new import_decimal.Decimal(currentMoney);
|
|
87
88
|
return moneyDeci.sub(currentMoneyDeci).toFixed(2, import_decimal.Decimal.ROUND_HALF_UP);
|
|
88
89
|
}, [currentMoney, money]);
|
|
89
|
-
const onBack = () => {
|
|
90
|
-
setStatus(true);
|
|
91
|
-
};
|
|
92
90
|
const onSubmit = () => {
|
|
93
91
|
if (!status) {
|
|
94
92
|
setStatus(true);
|
|
@@ -119,7 +117,7 @@ var amount_default = ({
|
|
|
119
117
|
console.log("surRateMoney = ", surRateMoney);
|
|
120
118
|
dispatch(
|
|
121
119
|
(0, import_store.updateState)({
|
|
122
|
-
|
|
120
|
+
pay
|
|
123
121
|
})
|
|
124
122
|
);
|
|
125
123
|
dispatch((0, import_store.updateComponent)(""));
|
|
@@ -137,14 +135,7 @@ var amount_default = ({
|
|
|
137
135
|
setTempSurRate(curSurRate);
|
|
138
136
|
setTempSurMoney(curSurMoney);
|
|
139
137
|
};
|
|
140
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-amount ${className}` }, isIpad ? null : /* @__PURE__ */ import_react.default.createElement(
|
|
141
|
-
import_titlebar.default,
|
|
142
|
-
{
|
|
143
|
-
type: "left-title-close",
|
|
144
|
-
onClose
|
|
145
|
-
},
|
|
146
|
-
status ? name : import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.title")
|
|
147
|
-
), status ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
138
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-amount ${className}` }, isIpad ? null : /* @__PURE__ */ import_react.default.createElement(import_titlebar.default, { type: "left-title-close", onClose }, status ? name : import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.title")), status ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
148
139
|
"div",
|
|
149
140
|
{
|
|
150
141
|
className: "pisell-lowcode__eft-pay-cash",
|
|
@@ -160,8 +151,8 @@ var amount_default = ({
|
|
|
160
151
|
min: 0,
|
|
161
152
|
style: { width: "100%" },
|
|
162
153
|
value: currentMoney,
|
|
163
|
-
formatter: limitDecimals,
|
|
164
|
-
parser: limitDecimals,
|
|
154
|
+
formatter: import_helper.limitDecimals,
|
|
155
|
+
parser: import_helper.limitDecimals,
|
|
165
156
|
onChange: (event) => {
|
|
166
157
|
if (event !== null && event !== void 0) {
|
|
167
158
|
setCurrentMoney(event || 0);
|
|
@@ -176,7 +167,7 @@ var amount_default = ({
|
|
|
176
167
|
"page.eftpos-pay.text.surcharge.edit.actual.pay"
|
|
177
168
|
), ":", formatAmount(`${total}`, 2, symbol)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money" }, import_utils.locales.getText(
|
|
178
169
|
"page.eftpos-pay.text.surcharge.edit.inc.surcharge"
|
|
179
|
-
), ": ", formatAmount(`${totalSurMoney}`, 2, symbol), " (", import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.rate"), ":", curSurRate, "% + ", formatAmount(`${curSurMoney}`, 2, symbol), ")")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: onEdit }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.surcharge")))) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(import_alert.default, null, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage-fixed")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-form" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item-title" }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage")), /* @__PURE__ */ import_react.default.createElement(
|
|
170
|
+
), ": ", formatAmount(`${totalSurMoney}`, 2, symbol), " (", import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.rate"), ":", curSurRate, "% + ", formatAmount(`${curSurMoney}`, 2, symbol), ")")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: onEdit, disabled: useOriginSurcharge }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.surcharge")))) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(import_alert.default, null, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage-fixed")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-form" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item-title" }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage")), /* @__PURE__ */ import_react.default.createElement(
|
|
180
171
|
import_antd.InputNumber,
|
|
181
172
|
{
|
|
182
173
|
value: tempSurRate,
|
|
@@ -222,17 +213,3 @@ var amount_default = ({
|
|
|
222
213
|
import_utils.locales.getText("page.eftpos-pay.text.sure")
|
|
223
214
|
)));
|
|
224
215
|
};
|
|
225
|
-
var limitDecimals = (value) => {
|
|
226
|
-
const reg = /^(\-)*(\d+)\.(\d\d).*$/;
|
|
227
|
-
if (typeof value === "string") {
|
|
228
|
-
return !isNaN(Number(value)) ? value.replace(reg, "$1$2.$3") : "";
|
|
229
|
-
}
|
|
230
|
-
if (typeof value === "number") {
|
|
231
|
-
return !isNaN(value) ? String(value).replace(reg, "$1$2.$3") : "";
|
|
232
|
-
}
|
|
233
|
-
return "";
|
|
234
|
-
};
|
|
235
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
236
|
-
0 && (module.exports = {
|
|
237
|
-
limitDecimals
|
|
238
|
-
});
|
|
@@ -42,7 +42,17 @@ var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
|
42
42
|
var import_store = require("../../store");
|
|
43
43
|
var import_header = __toESM(require("../header"));
|
|
44
44
|
var failCustom_default = ({ className = "", isIpad, onChange }) => {
|
|
45
|
-
const {
|
|
45
|
+
const {
|
|
46
|
+
eftpos,
|
|
47
|
+
custom,
|
|
48
|
+
mode,
|
|
49
|
+
name,
|
|
50
|
+
symbol,
|
|
51
|
+
amount,
|
|
52
|
+
order_id,
|
|
53
|
+
number,
|
|
54
|
+
device
|
|
55
|
+
} = (0, import_store.useContextData)();
|
|
46
56
|
const failCustom = custom == null ? void 0 : custom.failCustom;
|
|
47
57
|
const dispatch = (0, import_store.useDispatch)();
|
|
48
58
|
const onRetry = () => {
|
|
@@ -51,7 +61,7 @@ var failCustom_default = ({ className = "", isIpad, onChange }) => {
|
|
|
51
61
|
(0, import_store.updateState)(
|
|
52
62
|
(0, import_manufacturer.getInitState)(
|
|
53
63
|
eftpos,
|
|
54
|
-
mode === import_const.ModeEnum.Query ? {
|
|
64
|
+
mode === import_const.ModeEnum.Query ? { mode, name, symbol, amount, order_id } : { mode, name, symbol, amount, order_id, number: "" }
|
|
55
65
|
)
|
|
56
66
|
)
|
|
57
67
|
);
|
|
@@ -59,7 +69,14 @@ var failCustom_default = ({ className = "", isIpad, onChange }) => {
|
|
|
59
69
|
const onModify = () => {
|
|
60
70
|
dispatch(
|
|
61
71
|
(0, import_store.updateState)(
|
|
62
|
-
(0, import_manufacturer.getInitState)(eftpos, {
|
|
72
|
+
(0, import_manufacturer.getInitState)(eftpos, {
|
|
73
|
+
mode,
|
|
74
|
+
name,
|
|
75
|
+
symbol,
|
|
76
|
+
amount,
|
|
77
|
+
order_id,
|
|
78
|
+
number: ""
|
|
79
|
+
})
|
|
63
80
|
)
|
|
64
81
|
);
|
|
65
82
|
onChange("page", "amount");
|
|
@@ -68,15 +85,19 @@ var failCustom_default = ({ className = "", isIpad, onChange }) => {
|
|
|
68
85
|
dispatch(
|
|
69
86
|
(0, import_store.updateState)({
|
|
70
87
|
manual: {
|
|
71
|
-
title: import_utils.locales.getText("page.eftpos-pay.text.request.title")(
|
|
72
|
-
|
|
88
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.request.unknown.title")(
|
|
89
|
+
mode
|
|
90
|
+
),
|
|
91
|
+
text: import_utils.locales.getText("page.eftpos-pay.text.request.unknown.text")(
|
|
92
|
+
mode
|
|
93
|
+
)
|
|
73
94
|
}
|
|
74
95
|
})
|
|
75
96
|
);
|
|
76
97
|
dispatch((0, import_store.updateComponent)("Manual"));
|
|
77
98
|
};
|
|
78
99
|
const onClose = () => {
|
|
79
|
-
onChange("fail");
|
|
100
|
+
onChange("fail", { number, device, order_id });
|
|
80
101
|
};
|
|
81
102
|
(0, import_ahooks.useMount)(() => {
|
|
82
103
|
if ((failCustom == null ? void 0 : failCustom.status) === "fail") {
|
|
@@ -42,30 +42,47 @@ var import_store = require("../../store");
|
|
|
42
42
|
var import_header = __toESM(require("../header"));
|
|
43
43
|
var fail_default = ({ onChange, className = "", isIpad }) => {
|
|
44
44
|
var _a, _b;
|
|
45
|
-
const {
|
|
45
|
+
const {
|
|
46
|
+
eftpos,
|
|
47
|
+
step,
|
|
48
|
+
steps,
|
|
49
|
+
mode,
|
|
50
|
+
name,
|
|
51
|
+
symbol,
|
|
52
|
+
amount,
|
|
53
|
+
order_id,
|
|
54
|
+
number,
|
|
55
|
+
device
|
|
56
|
+
} = (0, import_store.useContextData)();
|
|
46
57
|
const isPosNetworkError = ((_b = (_a = steps[step]) == null ? void 0 : _a.custom) == null ? void 0 : _b.isPosNetworkError) || false;
|
|
47
58
|
const dispatch = (0, import_store.useDispatch)();
|
|
48
59
|
const onRetry = () => {
|
|
49
60
|
onChange("page", "pay");
|
|
50
61
|
dispatch(
|
|
51
|
-
(0, import_store.updateState)(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
(0, import_store.updateState)(
|
|
63
|
+
(0, import_manufacturer.getInitState)(eftpos, {
|
|
64
|
+
mode,
|
|
65
|
+
name,
|
|
66
|
+
symbol,
|
|
67
|
+
amount,
|
|
68
|
+
order_id,
|
|
69
|
+
number: ""
|
|
70
|
+
})
|
|
71
|
+
)
|
|
58
72
|
);
|
|
59
73
|
};
|
|
60
74
|
const onModify = () => {
|
|
61
75
|
dispatch(
|
|
62
|
-
(0, import_store.updateState)(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
(0, import_store.updateState)(
|
|
77
|
+
(0, import_manufacturer.getInitState)(eftpos, {
|
|
78
|
+
mode,
|
|
79
|
+
name,
|
|
80
|
+
symbol,
|
|
81
|
+
amount,
|
|
82
|
+
order_id,
|
|
83
|
+
number: ""
|
|
84
|
+
})
|
|
85
|
+
)
|
|
69
86
|
);
|
|
70
87
|
onChange("page", "amount");
|
|
71
88
|
};
|
|
@@ -73,15 +90,19 @@ var fail_default = ({ onChange, className = "", isIpad }) => {
|
|
|
73
90
|
dispatch(
|
|
74
91
|
(0, import_store.updateState)({
|
|
75
92
|
manual: {
|
|
76
|
-
title: import_utils.locales.getText("page.eftpos-pay.text.
|
|
77
|
-
|
|
93
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.request.unknown.title")(
|
|
94
|
+
mode
|
|
95
|
+
),
|
|
96
|
+
text: import_utils.locales.getText("page.eftpos-pay.text.request.unknown.text")(
|
|
97
|
+
mode
|
|
98
|
+
)
|
|
78
99
|
}
|
|
79
100
|
})
|
|
80
101
|
);
|
|
81
102
|
dispatch((0, import_store.updateComponent)("Manual"));
|
|
82
103
|
};
|
|
83
104
|
const onClose = () => {
|
|
84
|
-
onChange("fail");
|
|
105
|
+
onChange("fail", { number, device, order_id });
|
|
85
106
|
};
|
|
86
107
|
(0, import_ahooks.useMount)(() => {
|
|
87
108
|
if (steps[step].status === "fail") {
|
|
@@ -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:40
|
|
7
|
+
*/
|
|
3
8
|
declare const _default: ({ className }: ActionProps) => React.JSX.Element;
|
|
4
9
|
export default _default;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 支付状态未知页面
|
|
5
|
+
* @description:
|
|
6
|
+
* @Author: hongbing.wang
|
|
7
|
+
* @Date: 2024-08-20 11:42
|
|
8
|
+
*/
|
|
3
9
|
declare const _default: ({ className }: ActionProps) => React.JSX.Element;
|
|
4
10
|
export default _default;
|