@pisell/private-materials 3.0.67 → 3.0.68
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 +7 -7
- package/es/components/booking/info/index.js +5 -4
- package/es/components/booking/info/service/editService/index.js +19 -4
- package/es/components/booking/utils.js +1 -1
- package/lib/components/booking/info/index.js +3 -2
- package/lib/components/booking/info/service/editService/index.js +21 -6
- package/lib/components/booking/utils.js +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ var defaultModules = {
|
|
|
30
30
|
};
|
|
31
31
|
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
32
32
|
var Info = Provider(function (props) {
|
|
33
|
-
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$
|
|
33
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
|
|
34
34
|
// return <Payments {...props} />;
|
|
35
35
|
var style = props.style,
|
|
36
36
|
globalState = props.globalState,
|
|
@@ -61,7 +61,7 @@ var Info = Provider(function (props) {
|
|
|
61
61
|
}
|
|
62
62
|
}, []);
|
|
63
63
|
useEffect(function () {
|
|
64
|
-
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2;
|
|
64
|
+
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
|
|
65
65
|
var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
|
|
66
66
|
modal.dispatch({
|
|
67
67
|
type: "setState",
|
|
@@ -69,7 +69,8 @@ var Info = Provider(function (props) {
|
|
|
69
69
|
setGlobalState: props.setGlobalState
|
|
70
70
|
}, globalState), {}, {
|
|
71
71
|
isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
|
|
72
|
-
isFranchisee: isFranchisee
|
|
72
|
+
isFranchisee: isFranchisee,
|
|
73
|
+
timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
|
|
73
74
|
})
|
|
74
75
|
});
|
|
75
76
|
}, [globalState]);
|
|
@@ -115,7 +116,7 @@ var Info = Provider(function (props) {
|
|
|
115
116
|
source: "info"
|
|
116
117
|
})
|
|
117
118
|
}, _defineProperty(_React$createElement, "style", {
|
|
118
|
-
height: context !== null && context !== void 0 && (_context$
|
|
119
|
+
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? "100%" : "100vh"
|
|
119
120
|
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
120
121
|
className: "booking-info"
|
|
121
122
|
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === "form" ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
|
|
@@ -29,12 +29,13 @@ import "./index.less";
|
|
|
29
29
|
import CollapsibleList from "../../../components/collapsibleList";
|
|
30
30
|
import { renderBundles } from "../../../components/collapsibleList/utils";
|
|
31
31
|
import { useUpdateEffect, useMemoizedFn } from "ahooks";
|
|
32
|
+
// import SelectTime from "../../../../../../../materials/src/components/select-time";
|
|
32
33
|
import { getErrorList, getServiceTimes, deleteCacheParams } from "../../../utils";
|
|
33
34
|
import Like from "../like";
|
|
34
35
|
import { getNoResource } from "../../../mock";
|
|
35
36
|
import { formatResources, getDurationProps, getFlexibleOption, getTimeObj } from "../addService/utils";
|
|
36
37
|
var Info = function Info() {
|
|
37
|
-
var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$service3, _state$service3$cache, _state$service5, _state$service5$cache, _state$service5$cache2, _state$service5$cache3, _state$service$cacheI5, _state$service6, _state$service6$cache, _state$service6$cache2, _state$service$cacheI6, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9;
|
|
38
|
+
var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$service3, _state$service3$cache, _state$service5, _state$service5$cache, _state$service5$cache2, _state$service5$cache3, _window$BaseMaterials, _state$service$cacheI5, _state$service6, _state$service6$cache, _state$service6$cache2, _state$service$cacheI6, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7, _state$bookingConfig8;
|
|
38
39
|
var _Form$useForm = Form.useForm(),
|
|
39
40
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
40
41
|
form = _Form$useForm2[0];
|
|
@@ -540,6 +541,7 @@ var Info = function Info() {
|
|
|
540
541
|
useEffect(function () {
|
|
541
542
|
getResourcesData();
|
|
542
543
|
}, [state.date.value]);
|
|
544
|
+
var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
|
|
543
545
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
|
|
544
546
|
zIndex: 1000,
|
|
545
547
|
forceRender: true,
|
|
@@ -642,9 +644,22 @@ var Info = function Info() {
|
|
|
642
644
|
rules: [{
|
|
643
645
|
required: true
|
|
644
646
|
}]
|
|
645
|
-
}, /*#__PURE__*/React.createElement(
|
|
646
|
-
|
|
647
|
-
|
|
647
|
+
}, SelectTime ? /*#__PURE__*/React.createElement(SelectTime, {
|
|
648
|
+
slice: (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : (_state$bookingConfig6 = _state$bookingConfig5.config) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.basic) === null || _state$bookingConfig7 === void 0 ? void 0 : (_state$bookingConfig8 = _state$bookingConfig7.service_time) === null || _state$bookingConfig8 === void 0 ? void 0 : _state$bookingConfig8.value,
|
|
649
|
+
onChange: function onChange(e) {
|
|
650
|
+
console.log("eeee", e);
|
|
651
|
+
},
|
|
652
|
+
timePickerProps: {
|
|
653
|
+
style: {
|
|
654
|
+
width: "100%"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
timeProps: {
|
|
658
|
+
style: {
|
|
659
|
+
zoom: 0.8
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}) : null)), /*#__PURE__*/React.createElement(Col, {
|
|
648
663
|
span: 12
|
|
649
664
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
650
665
|
label: locales.getText("pisell2.text.duration"),
|
|
@@ -576,7 +576,7 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
576
576
|
_extend.start_time = findNextSlice(findNextSliceProps);
|
|
577
577
|
} else {
|
|
578
578
|
// 没有预设日期, 则使用当前 https://www.yuque.com/feg4xm/manual/tzvrnt05ifihkndg
|
|
579
|
-
_extend.start_time = '
|
|
579
|
+
_extend.start_time = dayjs().format('HH:mm');
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
_extend = _objectSpread(_objectSpread({}, _extend), cacheItem._extend);
|
|
@@ -83,7 +83,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
83
83
|
}
|
|
84
84
|
}, []);
|
|
85
85
|
(0, import_react.useEffect)(() => {
|
|
86
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
86
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j, _k, _l, _m;
|
|
87
87
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
88
88
|
modal.dispatch({
|
|
89
89
|
type: "setState",
|
|
@@ -91,7 +91,8 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
91
91
|
setGlobalState: props.setGlobalState,
|
|
92
92
|
...globalState,
|
|
93
93
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
94
|
-
isFranchisee
|
|
94
|
+
isFranchisee,
|
|
95
|
+
timezone: (_m = (_l = (_k = (_j = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j.getState()) == null ? void 0 : _k.global) == null ? void 0 : _l.globalConfig) == null ? void 0 : _m.timezone
|
|
95
96
|
}
|
|
96
97
|
});
|
|
97
98
|
}, [globalState]);
|
|
@@ -48,7 +48,7 @@ var import_like = __toESM(require("../like"));
|
|
|
48
48
|
var import_mock = require("../../../mock");
|
|
49
49
|
var import_utils4 = require("../addService/utils");
|
|
50
50
|
var Info = () => {
|
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
52
52
|
const [form] = import_antd.Form.useForm();
|
|
53
53
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
54
54
|
const useLikeStatus = import_antd.Form.useWatch("like_status", form);
|
|
@@ -331,12 +331,13 @@ var Info = () => {
|
|
|
331
331
|
(0, import_react.useEffect)(() => {
|
|
332
332
|
getResourcesData();
|
|
333
333
|
}, [state.date.value]);
|
|
334
|
+
const SelectTime = (_j = window.BaseMaterials) == null ? void 0 : _j.SelectTime;
|
|
334
335
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
335
336
|
import_drawer.default,
|
|
336
337
|
{
|
|
337
338
|
zIndex: 1e3,
|
|
338
339
|
forceRender: true,
|
|
339
|
-
open: state.service.editModal && !((
|
|
340
|
+
open: state.service.editModal && !((_k = state.service.cacheItem) == null ? void 0 : _k.autoClose),
|
|
340
341
|
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
|
341
342
|
onClose: () => {
|
|
342
343
|
dispatch({
|
|
@@ -365,7 +366,7 @@ var Info = () => {
|
|
|
365
366
|
});
|
|
366
367
|
}
|
|
367
368
|
},
|
|
368
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((
|
|
369
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "current-service-info-name" }, ((_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.product_name) || "-"),
|
|
369
370
|
/* @__PURE__ */ import_react.default.createElement(
|
|
370
371
|
import_collapsibleList.default,
|
|
371
372
|
{
|
|
@@ -390,8 +391,8 @@ var Info = () => {
|
|
|
390
391
|
precision: 2,
|
|
391
392
|
style: { width: "100%" },
|
|
392
393
|
min: 0,
|
|
393
|
-
max: ((
|
|
394
|
-
placeholder: ((
|
|
394
|
+
max: ((_p = (_o = state.service.cacheItem) == null ? void 0 : _o._extend) == null ? void 0 : _p.origin_total) || 0,
|
|
395
|
+
placeholder: ((_r = (_q = state.service.cacheItem) == null ? void 0 : _q._extend) == null ? void 0 : _r.origin_total) || "0"
|
|
395
396
|
}
|
|
396
397
|
)
|
|
397
398
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -428,7 +429,21 @@ var Info = () => {
|
|
|
428
429
|
name: "start_time",
|
|
429
430
|
rules: [{ required: true }]
|
|
430
431
|
},
|
|
431
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
432
|
+
SelectTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
433
|
+
SelectTime,
|
|
434
|
+
{
|
|
435
|
+
slice: (_v = (_u = (_t = (_s = state.bookingConfig) == null ? void 0 : _s.config) == null ? void 0 : _t.basic) == null ? void 0 : _u.service_time) == null ? void 0 : _v.value,
|
|
436
|
+
onChange: (e) => {
|
|
437
|
+
console.log("eeee", e);
|
|
438
|
+
},
|
|
439
|
+
timePickerProps: {
|
|
440
|
+
style: { width: "100%" }
|
|
441
|
+
},
|
|
442
|
+
timeProps: {
|
|
443
|
+
style: { zoom: 0.8 }
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
) : null
|
|
432
447
|
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
|
|
433
448
|
import_antd.Form.Item,
|
|
434
449
|
{
|
|
@@ -440,7 +440,7 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
|
440
440
|
if (findNextSliceProps.date && findNextSliceProps.date !== "00:00") {
|
|
441
441
|
_extend.start_time = findNextSlice(findNextSliceProps);
|
|
442
442
|
} else {
|
|
443
|
-
_extend.start_time = "
|
|
443
|
+
_extend.start_time = (0, import_dayjs.default)().format("HH:mm");
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
_extend = {
|