@pisell/private-materials 3.3.56 → 3.3.57
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +1 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +15 -8
- package/es/components/ticketBooking/serve.d.ts +5 -0
- package/es/components/ticketBooking/serve.js +27 -0
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +1 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +14 -7
- package/lib/components/ticketBooking/serve.d.ts +5 -0
- package/lib/components/ticketBooking/serve.js +8 -2
- package/package.json +4 -4
|
@@ -517,7 +517,7 @@ var Footer = function Footer(props) {
|
|
|
517
517
|
}
|
|
518
518
|
case 32:
|
|
519
519
|
// 回调关闭弹窗
|
|
520
|
-
state === null || state === void 0 || state.callback(callbackData);
|
|
520
|
+
state === null || state === void 0 || state.callback(callbackData, type);
|
|
521
521
|
_setLoading(false);
|
|
522
522
|
|
|
523
523
|
// return数据 checkout时需要
|
|
@@ -20,7 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
import React, { useEffect, useRef } from 'react';
|
|
21
21
|
import { locales } from '@pisell/utils';
|
|
22
22
|
import { message } from 'antd';
|
|
23
|
-
import { getOrderInfoByCode, getBookingDetail, getEventBookingDetail, getBookingConfig, getServices } from "../../serve";
|
|
23
|
+
import { getOrderInfoByCode, getBookingDetail, getEventBookingDetail, getBookingConfig, getServices, voidAppointment } from "../../serve";
|
|
24
24
|
import * as apis from "../../serve";
|
|
25
25
|
import dayjs from 'dayjs';
|
|
26
26
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
@@ -52,7 +52,7 @@ var TicketBooking = function TicketBooking() {
|
|
|
52
52
|
var _timerRef = useRef();
|
|
53
53
|
var _callbackFnRef = useRef();
|
|
54
54
|
useEffect(function () {
|
|
55
|
-
var _interaction$utils, _store$getState, _interaction$utils2;
|
|
55
|
+
var _interaction$utils, _store$getState, _interaction$utils2, _interaction$utils3;
|
|
56
56
|
_persistentRef.current = storage.get("drawer-booking") === 'true' ? true : isTerminal();
|
|
57
57
|
if (lowcodeRef) {
|
|
58
58
|
lowcodeRef.onReady(_this);
|
|
@@ -80,10 +80,14 @@ var TicketBooking = function TicketBooking() {
|
|
|
80
80
|
_setShopOpeningHours();
|
|
81
81
|
_setIntervalTime(true);
|
|
82
82
|
interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || _interaction$utils2.mountFunction('booking', 'refreshBookingDetail', function (type, orderId) {
|
|
83
|
-
console.log(type, orderId, 'type, orderId');
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
// console.log(type, orderId, 'type, orderId');
|
|
84
|
+
// 支付成功后清空状态
|
|
85
|
+
_initFn(function () {});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// 作废预约
|
|
89
|
+
interaction === null || interaction === void 0 || (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 || _interaction$utils3.mountFunction('booking', 'voidBooking', function (orderId) {
|
|
90
|
+
voidAppointment(orderId);
|
|
87
91
|
});
|
|
88
92
|
return function () {
|
|
89
93
|
off === null || off === void 0 || off();
|
|
@@ -696,8 +700,11 @@ var TicketBooking = function TicketBooking() {
|
|
|
696
700
|
};
|
|
697
701
|
|
|
698
702
|
// 新建完成之后的回调
|
|
699
|
-
var _callback = function _callback(data) {
|
|
700
|
-
|
|
703
|
+
var _callback = function _callback(data, type) {
|
|
704
|
+
// 结账时
|
|
705
|
+
if (isTerminal() && type === 'checkout') {
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
701
708
|
setState({
|
|
702
709
|
createCount: state.createCount + 1
|
|
703
710
|
});
|
|
@@ -280,3 +280,8 @@ export declare const getOrderInfoByCode: (params: any) => Promise<any>;
|
|
|
280
280
|
* @Date: 2025-04-24 16:28
|
|
281
281
|
*/
|
|
282
282
|
export declare const getClientsEs: (params: any) => Promise<any>;
|
|
283
|
+
/**
|
|
284
|
+
* 作废2.0预约订单
|
|
285
|
+
* @param order_id
|
|
286
|
+
*/
|
|
287
|
+
export declare const voidAppointment: (order_id: number) => Promise<any>;
|
|
@@ -960,4 +960,31 @@ export var getClientsEs = /*#__PURE__*/function () {
|
|
|
960
960
|
return function getClientsEs(_x42) {
|
|
961
961
|
return _ref30.apply(this, arguments);
|
|
962
962
|
};
|
|
963
|
+
}();
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* 作废2.0预约订单
|
|
967
|
+
* @param order_id
|
|
968
|
+
*/
|
|
969
|
+
export var voidAppointment = /*#__PURE__*/function () {
|
|
970
|
+
var _ref31 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(order_id) {
|
|
971
|
+
var _yield$request$getReq30, data;
|
|
972
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
973
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
974
|
+
case 0:
|
|
975
|
+
_context31.next = 2;
|
|
976
|
+
return request.getRequest().put(prefix + "/order/void/appointment/".concat(order_id), {});
|
|
977
|
+
case 2:
|
|
978
|
+
_yield$request$getReq30 = _context31.sent;
|
|
979
|
+
data = _yield$request$getReq30.data;
|
|
980
|
+
return _context31.abrupt("return", data);
|
|
981
|
+
case 5:
|
|
982
|
+
case "end":
|
|
983
|
+
return _context31.stop();
|
|
984
|
+
}
|
|
985
|
+
}, _callee31);
|
|
986
|
+
}));
|
|
987
|
+
return function voidAppointment(_x43) {
|
|
988
|
+
return _ref31.apply(this, arguments);
|
|
989
|
+
};
|
|
963
990
|
}();
|
|
@@ -57,7 +57,7 @@ var TicketBooking = () => {
|
|
|
57
57
|
const _timerRef = (0, import_react.useRef)();
|
|
58
58
|
const _callbackFnRef = (0, import_react.useRef)();
|
|
59
59
|
(0, import_react.useEffect)(() => {
|
|
60
|
-
var _a2, _b, _c, _d, _e;
|
|
60
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
61
61
|
_persistentRef.current = storage.get(`drawer-booking`) === "true" ? true : isTerminal();
|
|
62
62
|
if (lowcodeRef) {
|
|
63
63
|
lowcodeRef.onReady(void 0);
|
|
@@ -95,10 +95,15 @@ var TicketBooking = () => {
|
|
|
95
95
|
"booking",
|
|
96
96
|
"refreshBookingDetail",
|
|
97
97
|
(type, orderId) => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
_initFn(() => {
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
(_f = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _f.mountFunction(
|
|
103
|
+
"booking",
|
|
104
|
+
"voidBooking",
|
|
105
|
+
(orderId) => {
|
|
106
|
+
(0, import_serve.voidAppointment)(orderId);
|
|
102
107
|
}
|
|
103
108
|
);
|
|
104
109
|
return () => {
|
|
@@ -645,8 +650,10 @@ var TicketBooking = () => {
|
|
|
645
650
|
}
|
|
646
651
|
);
|
|
647
652
|
};
|
|
648
|
-
const _callback = (data) => {
|
|
649
|
-
|
|
653
|
+
const _callback = (data, type) => {
|
|
654
|
+
if (isTerminal() && type === "checkout") {
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
650
657
|
setState({
|
|
651
658
|
createCount: state.createCount + 1
|
|
652
659
|
});
|
|
@@ -280,3 +280,8 @@ export declare const getOrderInfoByCode: (params: any) => Promise<any>;
|
|
|
280
280
|
* @Date: 2025-04-24 16:28
|
|
281
281
|
*/
|
|
282
282
|
export declare const getClientsEs: (params: any) => Promise<any>;
|
|
283
|
+
/**
|
|
284
|
+
* 作废2.0预约订单
|
|
285
|
+
* @param order_id
|
|
286
|
+
*/
|
|
287
|
+
export declare const voidAppointment: (order_id: number) => Promise<any>;
|
|
@@ -48,7 +48,8 @@ __export(serve_exports, {
|
|
|
48
48
|
getServices: () => getServices,
|
|
49
49
|
removeNoteByOrder: () => removeNoteByOrder,
|
|
50
50
|
saveAddonsByOrderId: () => saveAddonsByOrderId,
|
|
51
|
-
saveBookingFormData: () => saveBookingFormData
|
|
51
|
+
saveBookingFormData: () => saveBookingFormData,
|
|
52
|
+
voidAppointment: () => voidAppointment
|
|
52
53
|
});
|
|
53
54
|
module.exports = __toCommonJS(serve_exports);
|
|
54
55
|
var import_utils = require("./../../utils");
|
|
@@ -183,6 +184,10 @@ var getClientsEs = async (params) => {
|
|
|
183
184
|
let { data } = await import_utils.request.getRequest().get(prefix + "/customer/es/data", params);
|
|
184
185
|
return data;
|
|
185
186
|
};
|
|
187
|
+
var voidAppointment = async (order_id) => {
|
|
188
|
+
let { data } = await import_utils.request.getRequest().put(prefix + `/order/void/appointment/${order_id}`, {});
|
|
189
|
+
return data;
|
|
190
|
+
};
|
|
186
191
|
// Annotate the CommonJS export names for ESM import in node:
|
|
187
192
|
0 && (module.exports = {
|
|
188
193
|
addNotesByOrder,
|
|
@@ -214,5 +219,6 @@ var getClientsEs = async (params) => {
|
|
|
214
219
|
getServices,
|
|
215
220
|
removeNoteByOrder,
|
|
216
221
|
saveAddonsByOrderId,
|
|
217
|
-
saveBookingFormData
|
|
222
|
+
saveBookingFormData,
|
|
223
|
+
voidAppointment
|
|
218
224
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.57",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/
|
|
62
|
+
"@pisell/icon": "0.0.11",
|
|
63
63
|
"@pisell/utils": "1.0.42",
|
|
64
|
-
"@pisell/
|
|
65
|
-
"@pisell/
|
|
64
|
+
"@pisell/materials": "3.3.22",
|
|
65
|
+
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|