@pisell/private-materials 3.0.97 → 3.0.99
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 +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/components/booking/info/service/editService/index.js +12 -0
- package/es/components/eftpos/device.js +4 -1
- package/es/components/eftpos/index.less +18 -2
- package/es/components/eftpos/locales.d.ts +12 -0
- package/es/components/eftpos/locales.js +15 -3
- package/es/components/eftpos/table.js +66 -17
- package/es/components/eftposPay/amount.js +1 -2
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.js +9 -5
- package/es/components/eftposPay/component/fail/index.d.ts +1 -1
- package/es/components/eftposPay/component/fail/index.js +10 -6
- package/es/components/eftposPay/component/header/titlebar.less +1 -1
- package/es/components/eftposPay/component/manual/index.js +12 -6
- package/es/components/eftposPay/component/manual/index.less +20 -7
- package/es/components/eftposPay/const.d.ts +1 -0
- package/es/components/eftposPay/device.less +1 -1
- package/es/components/eftposPay/index.js +4 -5
- package/es/components/eftposPay/index.less +30 -40
- package/es/components/eftposPay/locales.js +1 -1
- package/es/components/eftposPay/pay.d.ts +2 -1
- package/es/components/eftposPay/pay.js +4 -2
- package/es/components/eftposPay/var.less +9 -0
- package/lib/components/booking/info/service/editService/index.js +8 -0
- package/lib/components/eftpos/device.js +1 -1
- package/lib/components/eftpos/index.less +18 -2
- package/lib/components/eftpos/locales.d.ts +12 -0
- package/lib/components/eftpos/locales.js +15 -3
- package/lib/components/eftpos/table.js +37 -12
- package/lib/components/eftposPay/amount.js +1 -2
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.js +8 -5
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/index.js +8 -5
- package/lib/components/eftposPay/component/header/titlebar.less +1 -1
- package/lib/components/eftposPay/component/manual/index.js +26 -14
- package/lib/components/eftposPay/component/manual/index.less +20 -7
- package/lib/components/eftposPay/const.d.ts +1 -0
- package/lib/components/eftposPay/device.less +1 -1
- package/lib/components/eftposPay/index.js +4 -0
- package/lib/components/eftposPay/index.less +30 -40
- package/lib/components/eftposPay/locales.js +1 -1
- package/lib/components/eftposPay/pay.d.ts +2 -1
- package/lib/components/eftposPay/pay.js +4 -2
- package/lib/components/eftposPay/var.less +9 -0
- package/package.json +3 -3
|
@@ -34,6 +34,7 @@ import { getErrorList, getServiceTimes, deleteCacheParams } from "../../../utils
|
|
|
34
34
|
import Like from "../like";
|
|
35
35
|
import { getNoResource } from "../../../mock";
|
|
36
36
|
import { formatResources, getDurationProps, getFlexibleOption, getTimeObj } from "../addService/utils";
|
|
37
|
+
var submitLock = false;
|
|
37
38
|
var Info = function Info() {
|
|
38
39
|
var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$service$cacheI6, _state$service3, _state$service3$cache, _state$service5, _state$service5$cache, _state$service5$cache2, _state$service5$cache3, _window$BaseMaterials, _state$service$cacheI7, _state$service6, _state$service6$cache, _state$service6$cache2, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$service$cacheI11, _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7, _state$bookingConfig8;
|
|
39
40
|
var _Form$useForm = Form.useForm(),
|
|
@@ -324,6 +325,7 @@ var Info = function Info() {
|
|
|
324
325
|
discount: discount
|
|
325
326
|
});
|
|
326
327
|
};
|
|
328
|
+
|
|
327
329
|
/**
|
|
328
330
|
* @title: 提交,
|
|
329
331
|
* @description:
|
|
@@ -334,6 +336,16 @@ var Info = function Info() {
|
|
|
334
336
|
*/
|
|
335
337
|
var onFinish = function onFinish(values) {
|
|
336
338
|
var _currentResource$_ext;
|
|
339
|
+
// 防止多次提交, 增加锁
|
|
340
|
+
if (submitLock) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
submitLock = true;
|
|
344
|
+
|
|
345
|
+
// 500毫秒后解除
|
|
346
|
+
setTimeout(function () {
|
|
347
|
+
submitLock = false;
|
|
348
|
+
}, 500);
|
|
337
349
|
var _list = _toConsumableArray(state.service.value);
|
|
338
350
|
var _item = _objectSpread(_objectSpread({}, state.service.cacheItem), {}, {
|
|
339
351
|
autoClose: false,
|
|
@@ -24,7 +24,10 @@ var Device = function Device(props) {
|
|
|
24
24
|
className: "pisell-lowcode__pos-device-btn"
|
|
25
25
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
26
26
|
htmlType: "submit",
|
|
27
|
-
block: true
|
|
27
|
+
block: true,
|
|
28
|
+
style: {
|
|
29
|
+
height: '48px'
|
|
30
|
+
}
|
|
28
31
|
}, locales.getText("page.eftpos.text.save"))));
|
|
29
32
|
};
|
|
30
33
|
export default Device;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
flex-shrink: 0;
|
|
29
29
|
}
|
|
30
30
|
.pisell-lowcode__pos_tabs-nav::after {
|
|
31
|
-
content:
|
|
31
|
+
content: '';
|
|
32
32
|
position: absolute;
|
|
33
33
|
top: 0;
|
|
34
34
|
bottom: 0;
|
|
@@ -135,7 +135,23 @@
|
|
|
135
135
|
font-weight: 500 !important;
|
|
136
136
|
line-height: 38px;
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
.pisell-lowcode__pos-table-del-title {
|
|
139
|
+
color: var(--Gray-900, #101828);
|
|
140
|
+
/* Text lg/Semibold */
|
|
141
|
+
font-size: 18px;
|
|
142
|
+
font-style: normal;
|
|
143
|
+
font-weight: 600;
|
|
144
|
+
line-height: 28px; /* 155.556% */
|
|
145
|
+
}
|
|
146
|
+
.pisell-lowcode__pos-table-del-text {
|
|
147
|
+
color: var(--Gray-900, #101828);
|
|
148
|
+
/* Text sm/Regular */
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
font-style: normal;
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
line-height: 20px; /* 142.857% */
|
|
153
|
+
padding: 0 0 12px 0;
|
|
154
|
+
}
|
|
139
155
|
.pisell-lowcode__pos-device {
|
|
140
156
|
display: flex;
|
|
141
157
|
flex-direction: column;
|
|
@@ -22,6 +22,10 @@ declare const _default: {
|
|
|
22
22
|
'page.eftpos.text.table.status': string;
|
|
23
23
|
'page.eftpos.text.table.surcharge': string;
|
|
24
24
|
'page.eftpos.text.table.opeartion': string;
|
|
25
|
+
'page.eftpos.text.table.del.title': string;
|
|
26
|
+
'page.eftpos.text.table.del.text': string;
|
|
27
|
+
'page.eftpos.text.table.del.delete': string;
|
|
28
|
+
'page.eftpos.text.table.del.cancel': string;
|
|
25
29
|
};
|
|
26
30
|
'zh-CN': {
|
|
27
31
|
'page.eftpos.text.manufacturer': string;
|
|
@@ -46,6 +50,10 @@ declare const _default: {
|
|
|
46
50
|
'page.eftpos.text.table.status': string;
|
|
47
51
|
'page.eftpos.text.table.surcharge': string;
|
|
48
52
|
'page.eftpos.text.table.opeartion': string;
|
|
53
|
+
'page.eftpos.text.table.del.title': string;
|
|
54
|
+
'page.eftpos.text.table.del.text': string;
|
|
55
|
+
'page.eftpos.text.table.del.delete': string;
|
|
56
|
+
'page.eftpos.text.table.del.cancel': string;
|
|
49
57
|
};
|
|
50
58
|
'zh-HK': {
|
|
51
59
|
'page.eftpos.text.manufacturer': string;
|
|
@@ -70,6 +78,10 @@ declare const _default: {
|
|
|
70
78
|
'page.eftpos.text.table.status': string;
|
|
71
79
|
'page.eftpos.text.table.surcharge': string;
|
|
72
80
|
'page.eftpos.text.table.opeartion': string;
|
|
81
|
+
'page.eftpos.text.table.del.title': string;
|
|
82
|
+
'page.eftpos.text.table.del.text': string;
|
|
83
|
+
'page.eftpos.text.table.del.delete': string;
|
|
84
|
+
'page.eftpos.text.table.del.cancel': string;
|
|
73
85
|
};
|
|
74
86
|
};
|
|
75
87
|
export default _default;
|
|
@@ -29,7 +29,11 @@ export default {
|
|
|
29
29
|
'page.eftpos.text.table.name': 'Device name',
|
|
30
30
|
'page.eftpos.text.table.status': 'Status',
|
|
31
31
|
'page.eftpos.text.table.surcharge': 'Surcharge',
|
|
32
|
-
'page.eftpos.text.table.opeartion': 'Opeartion'
|
|
32
|
+
'page.eftpos.text.table.opeartion': 'Opeartion',
|
|
33
|
+
'page.eftpos.text.table.del.title': 'Delete device',
|
|
34
|
+
'page.eftpos.text.table.del.text': 'Are you sure you want to delete the device?',
|
|
35
|
+
'page.eftpos.text.table.del.delete': 'Delete',
|
|
36
|
+
'page.eftpos.text.table.del.cancel': 'Cancel'
|
|
33
37
|
},
|
|
34
38
|
'zh-CN': {
|
|
35
39
|
'page.eftpos.text.manufacturer': '厂商',
|
|
@@ -61,7 +65,11 @@ export default {
|
|
|
61
65
|
'page.eftpos.text.table.name': '设备名称',
|
|
62
66
|
'page.eftpos.text.table.status': '状态',
|
|
63
67
|
'page.eftpos.text.table.surcharge': '支付手续费',
|
|
64
|
-
'page.eftpos.text.table.opeartion': '操作'
|
|
68
|
+
'page.eftpos.text.table.opeartion': '操作',
|
|
69
|
+
'page.eftpos.text.table.del.title': '删除设备',
|
|
70
|
+
'page.eftpos.text.table.del.text': '您确定要删除设备?',
|
|
71
|
+
'page.eftpos.text.table.del.delete': '删除',
|
|
72
|
+
'page.eftpos.text.table.del.cancel': '取消'
|
|
65
73
|
},
|
|
66
74
|
'zh-HK': {
|
|
67
75
|
'page.eftpos.text.manufacturer': '廠商',
|
|
@@ -93,6 +101,10 @@ export default {
|
|
|
93
101
|
'page.eftpos.text.table.name': '設備名稱',
|
|
94
102
|
'page.eftpos.text.table.status': '狀態',
|
|
95
103
|
'page.eftpos.text.table.surcharge': '支付手續費',
|
|
96
|
-
'page.eftpos.text.table.opeartion': '操作'
|
|
104
|
+
'page.eftpos.text.table.opeartion': '操作',
|
|
105
|
+
'page.eftpos.text.table.del.title': '刪除設備',
|
|
106
|
+
'page.eftpos.text.table.del.text': '您確定要刪除設備?',
|
|
107
|
+
'page.eftpos.text.table.del.delete': '刪除',
|
|
108
|
+
'page.eftpos.text.table.del.cancel': '取消'
|
|
97
109
|
}
|
|
98
110
|
};
|
|
@@ -19,6 +19,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
import React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
21
21
|
import { Space, Typography, Table, Modal, Button, Pagination } from 'antd';
|
|
22
|
+
import XClose from '@pisell/icon/es/XClose';
|
|
22
23
|
import { locales } from '@pisell/utils';
|
|
23
24
|
var Column = Table.Column;
|
|
24
25
|
var Title = Typography.Title,
|
|
@@ -48,18 +49,22 @@ var App = function App(_ref, ref) {
|
|
|
48
49
|
loading = _useState2[0],
|
|
49
50
|
setLoading = _useState2[1];
|
|
50
51
|
var deviceRef = useRef('');
|
|
51
|
-
var _useState3 = useState(
|
|
52
|
+
var _useState3 = useState(false),
|
|
53
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
54
|
+
isModalOpen = _useState4[0],
|
|
55
|
+
setModalOpen = _useState4[1];
|
|
56
|
+
var _useState5 = useState({
|
|
52
57
|
pageSize: 10,
|
|
53
58
|
current: 1,
|
|
54
59
|
total: 0
|
|
55
60
|
}),
|
|
56
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
-
pagination = _useState4[0],
|
|
58
|
-
setPagination = _useState4[1];
|
|
59
|
-
var _useState5 = useState([]),
|
|
60
61
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
pagination = _useState6[0],
|
|
63
|
+
setPagination = _useState6[1];
|
|
64
|
+
var _useState7 = useState([]),
|
|
65
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
66
|
+
data = _useState8[0],
|
|
67
|
+
setData = _useState8[1];
|
|
63
68
|
var loadData = /*#__PURE__*/function () {
|
|
64
69
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(current) {
|
|
65
70
|
var res;
|
|
@@ -121,18 +126,13 @@ var App = function App(_ref, ref) {
|
|
|
121
126
|
};
|
|
122
127
|
var onDelDevice = function onDelDevice(record) {
|
|
123
128
|
deviceRef.current = record.id;
|
|
124
|
-
|
|
125
|
-
title: locales.getText('page.eftpos.text.confim.delete'),
|
|
126
|
-
content: locales.getText('page.eftpos.text.confirm_delete-message')(record.name),
|
|
127
|
-
okText: locales.getText('page.eftpos.text.confim.delete'),
|
|
128
|
-
cancelText: locales.getText('page.eftpos.text.confim.cancel'),
|
|
129
|
-
onOk: onOk
|
|
130
|
-
});
|
|
129
|
+
setModalOpen(true);
|
|
131
130
|
};
|
|
132
131
|
var onChangeSize = function onChangeSize(num) {
|
|
133
132
|
loadData(num);
|
|
134
133
|
};
|
|
135
134
|
var onOk = function onOk() {
|
|
135
|
+
setModalOpen(false);
|
|
136
136
|
if (deviceRef.current) {
|
|
137
137
|
onDel(deviceRef.current).then(function () {
|
|
138
138
|
return loadData();
|
|
@@ -144,7 +144,7 @@ var App = function App(_ref, ref) {
|
|
|
144
144
|
loadData: loadData
|
|
145
145
|
};
|
|
146
146
|
});
|
|
147
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
148
148
|
className: "pisell-lowcode__pos-table",
|
|
149
149
|
style: _objectSpread({}, style || {})
|
|
150
150
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
@@ -154,7 +154,10 @@ var App = function App(_ref, ref) {
|
|
|
154
154
|
className: "pisell-lowcode__pos-table-act"
|
|
155
155
|
}, /*#__PURE__*/React.createElement(Text, null, locales.getText('page.eftpos.text.device.list')), /*#__PURE__*/React.createElement(Button, {
|
|
156
156
|
type: "primary",
|
|
157
|
-
onClick: onAddDevice
|
|
157
|
+
onClick: onAddDevice,
|
|
158
|
+
style: {
|
|
159
|
+
height: '48px'
|
|
160
|
+
}
|
|
158
161
|
}, locales.getText('page.eftpos.text.device.add')())), /*#__PURE__*/React.createElement(Table, {
|
|
159
162
|
dataSource: data,
|
|
160
163
|
rowKey: "id",
|
|
@@ -231,6 +234,52 @@ var App = function App(_ref, ref) {
|
|
|
231
234
|
total: pagination.total,
|
|
232
235
|
onChange: onChangeSize,
|
|
233
236
|
onShowSizeChange: onChangeSize
|
|
234
|
-
}))
|
|
237
|
+
})), /*#__PURE__*/React.createElement(Modal, {
|
|
238
|
+
open: isModalOpen,
|
|
239
|
+
width: 400,
|
|
240
|
+
centered: true,
|
|
241
|
+
onCancel: function onCancel() {
|
|
242
|
+
return setModalOpen(false);
|
|
243
|
+
},
|
|
244
|
+
closeIcon: /*#__PURE__*/React.createElement(XClose, {
|
|
245
|
+
size: 20,
|
|
246
|
+
style: {
|
|
247
|
+
fontSize: '24px'
|
|
248
|
+
}
|
|
249
|
+
}),
|
|
250
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
251
|
+
style: {
|
|
252
|
+
display: 'flex',
|
|
253
|
+
gap: '12px'
|
|
254
|
+
}
|
|
255
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
256
|
+
block: true,
|
|
257
|
+
onClick: function onClick() {
|
|
258
|
+
return setModalOpen(false);
|
|
259
|
+
},
|
|
260
|
+
style: {
|
|
261
|
+
flex: 1,
|
|
262
|
+
height: '48px',
|
|
263
|
+
borderRadius: '8px'
|
|
264
|
+
}
|
|
265
|
+
}, locales.getText('page.eftpos.text.table.del.cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
266
|
+
type: "primary",
|
|
267
|
+
block: true,
|
|
268
|
+
onClick: onOk,
|
|
269
|
+
style: {
|
|
270
|
+
flex: 1,
|
|
271
|
+
height: '48px',
|
|
272
|
+
borderRadius: '8px'
|
|
273
|
+
}
|
|
274
|
+
}, locales.getText('page.eftpos.text.table.del.delete')))
|
|
275
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
276
|
+
style: {
|
|
277
|
+
height: '34px'
|
|
278
|
+
}
|
|
279
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
280
|
+
className: "pisell-lowcode__pos-table-del-title"
|
|
281
|
+
}, locales.getText('page.eftpos.text.table.del.title')), /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
className: "pisell-lowcode__pos-table-del-text"
|
|
283
|
+
}, locales.getText('page.eftpos.text.table.del.text'))));
|
|
235
284
|
};
|
|
236
285
|
export default /*#__PURE__*/React.forwardRef(App);
|
|
@@ -145,8 +145,7 @@ export default (function (_ref) {
|
|
|
145
145
|
return /*#__PURE__*/React.createElement("div", {
|
|
146
146
|
className: "pisell-lowcode__eft-pay-amount ".concat(className)
|
|
147
147
|
}, isIpad ? null : /*#__PURE__*/React.createElement(Titlebar, {
|
|
148
|
-
type:
|
|
149
|
-
onBack: onBack,
|
|
148
|
+
type: 'left-title-close',
|
|
150
149
|
onClose: onClose
|
|
151
150
|
}, status ? name : locales.getText('page.eftpos-pay.text.surcharge.edit.title')), status ? /*#__PURE__*/React.createElement("div", {
|
|
152
151
|
className: "pisell-lowcode__eft-pay-amount-body"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
|
-
declare const _default: ({ className, onChange }: ActionProps) => React.JSX.Element;
|
|
3
|
+
declare const _default: ({ className, isIpad, onChange }: ActionProps) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
|
@@ -6,8 +6,9 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
/* eslint-disable no-nested-ternary */
|
|
8
8
|
import { locales } from '@pisell/utils';
|
|
9
|
+
import { useMount } from 'ahooks';
|
|
9
10
|
import { Button } from 'antd';
|
|
10
|
-
import React
|
|
11
|
+
import React from 'react';
|
|
11
12
|
import { ModeEnum } from "../../const";
|
|
12
13
|
import { getInitState } from "../../manufacturer";
|
|
13
14
|
import XClose from '@pisell/icon/es/XClose';
|
|
@@ -16,6 +17,7 @@ import Header from "../header";
|
|
|
16
17
|
export default (function (_ref) {
|
|
17
18
|
var _ref$className = _ref.className,
|
|
18
19
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
20
|
+
isIpad = _ref.isIpad,
|
|
19
21
|
onChange = _ref.onChange;
|
|
20
22
|
var _useContextData = useContextData(),
|
|
21
23
|
eftpos = _useContextData.eftpos,
|
|
@@ -51,14 +53,16 @@ export default (function (_ref) {
|
|
|
51
53
|
var onClose = function onClose() {
|
|
52
54
|
onChange('fail');
|
|
53
55
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
useMount(function () {
|
|
57
|
+
if ((failCustom === null || failCustom === void 0 ? void 0 : failCustom.status) === 'fail') {
|
|
58
|
+
onChange('page', 'fail');
|
|
59
|
+
}
|
|
60
|
+
});
|
|
57
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
58
62
|
className: "pisell-lowcode__eft-pay-box ".concat(className)
|
|
59
63
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
60
64
|
status: failCustom.status
|
|
61
|
-
}, (failCustom === null || failCustom === void 0 ? void 0 : failCustom.status) === 'fail' ? /*#__PURE__*/React.createElement(XClose, {
|
|
65
|
+
}, (failCustom === null || failCustom === void 0 ? void 0 : failCustom.status) === 'fail' && !isIpad ? /*#__PURE__*/React.createElement(XClose, {
|
|
62
66
|
size: 20,
|
|
63
67
|
style: {
|
|
64
68
|
fontSize: '24px',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
|
-
declare const _default: ({ onChange, className }: ActionProps) => React.JSX.Element;
|
|
3
|
+
declare const _default: ({ onChange, className, isIpad }: ActionProps) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
|
@@ -7,7 +7,8 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
/* eslint-disable no-nested-ternary */
|
|
8
8
|
import { locales } from '@pisell/utils';
|
|
9
9
|
import { Button } from 'antd';
|
|
10
|
-
import
|
|
10
|
+
import { useMount } from 'ahooks';
|
|
11
|
+
import React from 'react';
|
|
11
12
|
import XClose from '@pisell/icon/es/XClose';
|
|
12
13
|
import { getInitState } from "../../manufacturer";
|
|
13
14
|
import { useDispatch, useContextData, updateState, updateCustomStemItem, updateComponent } from "../../store";
|
|
@@ -16,7 +17,8 @@ export default (function (_ref) {
|
|
|
16
17
|
var _steps$step, _steps$step$custom;
|
|
17
18
|
var onChange = _ref.onChange,
|
|
18
19
|
_ref$className = _ref.className,
|
|
19
|
-
className = _ref$className === void 0 ? '' : _ref$className
|
|
20
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
21
|
+
isIpad = _ref.isIpad;
|
|
20
22
|
var _useContextData = useContextData(),
|
|
21
23
|
eftpos = _useContextData.eftpos,
|
|
22
24
|
step = _useContextData.step,
|
|
@@ -62,14 +64,16 @@ export default (function (_ref) {
|
|
|
62
64
|
// 支付失败页
|
|
63
65
|
onChange('fail');
|
|
64
66
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
useMount(function () {
|
|
68
|
+
if (steps[step].status === 'fail') {
|
|
69
|
+
onChange('page', 'fail');
|
|
70
|
+
}
|
|
71
|
+
});
|
|
68
72
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
73
|
className: "pisell-lowcode__eft-pay-box ".concat(className)
|
|
70
74
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
71
75
|
status: steps[step].status
|
|
72
|
-
}, steps[step].status === 'fail' ? /*#__PURE__*/React.createElement(XClose, {
|
|
76
|
+
}, steps[step].status === 'fail' && !isIpad ? /*#__PURE__*/React.createElement(XClose, {
|
|
73
77
|
size: 20,
|
|
74
78
|
style: {
|
|
75
79
|
fontSize: '24px',
|
|
@@ -32,6 +32,9 @@ export default (function (_ref) {
|
|
|
32
32
|
setDisabled = _useState2[1];
|
|
33
33
|
var prefix = usePrefix();
|
|
34
34
|
var onSuccess = function onSuccess() {
|
|
35
|
+
if (disabled) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
35
38
|
setDisabled(true);
|
|
36
39
|
if (mode === ModeEnum.Pay) {
|
|
37
40
|
var obj = (custom === null || custom === void 0 ? void 0 : custom.pay) || {};
|
|
@@ -54,6 +57,9 @@ export default (function (_ref) {
|
|
|
54
57
|
});
|
|
55
58
|
};
|
|
56
59
|
var onFail = function onFail() {
|
|
60
|
+
if (disabled) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
57
63
|
setDisabled(true);
|
|
58
64
|
onChange('fail');
|
|
59
65
|
};
|
|
@@ -66,26 +72,26 @@ export default (function (_ref) {
|
|
|
66
72
|
}, manual === null || manual === void 0 ? void 0 : manual.text), /*#__PURE__*/React.createElement("div", {
|
|
67
73
|
className: "pisell-lowcode__eft-pay-manual-card-box"
|
|
68
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "pisell-lowcode__eft-pay-manual-card"
|
|
75
|
+
className: "pisell-lowcode__eft-pay-manual-card",
|
|
76
|
+
onClick: onSuccess
|
|
70
77
|
}, /*#__PURE__*/React.createElement("div", {
|
|
71
78
|
className: "pisell-lowcode__eft-pay-manual-img",
|
|
72
79
|
style: {
|
|
73
80
|
backgroundImage: "url(".concat(prefix, "/pay_success.png)")
|
|
74
81
|
}
|
|
75
82
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
76
|
-
onClick: onSuccess,
|
|
77
83
|
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
78
|
-
|
|
84
|
+
block: true
|
|
79
85
|
}, locales.getText('page.eftpos-pay.text.successful')(mode))), /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: "pisell-lowcode__eft-pay-manual-card"
|
|
86
|
+
className: "pisell-lowcode__eft-pay-manual-card",
|
|
87
|
+
onClick: onFail
|
|
81
88
|
}, /*#__PURE__*/React.createElement("div", {
|
|
82
89
|
className: "pisell-lowcode__eft-pay-manual-img",
|
|
83
90
|
style: {
|
|
84
91
|
backgroundImage: "url(".concat(prefix, "/pay_error.png)")
|
|
85
92
|
}
|
|
86
93
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
87
|
-
onClick: onFail,
|
|
88
94
|
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
89
|
-
|
|
95
|
+
block: true
|
|
90
96
|
}, locales.getText('page.eftpos-pay.text.failed')(mode)))));
|
|
91
97
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.pisell-lowcode__eft-pay-manual{
|
|
2
2
|
padding: var(--pisel-lc-pos-manual-padding, 24px);
|
|
3
|
-
width: var(--pisel-lc-pos-manual-width,
|
|
3
|
+
width: var(--pisel-lc-pos-manual-width, 600px);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.pisell-lowcode__eft-pay-manual-title {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
overflow: auto;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
@media only screen and (max-width:
|
|
59
|
+
@media only screen and (max-width: 499px) {
|
|
60
60
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
61
61
|
gap:10px;
|
|
62
62
|
}
|
|
@@ -74,17 +74,30 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
@media only screen and (min-width:
|
|
77
|
+
@media only screen and (min-width: 500px) and (max-width: 601px) {
|
|
78
|
+
.pisell-lowcode__eft-pay-terminal .pisell-lowcode__eft-pay-manual-card-box{
|
|
79
|
+
flex: none;
|
|
80
|
+
height: 360px;
|
|
81
|
+
}
|
|
78
82
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
79
|
-
|
|
83
|
+
gap:10px;
|
|
84
|
+
height: 400px;
|
|
85
|
+
|
|
80
86
|
}
|
|
81
87
|
.pisell-lowcode__eft-pay-manual-card {
|
|
82
|
-
|
|
88
|
+
flex: 1;
|
|
89
|
+
padding: 20px;
|
|
90
|
+
gap:30px;
|
|
91
|
+
}
|
|
92
|
+
.pisell-lowcode__eft-pay-manual-img{
|
|
93
|
+
width: 200px;
|
|
94
|
+
height: 200px;
|
|
83
95
|
}
|
|
84
|
-
|
|
85
96
|
}
|
|
86
97
|
|
|
87
|
-
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@media only screen and (min-width: 601px) {
|
|
88
101
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
89
102
|
margin: 24px auto 0;
|
|
90
103
|
gap: 20px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.pisell-lowcode__eft-pay-device-box {
|
|
2
2
|
max-height: var(--pisel-lc-pos-device-max-height, unset);
|
|
3
|
-
width: var(--pisel-lc-pos-device-width,
|
|
3
|
+
width: var(--pisel-lc-pos-device-width, 600px);
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
padding: var(--pisel-lc-pos-device-padding, 0 24px 24px);
|
|
6
6
|
}
|
|
@@ -127,6 +127,7 @@ var App = function App(_ref) {
|
|
|
127
127
|
onChange: onChange,
|
|
128
128
|
className: isIpad ? 'pisell-lowcode__eft-pay-terminal' : '',
|
|
129
129
|
terminal: terminal,
|
|
130
|
+
isIpad: isIpad,
|
|
130
131
|
net: net
|
|
131
132
|
});
|
|
132
133
|
};
|
|
@@ -171,11 +172,9 @@ export default (function (props) {
|
|
|
171
172
|
symbol: current
|
|
172
173
|
});
|
|
173
174
|
}, [mode, props.params, props.type, symbol]);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
// }, []);
|
|
178
|
-
|
|
175
|
+
useEffect(function () {
|
|
176
|
+
document.body.id = 'body';
|
|
177
|
+
}, []);
|
|
179
178
|
return /*#__PURE__*/React.createElement(Provider, {
|
|
180
179
|
state: state
|
|
181
180
|
}, /*#__PURE__*/React.createElement(App, {
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
.
|
|
2
|
-
height: auto;
|
|
3
|
-
position: absolute;
|
|
4
|
-
top: 50%;
|
|
5
|
-
left: 50%;
|
|
6
|
-
transform: translate(-50%, -50%);
|
|
7
|
-
border-radius: 12px;
|
|
8
|
-
background-color: #eee;
|
|
9
|
-
padding: 24px;
|
|
10
|
-
}
|
|
1
|
+
@import './var.less';
|
|
11
2
|
|
|
12
3
|
.pisell-lowcode__eft-pay-amount {
|
|
13
4
|
display: flex;
|
|
14
5
|
flex-direction: column;
|
|
15
|
-
gap: 8px;
|
|
16
6
|
}
|
|
17
7
|
|
|
18
8
|
//
|
|
@@ -56,14 +46,14 @@
|
|
|
56
46
|
line-height: 20px; /* 142.857% */
|
|
57
47
|
}
|
|
58
48
|
.pisell-lowcode__eft-pay-step-item-btns {
|
|
59
|
-
margin:
|
|
49
|
+
margin: 24px 0 0 0;
|
|
60
50
|
display: flex;
|
|
61
51
|
gap: 12px;
|
|
62
52
|
flex-shrink: 0;
|
|
63
53
|
}
|
|
64
54
|
.pisell-lowcode__eft-pay-step-item-btn {
|
|
65
55
|
flex: 1;
|
|
66
|
-
height:
|
|
56
|
+
height: 48px !important;
|
|
67
57
|
}
|
|
68
58
|
|
|
69
59
|
|
|
@@ -207,29 +197,6 @@
|
|
|
207
197
|
width: 40px;
|
|
208
198
|
}
|
|
209
199
|
|
|
210
|
-
.pisell-lowcode__eft-pay-box {
|
|
211
|
-
max-height: var(--pisel-lc-pos-pay-max-height, unset);
|
|
212
|
-
width: var(--pisel-lc-pos-pay-width, 400px);
|
|
213
|
-
max-width: 100%;
|
|
214
|
-
padding: var(--pisel-lc-pos-pay-padding, 24px);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.pisell-lowcode__eft-pay-amount {
|
|
218
|
-
max-height: var(--pisel-lc-pos-amount-max-height, unset);
|
|
219
|
-
width: var(--pisel-lc-pos-amount-width, 600px);
|
|
220
|
-
max-width: 100%;
|
|
221
|
-
padding: var(--pisel-lc-pos-device-padding, 0 24px 24px);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.pisell-lowcode__eft-pay-terminal {
|
|
225
|
-
width: var(--pisel-lc-pos-terminal-width, 100%) !important;
|
|
226
|
-
height: var(--pisel-lc-pos-terminal-height, 100%) !important;
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: column;
|
|
229
|
-
}
|
|
230
|
-
// .pisell-lowcode__eft-pay-terminal .pisell-lowcode__eft-pay-amount-body{
|
|
231
|
-
// flex: 1;
|
|
232
|
-
// }
|
|
233
200
|
.pisell-lowcode__eft-pay-amount-body,
|
|
234
201
|
.pisell-lowcode__eft-pay-body {
|
|
235
202
|
flex: 1;
|
|
@@ -258,10 +225,6 @@
|
|
|
258
225
|
line-height: 20px; /* 142.857% */
|
|
259
226
|
}
|
|
260
227
|
|
|
261
|
-
.pisell-lowcode__eft-pay-step-item-pedding {
|
|
262
|
-
}
|
|
263
|
-
.pisell-lowcode__eft-pay-step-item-warn {
|
|
264
|
-
}
|
|
265
228
|
|
|
266
229
|
.pisell-lowcode__eft-pay-step-item-resolve {
|
|
267
230
|
color: var(--gray-true-900, #141414);
|
|
@@ -271,3 +234,30 @@
|
|
|
271
234
|
font-weight: 400;
|
|
272
235
|
line-height: 20px; /* 142.857% */
|
|
273
236
|
}
|
|
237
|
+
.pisell-lowcode__eft-pay-manual-btn{
|
|
238
|
+
// height: ;
|
|
239
|
+
height: 48px !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
.pisell-lowcode__eft-pay-box {
|
|
244
|
+
max-height: var(--pisel-lc-pos-pay-max-height, unset);
|
|
245
|
+
width: var(--pisel-lc-pos-pay-width, 600px);
|
|
246
|
+
max-width: 100%;
|
|
247
|
+
padding: var(--pisel-lc-pos-pay-padding, 24px);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.pisell-lowcode__eft-pay-amount {
|
|
251
|
+
max-height: var(--pisel-lc-pos-amount-max-height, unset);
|
|
252
|
+
width: var(--pisel-lc-pos-amount-width, 600px);
|
|
253
|
+
max-width: 100%;
|
|
254
|
+
padding: var(--pisel-lc-pos-device-padding, 0 24px 24px);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.pisell-lowcode__eft-pay-terminal {
|
|
258
|
+
width: var(--pisel-lc-pos-terminal-width, 100%) !important;
|
|
259
|
+
height: var(--pisel-lc-pos-terminal-height, 100%) !important;
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: column;
|
|
262
|
+
}
|
|
263
|
+
|
|
@@ -74,7 +74,7 @@ export default {
|
|
|
74
74
|
'page.eftpos-pay.text.surcharge.percentage': 'Percentage',
|
|
75
75
|
'page.eftpos-pay.text.surcharge.fixed': 'Fixed',
|
|
76
76
|
'page.eftpos-pay.text.surcharge.percentage-fixed': 'Surcharge = Percentage + Fixed',
|
|
77
|
-
'page.eftpos-pay.text.surcharge.edit.title': 'Edit
|
|
77
|
+
'page.eftpos-pay.text.surcharge.edit.title': 'Edit payment surcharge',
|
|
78
78
|
// 自定义
|
|
79
79
|
'page.eftpos-pay.text.input.title': function pageEftposPayTextInputTitle(name) {
|
|
80
80
|
return "Amount to pay on ".concat(name);
|