@pisell/private-materials 6.4.51 → 6.4.53
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 +12 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/amount.js +3 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +9 -9
- package/es/components/checkout/components/PaymentOptionsModule/index.js +4 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +4 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +35 -13
- package/es/components/eftposPay/payo/config.js +10 -10
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +20 -10
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/amount.js +1 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +0 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +3 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +4 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +43 -11
- package/lib/components/eftposPay/payo/config.js +9 -9
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +61 -27
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/package.json +12 -12
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -450,7 +450,9 @@ var getSurcharge = function getSurcharge(state, options) {
|
|
|
450
450
|
if (!isEdit && bookingId) {
|
|
451
451
|
if (Array.isArray(bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.surcharge)) {
|
|
452
452
|
var _state$bookingDetail3;
|
|
453
|
-
return (((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.surcharge) || []).
|
|
453
|
+
return (((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.surcharge) || []).filter(function (d) {
|
|
454
|
+
return Number(d.amount) > 0;
|
|
455
|
+
}).map(function (d, index) {
|
|
454
456
|
return {
|
|
455
457
|
key: "custom_surcharge_".concat(index),
|
|
456
458
|
label: d.name[state.locale || 'en'] || d.name['en'] || d.name['original'],
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -105,4 +106,11 @@ export declare const walkInData: {
|
|
|
105
106
|
id: number;
|
|
106
107
|
nickname: string;
|
|
107
108
|
};
|
|
108
|
-
export declare const Provider: any, Context:
|
|
109
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
110
|
+
state: FormState;
|
|
111
|
+
} & {
|
|
112
|
+
dispatch: (params: {
|
|
113
|
+
type: string;
|
|
114
|
+
payload: any;
|
|
115
|
+
}) => void;
|
|
116
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -121,35 +121,35 @@ export function CashPaymentModule(_ref) {
|
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
setAmount('');
|
|
124
|
-
_context.next =
|
|
124
|
+
_context.next = 32;
|
|
125
125
|
break;
|
|
126
126
|
case 13:
|
|
127
127
|
// 移除可能的货币符号和多余空格
|
|
128
128
|
cleanValue = finalValue.replace(/[$\s]/g, '');
|
|
129
129
|
numValue = parseFloat(cleanValue); // 检查当前金额是否等于剩余支付金额
|
|
130
|
-
debugger
|
|
130
|
+
// debugger
|
|
131
131
|
// 需要确认当前是否是定金模式,如果是定金模式则 balanceDue 应该为完整订单剩余待付金额
|
|
132
132
|
balanceDue = parseFloat(orderInfo !== null && orderInfo !== void 0 && orderInfo.isDeposit ? balanceDueTotalAmount || '0' : balanceDueAmount);
|
|
133
133
|
shouldApplyRounding = Math.abs(numValue - balanceDue) < 0.01; // 使用小数精度比较
|
|
134
134
|
finalAmount = numValue;
|
|
135
135
|
roundingDiff = 0;
|
|
136
136
|
if (!(shouldApplyRounding && roundingFunction)) {
|
|
137
|
-
_context.next =
|
|
137
|
+
_context.next = 29;
|
|
138
138
|
break;
|
|
139
139
|
}
|
|
140
|
-
_context.next =
|
|
140
|
+
_context.next = 22;
|
|
141
141
|
return roundingFunction(numValue);
|
|
142
|
-
case
|
|
142
|
+
case 22:
|
|
143
143
|
_result = _context.sent;
|
|
144
144
|
_ref3 = _result || {}, _ref3$roundedAmount = _ref3.roundedAmount, roundedAmount = _ref3$roundedAmount === void 0 ? numValue : _ref3$roundedAmount, _ref3$roundingDiffere = _ref3.roundingDifference, roundingDifference = _ref3$roundingDiffere === void 0 ? 0 : _ref3$roundingDiffere;
|
|
145
145
|
finalAmount = roundedAmount;
|
|
146
146
|
roundingDiff = roundingDifference;
|
|
147
147
|
console.log('应用抹零:', numValue, '->', roundedAmount, '差额:', roundingDifference);
|
|
148
|
-
_context.next =
|
|
148
|
+
_context.next = 30;
|
|
149
149
|
break;
|
|
150
|
-
case
|
|
150
|
+
case 29:
|
|
151
151
|
console.log('不应用抹零,用户输入金额:', numValue, '剩余支付金额:', balanceDue);
|
|
152
|
-
case
|
|
152
|
+
case 30:
|
|
153
153
|
setRoundingAmount(roundingDiff);
|
|
154
154
|
if (isNaN(numValue)) {
|
|
155
155
|
setAmount('');
|
|
@@ -157,7 +157,7 @@ export function CashPaymentModule(_ref) {
|
|
|
157
157
|
setAmount(finalAmount.toString());
|
|
158
158
|
console.log('设置金额为:', finalAmount);
|
|
159
159
|
}
|
|
160
|
-
case
|
|
160
|
+
case 32:
|
|
161
161
|
case "end":
|
|
162
162
|
return _context.stop();
|
|
163
163
|
}
|
|
@@ -57,7 +57,10 @@ function PaymentOptionsModule(_ref) {
|
|
|
57
57
|
onClick(method);
|
|
58
58
|
}
|
|
59
59
|
}, {
|
|
60
|
-
wait:
|
|
60
|
+
wait: 1000,
|
|
61
|
+
// 500ms 防抖延迟
|
|
62
|
+
leading: true,
|
|
63
|
+
trailing: false
|
|
61
64
|
}),
|
|
62
65
|
handlePaymentClick = _useDebounceFn.run;
|
|
63
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
|
|
|
17
17
|
cardData: any;
|
|
18
18
|
handleSelectWallet: (value: number[]) => void;
|
|
19
19
|
selectedWalletIds: any[];
|
|
20
|
-
expiredWalletIds: any
|
|
20
|
+
expiredWalletIds: any;
|
|
21
21
|
expiredWalletData: any;
|
|
22
22
|
disabledWalletData: any[];
|
|
23
23
|
clearAllSelectedWallet: () => void;
|
|
@@ -393,7 +393,10 @@ export var useWalletPass = function useWalletPass(props) {
|
|
|
393
393
|
|
|
394
394
|
// 更新不可用钱包数据
|
|
395
395
|
setDisabledWalletData(isDisabledData);
|
|
396
|
-
var newValues =
|
|
396
|
+
var newValues = _toConsumableArray(selectedWalletRef.current);
|
|
397
|
+
if (isAvailableData.length === 1) {
|
|
398
|
+
newValues = [].concat(_toConsumableArray(selectedWalletRef.current), isAvailableData);
|
|
399
|
+
}
|
|
397
400
|
setSearchIdentificationCodeList(cachedSearchResults);
|
|
398
401
|
setWalletSelect(newValues);
|
|
399
402
|
handleFetchUserIdentificationCodes(newValues.map(function (item) {
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -4,13 +4,14 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import { getUniqueId, locales, sendWarningLog } from '@pisell/utils';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
7
8
|
import { useDispatch, updateCustom, updateStatus, updateState } from "../../store";
|
|
8
9
|
import { useFail, useStoreRef } from "../../hooks";
|
|
9
10
|
import { ModeEnum, PayStatus, StatusEnum } from "../../const";
|
|
10
11
|
import { LinklyActionStatus } from "../const";
|
|
11
12
|
|
|
12
13
|
// 全局超时时间
|
|
13
|
-
var GlobalTimeout = 1000 * 60;
|
|
14
|
+
var GlobalTimeout = 1000 * 60 * 2;
|
|
14
15
|
// 单次请求超时时间
|
|
15
16
|
var RequestTimeout = 1000 * 5;
|
|
16
17
|
export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, handleLinklySuccess) {
|
|
@@ -18,7 +19,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
18
19
|
var _useStoreRef = useStoreRef(),
|
|
19
20
|
numRef = _useStoreRef.numRef,
|
|
20
21
|
modeRef = _useStoreRef.modeRef,
|
|
21
|
-
deviceRef = _useStoreRef.deviceRef
|
|
22
|
+
deviceRef = _useStoreRef.deviceRef,
|
|
23
|
+
orderIdRef = _useStoreRef.orderIdRef;
|
|
22
24
|
var fail = useFail(0);
|
|
23
25
|
var failRef = useRef(fail);
|
|
24
26
|
var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
|
|
@@ -82,7 +84,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
82
84
|
console.log('Success: 全局超时或不需要处理结果,终止查询');
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
85
|
-
_log("Success", result);
|
|
86
87
|
isQueryFinishedRef.current = true;
|
|
87
88
|
var data = (result === null || result === void 0 ? void 0 : result.data) || {};
|
|
88
89
|
// 交易成功,终止查询
|
|
@@ -103,8 +104,11 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
103
104
|
// 交易状态为0,且不需要签名,则继续查询
|
|
104
105
|
if ((data === null || data === void 0 ? void 0 : data.status) == 0 && (data === null || data === void 0 ? void 0 : data.signature_flag) != 1) {
|
|
105
106
|
console.log('交易状态为0需要继续查询');
|
|
107
|
+
_log("Querying", result);
|
|
106
108
|
isQueryFinishedRef.current = false;
|
|
107
|
-
|
|
109
|
+
setTimeout(function () {
|
|
110
|
+
_resultQuery();
|
|
111
|
+
}, 1500);
|
|
108
112
|
return;
|
|
109
113
|
}
|
|
110
114
|
|
|
@@ -153,7 +157,20 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
153
157
|
_log("AbortError");
|
|
154
158
|
console.log('Error: 请求被取消,将继续查询');
|
|
155
159
|
isQueryFinishedRef.current = false;
|
|
156
|
-
|
|
160
|
+
setTimeout(function () {
|
|
161
|
+
_resultQuery();
|
|
162
|
+
}, 1500);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 网关类报错,继续查询
|
|
167
|
+
if (!(error !== null && error !== void 0 && error.code) || "".concat(error.code) === PayStatus.Timeout) {
|
|
168
|
+
_log("NetworkError");
|
|
169
|
+
console.log('Error: 网关类报错,将继续查询');
|
|
170
|
+
isQueryFinishedRef.current = false;
|
|
171
|
+
setTimeout(function () {
|
|
172
|
+
_resultQuery();
|
|
173
|
+
}, 1500);
|
|
157
174
|
return;
|
|
158
175
|
}
|
|
159
176
|
_log("Error", error);
|
|
@@ -243,20 +260,25 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
243
260
|
session_id: numRef.current
|
|
244
261
|
};
|
|
245
262
|
var content = [{
|
|
246
|
-
key: '
|
|
247
|
-
value: JSON.stringify(
|
|
263
|
+
key: 'description',
|
|
264
|
+
value: JSON.stringify({
|
|
265
|
+
queryId: queryIdRef.current,
|
|
266
|
+
orderId: orderIdRef.current,
|
|
267
|
+
type: type,
|
|
268
|
+
date: dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
269
|
+
})
|
|
248
270
|
}, {
|
|
249
271
|
key: 'params',
|
|
250
272
|
value: JSON.stringify(params)
|
|
251
273
|
}];
|
|
252
|
-
if (type === "
|
|
274
|
+
if (type === "Error") {
|
|
253
275
|
content.push({
|
|
254
|
-
key: '
|
|
276
|
+
key: 'error',
|
|
255
277
|
value: JSON.stringify(res)
|
|
256
278
|
});
|
|
257
|
-
} else
|
|
279
|
+
} else {
|
|
258
280
|
content.push({
|
|
259
|
-
key: '
|
|
281
|
+
key: 'response',
|
|
260
282
|
value: JSON.stringify(res)
|
|
261
283
|
});
|
|
262
284
|
}
|
|
@@ -268,8 +290,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
268
290
|
var run = function run() {
|
|
269
291
|
// 重置状态
|
|
270
292
|
reset();
|
|
271
|
-
console.log('开始查询linkly结果---->>>>>>>');
|
|
272
|
-
_log("Start");
|
|
273
293
|
|
|
274
294
|
// 设置全局超时定时器
|
|
275
295
|
globalTimeoutIdRef.current = setTimeout(function () {
|
|
@@ -285,6 +305,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
|
|
|
285
305
|
startTimeRef.current = Date.now();
|
|
286
306
|
isQueryFinishedRef.current = false;
|
|
287
307
|
queryIdRef.current = getUniqueId();
|
|
308
|
+
console.log('开始查询linkly结果---->>>>>>>');
|
|
309
|
+
_log("Start");
|
|
288
310
|
return _resultQuery();
|
|
289
311
|
};
|
|
290
312
|
return {
|
|
@@ -152,15 +152,15 @@ export var POS = function POS(_ref) {
|
|
|
152
152
|
controllerRef.current = new AbortController();
|
|
153
153
|
// 支付 or 退款
|
|
154
154
|
var resultPromise = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay ? api.pay(_objectSpread(_objectSpread({}, custom !== null && custom !== void 0 && custom.platform ? {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
operator_id: custom.operator_id,
|
|
156
|
+
operator_type: custom.operator_type,
|
|
157
|
+
platform: custom.platform,
|
|
158
|
+
custom_payment_id: custom.custom_payment_id,
|
|
159
|
+
service_charge: {
|
|
160
|
+
amount: payRef.current.surMoney,
|
|
161
|
+
percentage: payRef.current.surPercentRate
|
|
162
162
|
},
|
|
163
|
-
|
|
163
|
+
original_amount: payRef.current.amount
|
|
164
164
|
} : {}), {}, {
|
|
165
165
|
order_id: orderIdRef.current,
|
|
166
166
|
amount: payRef.current.total,
|
|
@@ -199,8 +199,8 @@ export var POS = function POS(_ref) {
|
|
|
199
199
|
if (unloadRef.current || !netRef.current) {
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
|
-
// 支付接口超时
|
|
203
|
-
if (err && "".concat(err.code) === PayStatus.Timeout) {
|
|
202
|
+
// 支付接口超时 进行支付状态查询(超时或者其它错误)
|
|
203
|
+
if (!(err !== null && err !== void 0 && err.code) || "".concat(err.code) === PayStatus.Timeout) {
|
|
204
204
|
checkApi();
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
301
|
-
action?: "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -28,4 +29,11 @@ export interface PayGroup {
|
|
|
28
29
|
pay_number?: string;
|
|
29
30
|
_order: any;
|
|
30
31
|
}
|
|
31
|
-
export declare const Provider: any, Context:
|
|
32
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
33
|
+
state: FormState;
|
|
34
|
+
} & {
|
|
35
|
+
dispatch: (params: {
|
|
36
|
+
type: string;
|
|
37
|
+
payload: any;
|
|
38
|
+
}) => void;
|
|
39
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
|
@@ -16,6 +16,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
16
16
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { Tooltip } from 'antd';
|
|
19
20
|
import { useControllableValue } from 'ahooks';
|
|
20
21
|
//@ts-ignore
|
|
21
22
|
import { merge, omit } from 'lodash';
|
|
@@ -232,15 +233,21 @@ var CashKeyboardIntact = function CashKeyboardIntact(props) {
|
|
|
232
233
|
className: "pisell-cash-keyboard-intact-container-top-label"
|
|
233
234
|
}, mergedDisplayField.balanceDue.label), /*#__PURE__*/React.createElement("div", {
|
|
234
235
|
className: "pisell-cash-keyboard-intact-container-top-value"
|
|
236
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
237
|
+
title: formatAmountWithOptions(originalValue || '', amountSymbol, {
|
|
238
|
+
precision: 2,
|
|
239
|
+
hideDecimalForWholeNumbers: false,
|
|
240
|
+
showCurrencySymbol: true
|
|
241
|
+
})
|
|
235
242
|
}, /*#__PURE__*/React.createElement(AutoResizeText, {
|
|
236
243
|
minFontSizePx: 10,
|
|
237
|
-
maxFontSizePx:
|
|
244
|
+
maxFontSizePx: 18,
|
|
238
245
|
fontSizePrecisionPx: 0.5
|
|
239
246
|
}, formatAmountWithOptions(originalValue || '', amountSymbol, {
|
|
240
247
|
precision: 2,
|
|
241
248
|
hideDecimalForWholeNumbers: false,
|
|
242
249
|
showCurrencySymbol: true
|
|
243
|
-
})))), ((_mergedDisplayField$c = mergedDisplayField.cashReceived) === null || _mergedDisplayField$c === void 0 ? void 0 : _mergedDisplayField$c.visible) && /*#__PURE__*/React.createElement("div", {
|
|
250
|
+
}))))), ((_mergedDisplayField$c = mergedDisplayField.cashReceived) === null || _mergedDisplayField$c === void 0 ? void 0 : _mergedDisplayField$c.visible) && /*#__PURE__*/React.createElement("div", {
|
|
244
251
|
style: _objectSpread(_objectSpread({}, getGridStyle(1)), {}, {
|
|
245
252
|
padding: '6px 16px',
|
|
246
253
|
borderRadius: '8px',
|
|
@@ -265,16 +272,12 @@ var CashKeyboardIntact = function CashKeyboardIntact(props) {
|
|
|
265
272
|
color: '#667085'
|
|
266
273
|
}
|
|
267
274
|
}, mergedDisplayField.cashReceived.label),
|
|
268
|
-
value: internalValue ?
|
|
269
|
-
minFontSizePx: 10,
|
|
270
|
-
maxFontSizePx: 14,
|
|
271
|
-
fontSizePrecisionPx: 0.5
|
|
272
|
-
}, formatAmountWithOptions(internalValue || '', amountSymbol, {
|
|
275
|
+
value: internalValue ? formatAmountWithOptions(internalValue || '', amountSymbol, {
|
|
273
276
|
value: internalValue,
|
|
274
277
|
hideDecimalForWholeNumbers: false,
|
|
275
278
|
precision: 2,
|
|
276
279
|
showCurrencySymbol: true
|
|
277
|
-
})
|
|
280
|
+
}) : '',
|
|
278
281
|
height: 30,
|
|
279
282
|
fontSize: 20,
|
|
280
283
|
placeholder: placeholder,
|
|
@@ -294,16 +297,23 @@ var CashKeyboardIntact = function CashKeyboardIntact(props) {
|
|
|
294
297
|
className: "pisell-cash-keyboard-intact-container-top-label"
|
|
295
298
|
}, mergedDisplayField.changeDue.label), /*#__PURE__*/React.createElement("div", {
|
|
296
299
|
className: "pisell-cash-keyboard-intact-container-top-value"
|
|
300
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
301
|
+
title: formatAmountWithOptions(hiddenChangeDue ? 0 : changeDue, amountSymbol, {
|
|
302
|
+
value: hiddenChangeDue ? 0 : changeDue,
|
|
303
|
+
showCurrencySymbol: true,
|
|
304
|
+
hideDecimalForWholeNumbers: false,
|
|
305
|
+
precision: 2
|
|
306
|
+
})
|
|
297
307
|
}, /*#__PURE__*/React.createElement(AutoResizeText, {
|
|
298
308
|
minFontSizePx: 10,
|
|
299
|
-
maxFontSizePx:
|
|
309
|
+
maxFontSizePx: 18,
|
|
300
310
|
fontSizePrecisionPx: 0.5
|
|
301
311
|
}, formatAmountWithOptions(hiddenChangeDue ? 0 : changeDue, amountSymbol, {
|
|
302
312
|
value: hiddenChangeDue ? 0 : changeDue,
|
|
303
313
|
showCurrencySymbol: true,
|
|
304
314
|
hideDecimalForWholeNumbers: false,
|
|
305
315
|
precision: 2
|
|
306
|
-
}))))), /*#__PURE__*/React.createElement(Shortcuts, {
|
|
316
|
+
})))))), /*#__PURE__*/React.createElement(Shortcuts, {
|
|
307
317
|
presets: getDefaultPresets(),
|
|
308
318
|
onChange: setInternalValue,
|
|
309
319
|
disabled: disabled
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -313,7 +313,7 @@ var getSurcharge = (state, options) => {
|
|
|
313
313
|
const { bookingDetail, bookingId } = state;
|
|
314
314
|
if (!isEdit && bookingId) {
|
|
315
315
|
if (Array.isArray(bookingDetail == null ? void 0 : bookingDetail.surcharge)) {
|
|
316
|
-
return (((_a = state.bookingDetail) == null ? void 0 : _a.surcharge) || []).map(
|
|
316
|
+
return (((_a = state.bookingDetail) == null ? void 0 : _a.surcharge) || []).filter((d) => Number(d.amount) > 0).map(
|
|
317
317
|
(d, index) => {
|
|
318
318
|
return {
|
|
319
319
|
key: `custom_surcharge_${index}`,
|