@pisell/private-materials 3.0.118 → 3.0.120
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/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
- package/es/components/booking/components/TabProduct/productItem/index.js +8 -7
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/info/header/index.d.ts +2 -2
- package/es/components/booking/info/header/index.js +436 -44
- package/es/components/booking/info/header/index.less +110 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +3 -1
- package/es/components/booking/info/service/addService/index.js +14 -8
- package/es/components/booking/info/service/editService/index.d.ts +5 -2
- package/es/components/booking/info/service/editService/index.js +155 -66
- package/es/components/booking/info/service/editService/index.less +13 -4
- package/es/components/booking/info/service/index.js +15 -2
- package/es/components/booking/info/service/serviceList/index.d.ts +5 -3
- package/es/components/booking/info/service/serviceList/index.js +15 -11
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/locales.d.ts +42 -0
- package/es/components/booking/locales.js +54 -6
- package/es/components/booking/model.d.ts +3 -2
- package/es/components/booking/model.js +9 -9
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
- package/lib/components/booking/components/TabProduct/productItem/index.js +2 -1
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/info/header/index.d.ts +2 -2
- package/lib/components/booking/info/header/index.js +212 -11
- package/lib/components/booking/info/header/index.less +110 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/service/addService/index.d.ts +3 -1
- package/lib/components/booking/info/service/addService/index.js +9 -4
- package/lib/components/booking/info/service/editService/index.d.ts +5 -2
- package/lib/components/booking/info/service/editService/index.js +107 -62
- package/lib/components/booking/info/service/editService/index.less +13 -4
- package/lib/components/booking/info/service/index.js +8 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +5 -3
- package/lib/components/booking/info/service/serviceList/index.js +2 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/locales.d.ts +42 -0
- package/lib/components/booking/locales.js +48 -6
- package/lib/components/booking/model.d.ts +3 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/package.json +4 -4
|
@@ -48,8 +48,8 @@ var import_like = __toESM(require("../like"));
|
|
|
48
48
|
var import_mock = require("../../../mock");
|
|
49
49
|
var import_utils4 = require("../addService/utils");
|
|
50
50
|
var submitLock = false;
|
|
51
|
-
var Info = () => {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
51
|
+
var Info = (_, ref) => {
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|
|
53
53
|
const [form] = import_antd.Form.useForm();
|
|
54
54
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
55
55
|
const useLikeStatus = import_antd.Form.useWatch("like_status", form);
|
|
@@ -59,13 +59,13 @@ var Info = () => {
|
|
|
59
59
|
const [resourceLoading, setResourceLoading] = (0, import_react.useState)(false);
|
|
60
60
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
61
61
|
const [selectOpen, setSelectOpen] = (0, import_react.useState)();
|
|
62
|
-
const getCurrentCacheItem = () => {
|
|
62
|
+
const getCurrentCacheItem = (_cacheItem) => {
|
|
63
63
|
let values = form.getFieldsValue();
|
|
64
|
-
let
|
|
64
|
+
let _item = _cacheItem || state.service.cacheItem;
|
|
65
65
|
return {
|
|
66
|
-
...
|
|
66
|
+
..._item,
|
|
67
67
|
_extend: {
|
|
68
|
-
...
|
|
68
|
+
..._item == null ? void 0 : _item._extend,
|
|
69
69
|
...values
|
|
70
70
|
}
|
|
71
71
|
};
|
|
@@ -118,12 +118,11 @@ var Info = () => {
|
|
|
118
118
|
}
|
|
119
119
|
}, [useDuration, flexibleOption]);
|
|
120
120
|
const getResources = async (cacheItem) => {
|
|
121
|
-
var _a2;
|
|
122
121
|
console.log("getResources2");
|
|
123
122
|
try {
|
|
124
123
|
let _list = state.service.resourcesOrigin || [];
|
|
125
|
-
let autoClose = (_a2 = state.service.cacheItem) == null ? void 0 : _a2.autoClose;
|
|
126
124
|
const _cacheItem = cacheItem || getCurrentCacheItem();
|
|
125
|
+
let autoClose = _cacheItem == null ? void 0 : _cacheItem.autoClose;
|
|
127
126
|
if (!_cacheItem._extend) {
|
|
128
127
|
return;
|
|
129
128
|
}
|
|
@@ -199,6 +198,7 @@ var Info = () => {
|
|
|
199
198
|
};
|
|
200
199
|
const getDiscount = () => {
|
|
201
200
|
var _a2;
|
|
201
|
+
console.log("折扣内", state.service.cacheItem);
|
|
202
202
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
|
203
203
|
let cPrice = Number(useTotal || 0);
|
|
204
204
|
let discount = "";
|
|
@@ -260,21 +260,17 @@ var Info = () => {
|
|
|
260
260
|
addModal: false,
|
|
261
261
|
value: _list,
|
|
262
262
|
edit: true,
|
|
263
|
-
cacheItem: null
|
|
263
|
+
cacheItem: null,
|
|
264
|
+
changeService: false
|
|
264
265
|
}
|
|
265
266
|
});
|
|
266
267
|
};
|
|
267
|
-
const setEditData = (0, import_ahooks.useMemoizedFn)(() => {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
getResources();
|
|
274
|
-
}
|
|
275
|
-
} else {
|
|
276
|
-
setSelectOpen(void 0);
|
|
277
|
-
form.resetFields();
|
|
268
|
+
const setEditData = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
|
|
269
|
+
let cacheItem = _cacheItem || state.service.cacheItem;
|
|
270
|
+
let values = cacheItem._extend;
|
|
271
|
+
form.setFieldsValue(values);
|
|
272
|
+
if (state.renderType !== "eventBooking") {
|
|
273
|
+
getResources(_cacheItem);
|
|
278
274
|
}
|
|
279
275
|
});
|
|
280
276
|
const isReason = (0, import_react.useMemo)(() => {
|
|
@@ -282,7 +278,7 @@ var Info = () => {
|
|
|
282
278
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
|
283
279
|
let cPrice = Number(useTotal || 0);
|
|
284
280
|
return cPrice !== oPrice;
|
|
285
|
-
}, [useTotal, state.service.cacheItem]);
|
|
281
|
+
}, [useTotal, (_e = (_d = state.service.cacheItem) == null ? void 0 : _d._extend) == null ? void 0 : _e.origin_total]);
|
|
286
282
|
const errorList = (0, import_react.useMemo)(() => {
|
|
287
283
|
return (0, import_utils3.getErrorList)(currentResource, getCurrentCacheItem());
|
|
288
284
|
}, [currentResource, useDuration, useStartTime]);
|
|
@@ -298,24 +294,23 @@ var Info = () => {
|
|
|
298
294
|
useDuration,
|
|
299
295
|
state.renderType,
|
|
300
296
|
state.service.resourcesOrigin,
|
|
301
|
-
(
|
|
297
|
+
(_f = state.service.cacheItem) == null ? void 0 : _f.autoClose
|
|
302
298
|
]);
|
|
303
299
|
(0, import_react.useEffect)(() => {
|
|
304
|
-
|
|
305
|
-
}, [state.service.editModal, setEditData]);
|
|
300
|
+
}, [state.service.editModal]);
|
|
306
301
|
(0, import_react.useEffect)(() => {
|
|
307
302
|
getErrorMsg();
|
|
308
303
|
}, [useResource, useStartTime, useDuration]);
|
|
309
304
|
(0, import_react.useEffect)(() => {
|
|
310
305
|
getDiscount();
|
|
311
|
-
}, [useTotal, state.service.cacheItem]);
|
|
306
|
+
}, [useTotal, (_h = (_g = state.service.cacheItem) == null ? void 0 : _g._extend) == null ? void 0 : _h.origin_total]);
|
|
312
307
|
const isDiscount = (0, import_react.useMemo)(() => {
|
|
313
308
|
var _a2, _b2, _c2;
|
|
314
309
|
if (!((_a2 = state.service) == null ? void 0 : _a2.cacheItem)) {
|
|
315
310
|
return false;
|
|
316
311
|
}
|
|
317
312
|
return useTotal != ((_c2 = (_b2 = state.service) == null ? void 0 : _b2.cacheItem) == null ? void 0 : _c2._extend.origin_total);
|
|
318
|
-
}, [useTotal, (
|
|
313
|
+
}, [useTotal, (_j = (_i = state.service) == null ? void 0 : _i.cacheItem) == null ? void 0 : _j._extend.origin_total]);
|
|
319
314
|
(0, import_react.useEffect)(() => {
|
|
320
315
|
if (useResource === 0) {
|
|
321
316
|
handleLikeResource("common");
|
|
@@ -324,7 +319,7 @@ var Info = () => {
|
|
|
324
319
|
const bundles = (0, import_react.useMemo)(() => {
|
|
325
320
|
var _a2, _b2, _c2, _d2;
|
|
326
321
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
|
327
|
-
}, [(
|
|
322
|
+
}, [(_n = (_m = (_l = (_k = state.service) == null ? void 0 : _k.cacheItem) == null ? void 0 : _l._extend) == null ? void 0 : _m.other) == null ? void 0 : _n.bundle]);
|
|
328
323
|
const getResourcesData = async () => {
|
|
329
324
|
setResourceLoading(true);
|
|
330
325
|
try {
|
|
@@ -348,53 +343,103 @@ var Info = () => {
|
|
|
348
343
|
setResourceLoading(false);
|
|
349
344
|
};
|
|
350
345
|
(0, import_react.useEffect)(() => {
|
|
351
|
-
|
|
346
|
+
setTimeout(() => {
|
|
347
|
+
getResourcesData();
|
|
348
|
+
}, 20);
|
|
352
349
|
}, [state.date.value]);
|
|
353
|
-
const
|
|
350
|
+
const handleEdit = (e) => {
|
|
351
|
+
const item = state.service.cacheItem;
|
|
352
|
+
let values = form.getFieldsValue();
|
|
353
|
+
state.action({
|
|
354
|
+
type: "pisell1.handleOpenProductModal",
|
|
355
|
+
data: {
|
|
356
|
+
id: item.id,
|
|
357
|
+
date: state.date.value.format("YYYY-MM-DD"),
|
|
358
|
+
showConfig: {
|
|
359
|
+
option: false,
|
|
360
|
+
session: false,
|
|
361
|
+
variant: false,
|
|
362
|
+
package: true
|
|
363
|
+
},
|
|
364
|
+
value: item._extend.other
|
|
365
|
+
},
|
|
366
|
+
callback: (e2) => {
|
|
367
|
+
let cacheItem = {
|
|
368
|
+
...item,
|
|
369
|
+
product_id: item.id,
|
|
370
|
+
_id: item == null ? void 0 : item._id,
|
|
371
|
+
_key: e2.key,
|
|
372
|
+
_extend: {
|
|
373
|
+
...item._extend,
|
|
374
|
+
// 将当前表单的值覆盖进去
|
|
375
|
+
...values,
|
|
376
|
+
// 覆盖选择的规格和套餐
|
|
377
|
+
other: JSON.parse(JSON.stringify(e2))
|
|
378
|
+
},
|
|
379
|
+
new: 0
|
|
380
|
+
};
|
|
381
|
+
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
382
|
+
cacheItem._extend.total = _total;
|
|
383
|
+
cacheItem._extend.origin_total = _total;
|
|
384
|
+
dispatch({
|
|
385
|
+
type: "setService",
|
|
386
|
+
payload: {
|
|
387
|
+
cacheItem
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
form.setFieldsValue({
|
|
391
|
+
total: _total
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
const handleChange = (e) => {
|
|
397
|
+
if (state.channelDisabledEdit) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
dispatch({
|
|
401
|
+
type: "setService",
|
|
402
|
+
payload: {
|
|
403
|
+
addModal: true,
|
|
404
|
+
editModal: true,
|
|
405
|
+
//用于控制 添加商品 和 编辑服务弹窗的上下层级
|
|
406
|
+
changeService: true
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
(0, import_react.useImperativeHandle)(ref, () => {
|
|
411
|
+
return {
|
|
412
|
+
init: setEditData
|
|
413
|
+
};
|
|
414
|
+
});
|
|
415
|
+
console.log("state.service.value", state.service.value);
|
|
416
|
+
const SelectTime = (_o = window.BaseMaterials) == null ? void 0 : _o.SelectTime;
|
|
354
417
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
355
418
|
import_drawer.default,
|
|
356
419
|
{
|
|
357
|
-
zIndex: 1e3,
|
|
420
|
+
zIndex: state.service.changeService ? 999 : 1e3,
|
|
358
421
|
forceRender: true,
|
|
359
|
-
open: state.service.editModal && !((
|
|
422
|
+
open: state.service.editModal && !((_p = state.service.cacheItem) == null ? void 0 : _p.autoClose),
|
|
360
423
|
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
|
361
424
|
onClose: () => {
|
|
362
425
|
dispatch({
|
|
363
426
|
type: "setService",
|
|
364
427
|
payload: {
|
|
365
428
|
editModal: false,
|
|
366
|
-
cacheItem: null
|
|
429
|
+
cacheItem: null,
|
|
430
|
+
changeService: false
|
|
367
431
|
}
|
|
368
432
|
});
|
|
369
433
|
}
|
|
370
434
|
},
|
|
371
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement(
|
|
372
|
-
|
|
435
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "product_name" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name) || "-"), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleEdit }, import_utils.locales.getText("pisell2.text.edit")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: handleChange }, import_utils.locales.getText("pisell2.text.change"))), /* @__PURE__ */ import_react.default.createElement(
|
|
436
|
+
import_collapsibleList.default,
|
|
373
437
|
{
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
dispatch({
|
|
380
|
-
type: "setService",
|
|
381
|
-
payload: {
|
|
382
|
-
addModal: true,
|
|
383
|
-
editModal: false
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_o = (_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n._extend) == null ? void 0 : _o.product_name) || "-"),
|
|
389
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
390
|
-
import_collapsibleList.default,
|
|
391
|
-
{
|
|
392
|
-
style: { marginTop: bundles.length ? "8px" : 0 },
|
|
393
|
-
list: bundles,
|
|
394
|
-
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
|
395
|
-
}
|
|
396
|
-
)
|
|
397
|
-
))), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
438
|
+
style: { marginTop: bundles.length ? "8px" : 0 },
|
|
439
|
+
list: bundles,
|
|
440
|
+
renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
|
|
441
|
+
}
|
|
442
|
+
)))), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
398
443
|
import_antd.Form.Item,
|
|
399
444
|
{
|
|
400
445
|
label: import_utils.locales.getText("pisell2.text.price"),
|
|
@@ -410,8 +455,8 @@ var Info = () => {
|
|
|
410
455
|
precision: 2,
|
|
411
456
|
style: { width: "100%" },
|
|
412
457
|
min: 0,
|
|
413
|
-
max: ((
|
|
414
|
-
placeholder: ((
|
|
458
|
+
max: ((_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total) || 0,
|
|
459
|
+
placeholder: ((_w = (_v = state.service.cacheItem) == null ? void 0 : _v._extend) == null ? void 0 : _w.origin_total) || "0"
|
|
415
460
|
}
|
|
416
461
|
)
|
|
417
462
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -451,7 +496,7 @@ var Info = () => {
|
|
|
451
496
|
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
452
497
|
SelectTime,
|
|
453
498
|
{
|
|
454
|
-
slice: (
|
|
499
|
+
slice: (_A = (_z = (_y = (_x = state.bookingConfig) == null ? void 0 : _x.config) == null ? void 0 : _y.basic) == null ? void 0 : _z.service_time) == null ? void 0 : _A.value,
|
|
455
500
|
timePickerProps: {
|
|
456
501
|
style: { width: "100%" }
|
|
457
502
|
},
|
|
@@ -551,4 +596,4 @@ var Info = () => {
|
|
|
551
596
|
)))
|
|
552
597
|
));
|
|
553
598
|
};
|
|
554
|
-
var editService_default = Info;
|
|
599
|
+
var editService_default = (0, import_react.forwardRef)(Info);
|
|
@@ -97,10 +97,19 @@
|
|
|
97
97
|
overflow: hidden;
|
|
98
98
|
padding: 11px;
|
|
99
99
|
|
|
100
|
-
.current-service-info-name {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
.current-service-info-name-wrap {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
gap: 12px;
|
|
104
|
+
|
|
105
|
+
.current-service-info-name {
|
|
106
|
+
font-size: 16px;
|
|
107
|
+
color: #101828;
|
|
108
|
+
font-weight: 650;
|
|
109
|
+
flex: 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.current-service-info-change-btn {}
|
|
104
113
|
}
|
|
105
114
|
|
|
106
115
|
&:hover {
|
|
@@ -42,6 +42,7 @@ var import_addTimeModal = __toESM(require("./addTimeModal"));
|
|
|
42
42
|
var Service = () => {
|
|
43
43
|
var _a, _b;
|
|
44
44
|
const { state } = (0, import_react.useContext)(import_model.Context);
|
|
45
|
+
const detailRef = (0, import_react.useRef)();
|
|
45
46
|
(0, import_react.useEffect)(() => {
|
|
46
47
|
document.body.id = "body";
|
|
47
48
|
}, []);
|
|
@@ -63,6 +64,12 @@ var Service = () => {
|
|
|
63
64
|
}
|
|
64
65
|
return true;
|
|
65
66
|
}, [state, appointment_card.quick_time]);
|
|
66
|
-
|
|
67
|
+
const handleEdit = (cacheItem) => {
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
var _a2, _b2;
|
|
70
|
+
(_b2 = (_a2 = detailRef.current) == null ? void 0 : _a2.init) == null ? void 0 : _b2.call(_a2, cacheItem);
|
|
71
|
+
}, 100);
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_serviceList.default, { onEdit: handleEdit }), /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit })), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null));
|
|
67
74
|
};
|
|
68
75
|
var service_default = Service;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
declare const ServiceList: (
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare const ServiceList: ({ onEdit }: {
|
|
4
|
+
onEdit: any;
|
|
5
|
+
}) => React.JSX.Element;
|
|
4
6
|
export default ServiceList;
|
|
@@ -39,7 +39,7 @@ var import_model = require("../../model");
|
|
|
39
39
|
var import_mock = require("../../../mock");
|
|
40
40
|
var import_utils2 = require("../../../utils");
|
|
41
41
|
var import_serviceItem = __toESM(require("../serviceItem"));
|
|
42
|
-
var ServiceList = () => {
|
|
42
|
+
var ServiceList = ({ onEdit }) => {
|
|
43
43
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
44
44
|
const errorTypes = {
|
|
45
45
|
product: import_utils.locales.getText("pisell2.text.status.service-error-1"),
|
|
@@ -57,6 +57,7 @@ var ServiceList = () => {
|
|
|
57
57
|
cacheItem: { ...item, new: 0 }
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
+
onEdit == null ? void 0 : onEdit({ ...item, new: 0 });
|
|
60
61
|
};
|
|
61
62
|
const getResourceItem = (0, import_react.useCallback)(
|
|
62
63
|
(id) => {
|
|
@@ -55,7 +55,7 @@ var moveItemToFront = (arr, targetId) => {
|
|
|
55
55
|
return arr;
|
|
56
56
|
};
|
|
57
57
|
var isInterval = (time1, time2, interval = 1e3) => {
|
|
58
|
-
return time2 - time1 < interval;
|
|
58
|
+
return Math.abs(time2 - time1) < interval;
|
|
59
59
|
};
|
|
60
60
|
var formatServiceListByTime = (list) => {
|
|
61
61
|
var _a, _b;
|
|
@@ -172,6 +172,20 @@ declare const _default: {
|
|
|
172
172
|
list: any[];
|
|
173
173
|
}) => string;
|
|
174
174
|
'page.event.booking.text.duplicate-enrollment-confirm': string;
|
|
175
|
+
'page.booking.text.unconfirmed-payements': string;
|
|
176
|
+
'page.booking.text.unconfirmed-payements.msg': string;
|
|
177
|
+
'page.booking.text.go-to-payments': string;
|
|
178
|
+
'page.booking.text.cancel-only': string;
|
|
179
|
+
'page.booking.text.refund': string;
|
|
180
|
+
'page.booking.text.confirm': string;
|
|
181
|
+
'page.booking.text.go-back': string;
|
|
182
|
+
'page.booking.text.cancel-booking': string;
|
|
183
|
+
'page.booking.text.cancel-booking.msg': string;
|
|
184
|
+
'page.booking.text.disabled-tickets': string;
|
|
185
|
+
'page.booking.text.paid.msg': (x: string) => string;
|
|
186
|
+
'page.booking.text.please-choose-an-option': string;
|
|
187
|
+
'page.booking.text.please-choose-an-option-1': string;
|
|
188
|
+
'page.booking.text.please-choose-an-option-2': string;
|
|
175
189
|
};
|
|
176
190
|
'zh-CN': {
|
|
177
191
|
'pisell2.text.refunded-amount': string;
|
|
@@ -346,6 +360,20 @@ declare const _default: {
|
|
|
346
360
|
list: any[];
|
|
347
361
|
}) => string;
|
|
348
362
|
'page.event.booking.text.duplicate-enrollment-confirm': string;
|
|
363
|
+
'page.booking.text.unconfirmed-payements': string;
|
|
364
|
+
'page.booking.text.unconfirmed-payements.msg': string;
|
|
365
|
+
'page.booking.text.go-to-payments': string;
|
|
366
|
+
'page.booking.text.cancel-only': string;
|
|
367
|
+
'page.booking.text.refund': string;
|
|
368
|
+
'page.booking.text.confirm': string;
|
|
369
|
+
'page.booking.text.go-back': string;
|
|
370
|
+
'page.booking.text.cancel-booking': string;
|
|
371
|
+
'page.booking.text.cancel-booking.msg': string;
|
|
372
|
+
'page.booking.text.disabled-tickets': string;
|
|
373
|
+
'page.booking.text.paid.msg': (x: string) => string;
|
|
374
|
+
'page.booking.text.please-choose-an-option': string;
|
|
375
|
+
'page.booking.text.please-choose-an-option-1': string;
|
|
376
|
+
'page.booking.text.please-choose-an-option-2': string;
|
|
349
377
|
};
|
|
350
378
|
'zh-HK': {
|
|
351
379
|
'pisell2.text.refunded-amount': string;
|
|
@@ -520,6 +548,20 @@ declare const _default: {
|
|
|
520
548
|
list: any[];
|
|
521
549
|
}) => string;
|
|
522
550
|
'page.event.booking.text.duplicate-enrollment-confirm': string;
|
|
551
|
+
'page.booking.text.unconfirmed-payements': string;
|
|
552
|
+
'page.booking.text.unconfirmed-payements.msg': string;
|
|
553
|
+
'page.booking.text.go-to-payments': string;
|
|
554
|
+
'page.booking.text.cancel-only': string;
|
|
555
|
+
'page.booking.text.refund': string;
|
|
556
|
+
'page.booking.text.confirm': string;
|
|
557
|
+
'page.booking.text.go-back': string;
|
|
558
|
+
'page.booking.text.cancel-booking': string;
|
|
559
|
+
'page.booking.text.cancel-booking.msg': string;
|
|
560
|
+
'page.booking.text.disabled-tickets': string;
|
|
561
|
+
'page.booking.text.paid.msg': (x: string) => string;
|
|
562
|
+
'page.booking.text.please-choose-an-option': string;
|
|
563
|
+
'page.booking.text.please-choose-an-option-1': string;
|
|
564
|
+
'page.booking.text.please-choose-an-option-2': string;
|
|
523
565
|
};
|
|
524
566
|
};
|
|
525
567
|
export default _default;
|
|
@@ -92,7 +92,7 @@ var locales_default = {
|
|
|
92
92
|
"pisell2.text.status.confirmed": "Confirmed",
|
|
93
93
|
"pisell2.text.status.arrived": "Arrived",
|
|
94
94
|
"pisell2.text.status.started": "Started",
|
|
95
|
-
"pisell2.text.status.cancelled": "
|
|
95
|
+
"pisell2.text.status.cancelled": "Cancel",
|
|
96
96
|
"pisell2.text.status.no_show": "No show",
|
|
97
97
|
"pisell2.text.status.completed": "Completed",
|
|
98
98
|
"pisell2.text.status.booking_id": "Booking ID",
|
|
@@ -226,7 +226,21 @@ var locales_default = {
|
|
|
226
226
|
});
|
|
227
227
|
return `${customerName || ""} has already enrolled in the ${title} ${listStr.join(",")}, Are you sure you want to enroll again?`;
|
|
228
228
|
},
|
|
229
|
-
"page.event.booking.text.duplicate-enrollment-confirm": "Confirm"
|
|
229
|
+
"page.event.booking.text.duplicate-enrollment-confirm": "Confirm",
|
|
230
|
+
"page.booking.text.unconfirmed-payements": "Unconfirmed payements",
|
|
231
|
+
"page.booking.text.unconfirmed-payements.msg": "There are unconfirmed payments, please confirm or void the payments first.",
|
|
232
|
+
"page.booking.text.go-to-payments": "Go to payments",
|
|
233
|
+
"page.booking.text.cancel-only": "Cancel only",
|
|
234
|
+
"page.booking.text.refund": "Refund",
|
|
235
|
+
"page.booking.text.confirm": "Confirm",
|
|
236
|
+
"page.booking.text.go-back": "Go back",
|
|
237
|
+
"page.booking.text.cancel-booking": "Cancel Booking",
|
|
238
|
+
"page.booking.text.cancel-booking.msg": "The action is irreversible. Please proceed with caution. ",
|
|
239
|
+
"page.booking.text.disabled-tickets": "All tickets will be disabled.",
|
|
240
|
+
"page.booking.text.paid.msg": (x) => `The related order is ${x === "paid" ? "paid" : "partially paid"}.`,
|
|
241
|
+
"page.booking.text.please-choose-an-option": "Please choose an option:",
|
|
242
|
+
"page.booking.text.please-choose-an-option-1": "Refund: Cancel the appointment and process a refund.",
|
|
243
|
+
"page.booking.text.please-choose-an-option-2": "Cancel only: Cancel the appointment without processing a refund. (You can still process a refund after cancellation if needed)"
|
|
230
244
|
},
|
|
231
245
|
"zh-CN": {
|
|
232
246
|
"pisell2.text.refunded-amount": "已退金额",
|
|
@@ -294,7 +308,7 @@ var locales_default = {
|
|
|
294
308
|
"pisell2.text.status.confirmed": "已确认",
|
|
295
309
|
"pisell2.text.status.arrived": "已到达",
|
|
296
310
|
"pisell2.text.status.started": "已开始",
|
|
297
|
-
"pisell2.text.status.cancelled": "
|
|
311
|
+
"pisell2.text.status.cancelled": "取消",
|
|
298
312
|
"pisell2.text.status.no_show": "失约",
|
|
299
313
|
"pisell2.text.status.completed": "已完成",
|
|
300
314
|
"pisell2.text.status.booking_id": "预约 ID",
|
|
@@ -425,7 +439,21 @@ var locales_default = {
|
|
|
425
439
|
});
|
|
426
440
|
return `${customerName || ""}已报名${title} ${listStr.join(",")}, 确定要再次报名吗?`;
|
|
427
441
|
},
|
|
428
|
-
"page.event.booking.text.duplicate-enrollment-confirm": "确认"
|
|
442
|
+
"page.event.booking.text.duplicate-enrollment-confirm": "确认",
|
|
443
|
+
"page.booking.text.unconfirmed-payements": "未确认的付款",
|
|
444
|
+
"page.booking.text.unconfirmed-payements.msg": "存在未确认的付款,请先确认收款或作废。",
|
|
445
|
+
"page.booking.text.go-to-payments": "前往收款界面",
|
|
446
|
+
"page.booking.text.cancel-only": "仅取消",
|
|
447
|
+
"page.booking.text.refund": "退款",
|
|
448
|
+
"page.booking.text.confirm": "确认",
|
|
449
|
+
"page.booking.text.go-back": "返回",
|
|
450
|
+
"page.booking.text.cancel-booking": "取消预约",
|
|
451
|
+
"page.booking.text.cancel-booking.msg": "该操作不可撤销,请谨慎操作。",
|
|
452
|
+
"page.booking.text.disabled-tickets": "所有票单将被禁用。",
|
|
453
|
+
"page.booking.text.paid.msg": (x) => `关联订单${x === "paid" ? "已支付" : "部分支付"}。`,
|
|
454
|
+
"page.booking.text.please-choose-an-option": "请选择:",
|
|
455
|
+
"page.booking.text.please-choose-an-option-1": "退款:取消预约,同时处理退款。",
|
|
456
|
+
"page.booking.text.please-choose-an-option-2": "仅取消:仅取消预约,但不进行退款处理。(您仍然可以在取消后再进行退款操作)"
|
|
429
457
|
},
|
|
430
458
|
"zh-HK": {
|
|
431
459
|
"pisell2.text.refunded-amount": "已退金額",
|
|
@@ -491,7 +519,7 @@ var locales_default = {
|
|
|
491
519
|
"pisell2.text.status.confirmed": "已确認",
|
|
492
520
|
"pisell2.text.status.arrived": "已到達",
|
|
493
521
|
"pisell2.text.status.started": "已開始",
|
|
494
|
-
"pisell2.text.status.cancelled": "
|
|
522
|
+
"pisell2.text.status.cancelled": "取消",
|
|
495
523
|
"pisell2.text.status.no_show": "失約",
|
|
496
524
|
"pisell2.text.status.completed": "已完成",
|
|
497
525
|
"pisell2.text.status.booking_id": "預約 ID",
|
|
@@ -624,6 +652,20 @@ var locales_default = {
|
|
|
624
652
|
});
|
|
625
653
|
return `${customerName || ""}已報名${title} ${listStr.join(",")}, 確定要再次報名嗎?`;
|
|
626
654
|
},
|
|
627
|
-
"page.event.booking.text.duplicate-enrollment-confirm": "確認"
|
|
655
|
+
"page.event.booking.text.duplicate-enrollment-confirm": "確認",
|
|
656
|
+
"page.booking.text.unconfirmed-payements": "未確認的付款",
|
|
657
|
+
"page.booking.text.unconfirmed-payements.msg": "存在未確認的付款,請先確認收款或作廢。",
|
|
658
|
+
"page.booking.text.go-to-payments": "前往收款界面",
|
|
659
|
+
"page.booking.text.cancel-only": "僅取消",
|
|
660
|
+
"page.booking.text.refund": "退款",
|
|
661
|
+
"page.booking.text.confirm": "確認",
|
|
662
|
+
"page.booking.text.go-back": "返回",
|
|
663
|
+
"page.booking.text.cancel-booking": "取消預約",
|
|
664
|
+
"page.booking.text.cancel-booking.msg": "該操作不可撤銷,請謹慎操作。",
|
|
665
|
+
"page.booking.text.disabled-tickets": "所有票單將被禁用。",
|
|
666
|
+
"page.booking.text.paid.msg": (x) => `關聯訂單${x === "paid" ? "已支付" : "部分支付"}。`,
|
|
667
|
+
"page.booking.text.please-choose-an-option": "請選擇:",
|
|
668
|
+
"page.booking.text.please-choose-an-option-1": "退款:取消預約,同時處理退款。",
|
|
669
|
+
"page.booking.text.please-choose-an-option-2": "僅取消:僅取消預約,但不進行退款處理。(您仍然可以在取消後再進行退款操作)"
|
|
628
670
|
}
|
|
629
671
|
};
|
|
@@ -40,6 +40,7 @@ export interface FormState {
|
|
|
40
40
|
cacheItem: any;
|
|
41
41
|
edit: boolean;
|
|
42
42
|
addTimeModal: boolean;
|
|
43
|
+
changeService: any;
|
|
43
44
|
};
|
|
44
45
|
pet: {
|
|
45
46
|
showModal: boolean;
|
|
@@ -73,7 +74,7 @@ export interface FormState {
|
|
|
73
74
|
bookingId: string | number;
|
|
74
75
|
bookingDetail: any;
|
|
75
76
|
channelDisabledEdit: boolean;
|
|
76
|
-
renderType?:
|
|
77
|
+
renderType?: 'eventBooking';
|
|
77
78
|
modalOpen?: boolean;
|
|
78
79
|
isTerminal?: boolean;
|
|
79
80
|
isFranchisee?: boolean;
|
|
@@ -81,7 +82,7 @@ export interface FormState {
|
|
|
81
82
|
eventOtherParams?: {
|
|
82
83
|
relation_id: number;
|
|
83
84
|
number: number;
|
|
84
|
-
registration_type:
|
|
85
|
+
registration_type: 'single' | 'all' | 'extra_include';
|
|
85
86
|
start_date: string;
|
|
86
87
|
start_time: string;
|
|
87
88
|
end_date: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,7 +68,7 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
71
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
73
72
|
state: FormState;
|
|
74
73
|
} & {
|
|
75
74
|
dispatch: (params: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.120",
|
|
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/materials": "3.0.38",
|
|
64
|
-
"@pisell/
|
|
65
|
-
"@pisell/
|
|
64
|
+
"@pisell/utils": "1.0.28",
|
|
65
|
+
"@pisell/date-picker": "1.0.97"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|