@pisell/private-materials 3.0.66 → 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 +4 -4
- package/build/lowcode/view.js +7 -7
- package/es/components/booking/components/footer/index.js +20 -10
- 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/components/footer/index.js +20 -18
- 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
|
@@ -408,6 +408,16 @@ var Footer = function Footer(props) {
|
|
|
408
408
|
* @Date: 2024-01-30 16:57
|
|
409
409
|
*/
|
|
410
410
|
var handleRefund = function handleRefund() {
|
|
411
|
+
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
412
|
+
var _interaction$utils2, _interaction$utils2$p;
|
|
413
|
+
return interaction === null || interaction === void 0 ? void 0 : (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 ? void 0 : (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 ? void 0 : _interaction$utils2$p.call(_interaction$utils2, {
|
|
414
|
+
module: "booking",
|
|
415
|
+
key: "booking_refund",
|
|
416
|
+
data: {
|
|
417
|
+
order_id: state.bookingId
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
}
|
|
411
421
|
state.action({
|
|
412
422
|
type: "pisell1.handleRefund",
|
|
413
423
|
data: {
|
|
@@ -466,9 +476,9 @@ var Footer = function Footer(props) {
|
|
|
466
476
|
id: res === null || res === void 0 ? void 0 : res.customer_id
|
|
467
477
|
} : state.bookingDetail.customer;
|
|
468
478
|
case 8:
|
|
469
|
-
if (e.key ===
|
|
479
|
+
if (e.key === "sendMail") {
|
|
470
480
|
state.action({
|
|
471
|
-
type:
|
|
481
|
+
type: "pisell1.sendPayLinkEmail",
|
|
472
482
|
data: {
|
|
473
483
|
id: id,
|
|
474
484
|
is_deposit: state.bookingDetail.is_deposit || Number((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.deposit_amount),
|
|
@@ -479,9 +489,9 @@ var Footer = function Footer(props) {
|
|
|
479
489
|
callback: function callback() {}
|
|
480
490
|
});
|
|
481
491
|
}
|
|
482
|
-
if (e.key ===
|
|
492
|
+
if (e.key === "copy") {
|
|
483
493
|
state.action({
|
|
484
|
-
type:
|
|
494
|
+
type: "pisell1.genClientPayLink",
|
|
485
495
|
data: {
|
|
486
496
|
id: id
|
|
487
497
|
},
|
|
@@ -500,11 +510,11 @@ var Footer = function Footer(props) {
|
|
|
500
510
|
}();
|
|
501
511
|
var paymentLinkButton = useMemo(function () {
|
|
502
512
|
var items = [{
|
|
503
|
-
label: locales.getText(
|
|
504
|
-
key:
|
|
513
|
+
label: locales.getText("pisell2.text.send-mail"),
|
|
514
|
+
key: "sendMail"
|
|
505
515
|
}, {
|
|
506
|
-
label: locales.getText(
|
|
507
|
-
key:
|
|
516
|
+
label: locales.getText("pisell2.text.copy-to-clipboard"),
|
|
517
|
+
key: "copy"
|
|
508
518
|
}];
|
|
509
519
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
510
520
|
menu: {
|
|
@@ -513,7 +523,7 @@ var Footer = function Footer(props) {
|
|
|
513
523
|
}
|
|
514
524
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
515
525
|
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
516
|
-
}, /*#__PURE__*/React.createElement(Space, null, locales.getText(
|
|
526
|
+
}, /*#__PURE__*/React.createElement(Space, null, locales.getText("pisell2.text.payment-link"), /*#__PURE__*/React.createElement(DownOutlined, null))));
|
|
517
527
|
}, [handleMenuClick]);
|
|
518
528
|
|
|
519
529
|
/**
|
|
@@ -667,7 +677,7 @@ var Footer = function Footer(props) {
|
|
|
667
677
|
var isOnlyDeposit = useMemo(function () {
|
|
668
678
|
var _state$bookingDetail6, _state$bookingDetail7, _state$bookingDetail8, _state$bookingDetail9;
|
|
669
679
|
if (state !== null && state !== void 0 && (_state$bookingDetail6 = state.bookingDetail) !== null && _state$bookingDetail6 !== void 0 && _state$bookingDetail6.deposit_payment_time && state !== null && state !== void 0 && (_state$bookingDetail7 = state.bookingDetail) !== null && _state$bookingDetail7 !== void 0 && (_state$bookingDetail8 = _state$bookingDetail7.payment_types) !== null && _state$bookingDetail8 !== void 0 && (_state$bookingDetail9 = _state$bookingDetail8.every) !== null && _state$bookingDetail9 !== void 0 && _state$bookingDetail9.call(_state$bookingDetail8, function (item) {
|
|
670
|
-
return item ===
|
|
680
|
+
return item === "deposit";
|
|
671
681
|
})) {
|
|
672
682
|
return true;
|
|
673
683
|
}
|
|
@@ -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);
|
|
@@ -161,7 +161,10 @@ var Footer = (props) => {
|
|
|
161
161
|
console.log("state.bookingId && state.addons.edit", err);
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
-
const handleSave = async ({
|
|
164
|
+
const handleSave = async ({
|
|
165
|
+
type,
|
|
166
|
+
messageShow = true
|
|
167
|
+
}) => {
|
|
165
168
|
var _a2;
|
|
166
169
|
let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
|
|
167
170
|
_setLoading(true);
|
|
@@ -212,6 +215,16 @@ var Footer = (props) => {
|
|
|
212
215
|
state == null ? void 0 : state.callback({ order_id: state.bookingId });
|
|
213
216
|
};
|
|
214
217
|
const handleRefund = () => {
|
|
218
|
+
var _a2, _b2;
|
|
219
|
+
if (isTerminal == null ? void 0 : isTerminal()) {
|
|
220
|
+
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
221
|
+
module: "booking",
|
|
222
|
+
key: "booking_refund",
|
|
223
|
+
data: {
|
|
224
|
+
order_id: state.bookingId
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
}
|
|
215
228
|
state.action({
|
|
216
229
|
type: "pisell1.handleRefund",
|
|
217
230
|
data: {
|
|
@@ -276,19 +289,7 @@ var Footer = (props) => {
|
|
|
276
289
|
{ label: import_utils.locales.getText("pisell2.text.send-mail"), key: "sendMail" },
|
|
277
290
|
{ label: import_utils.locales.getText("pisell2.text.copy-to-clipboard"), key: "copy" }
|
|
278
291
|
];
|
|
279
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
280
|
-
import_antd.Dropdown,
|
|
281
|
-
{
|
|
282
|
-
menu: { items, onClick: handleMenuClick }
|
|
283
|
-
},
|
|
284
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
285
|
-
import_antd2.Button,
|
|
286
|
-
{
|
|
287
|
-
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
288
|
-
},
|
|
289
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, import_utils.locales.getText("pisell2.text.payment-link"), /* @__PURE__ */ import_react.default.createElement(import_icons.DownOutlined, null))
|
|
290
|
-
)
|
|
291
|
-
);
|
|
292
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items, onClick: handleMenuClick } }, /* @__PURE__ */ import_react.default.createElement(import_antd2.Button, { className: "pisell-lowcode__booking-footer-buttons-item" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, import_utils.locales.getText("pisell2.text.payment-link"), /* @__PURE__ */ import_react.default.createElement(import_icons.DownOutlined, null))));
|
|
292
293
|
}, [handleMenuClick]);
|
|
293
294
|
const saveButton = (0, import_react.useMemo)(() => {
|
|
294
295
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -410,7 +411,10 @@ var Footer = (props) => {
|
|
|
410
411
|
]);
|
|
411
412
|
const isOnlyDeposit = (0, import_react.useMemo)(() => {
|
|
412
413
|
var _a2, _b2, _c2, _d2;
|
|
413
|
-
if (((_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.deposit_payment_time) && ((_d2 = (_c2 = (_b2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _b2.payment_types) == null ? void 0 : _c2.every) == null ? void 0 : _d2.call(
|
|
414
|
+
if (((_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.deposit_payment_time) && ((_d2 = (_c2 = (_b2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _b2.payment_types) == null ? void 0 : _c2.every) == null ? void 0 : _d2.call(
|
|
415
|
+
_c2,
|
|
416
|
+
(item) => item === "deposit"
|
|
417
|
+
))) {
|
|
414
418
|
return true;
|
|
415
419
|
}
|
|
416
420
|
return false;
|
|
@@ -419,9 +423,7 @@ var Footer = (props) => {
|
|
|
419
423
|
var _a2;
|
|
420
424
|
let str = "";
|
|
421
425
|
if (isOnlyDeposit) {
|
|
422
|
-
return `${import_utils.locales.getText(
|
|
423
|
-
"pisell2.text.deposit-paid"
|
|
424
|
-
)} ${(0, import_utils.formatAmount)(
|
|
426
|
+
return `${import_utils.locales.getText("pisell2.text.deposit-paid")} ${(0, import_utils.formatAmount)(
|
|
425
427
|
(_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.deposit_amount,
|
|
426
428
|
2,
|
|
427
429
|
(state == null ? void 0 : state.amountSymbol) || "$"
|
|
@@ -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 = {
|