@pisell/private-materials 6.2.32 → 6.2.33
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 +11 -11
- 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 +7 -7
- package/es/components/booking/components/footer/index.js +15 -5
- package/es/components/booking/components/footer/index.less +23 -0
- package/es/components/booking/components/tabPane/index.less +3 -3
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/Lists.js +1 -1
- package/es/components/booking/info/service2/utils.js +18 -17
- package/es/components/booking/info2/cartClientCard/index.js +60 -67
- package/es/components/booking/info2/service/editService/index.js +71 -11
- package/es/components/booking/info2/service/editService/index.less +47 -11
- package/es/components/booking/locales.js +4 -4
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/productSelect/components/productGroup/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.js +4 -3
- package/es/components/ticketBooking/components/timeBar/index.js +4 -1
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +23 -18
- package/es/components/ticketBooking/locales.js +3 -0
- package/es/plus/clientCard/locales.js +2 -2
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/clinetSearch/index.d.ts +0 -1
- package/es/plus/clinetSearch/index.js +6 -6
- package/es/plus/clinetSearch/index.less +4 -0
- package/es/pro/comprehensiveSearch/index.d.ts +1 -3
- package/es/pro/comprehensiveSearch/index.js +18 -49
- package/es/pro/comprehensiveSearch/index.less +1 -6
- package/es/pro/comprehensiveSearch/types.d.ts +2 -1
- package/es/pro/skuDetailModal/index.js +21 -7
- package/es/pro/skuDetailModal/index.less +40 -0
- package/lib/components/booking/components/footer/index.js +16 -9
- package/lib/components/booking/components/footer/index.less +23 -0
- package/lib/components/booking/components/tabPane/index.less +3 -3
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service2/utils.js +12 -11
- package/lib/components/booking/info2/cartClientCard/index.js +23 -31
- package/lib/components/booking/info2/service/editService/index.js +71 -18
- package/lib/components/booking/info2/service/editService/index.less +47 -11
- package/lib/components/booking/locales.js +4 -4
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/productSelect/components/productGroup/index.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +4 -3
- package/lib/components/ticketBooking/components/timeBar/index.js +1 -1
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +23 -12
- package/lib/components/ticketBooking/locales.js +12 -3
- package/lib/plus/clientCard/locales.js +2 -2
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/index.d.ts +0 -1
- package/lib/plus/clinetSearch/index.js +6 -7
- package/lib/plus/clinetSearch/index.less +4 -0
- package/lib/pro/comprehensiveSearch/index.d.ts +1 -3
- package/lib/pro/comprehensiveSearch/index.js +12 -23
- package/lib/pro/comprehensiveSearch/index.less +1 -6
- package/lib/pro/comprehensiveSearch/types.d.ts +2 -1
- package/lib/pro/skuDetailModal/index.js +22 -6
- package/lib/pro/skuDetailModal/index.less +40 -0
- package/package.json +2 -2
- package/es/pro/comprehensiveSearch/camera.svg +0 -4
- package/lib/pro/comprehensiveSearch/camera.svg +0 -4
@@ -224,6 +224,14 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
224
224
|
setDiscounts([]);
|
225
225
|
setShowPriceAdjustModal(false);
|
226
226
|
};
|
227
|
+
|
228
|
+
// 无图时使用商品名称前两个字作为封面文字
|
229
|
+
var coverText = useMemo(function () {
|
230
|
+
var _productData$title;
|
231
|
+
var title = (productData === null || productData === void 0 || (_productData$title = productData.title) === null || _productData$title === void 0 ? void 0 : _productData$title.trim()) || '';
|
232
|
+
if (!title) return '';
|
233
|
+
return Array.from(title).slice(0, 2).join('');
|
234
|
+
}, [productData === null || productData === void 0 ? void 0 : productData.title]);
|
227
235
|
if (!productData) return null;
|
228
236
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PisellModal, {
|
229
237
|
platform: "pc",
|
@@ -241,11 +249,13 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
241
249
|
className: "sku-detail-content-main"
|
242
250
|
}, /*#__PURE__*/React.createElement("div", {
|
243
251
|
className: "sku-detail-left"
|
244
|
-
},
|
252
|
+
}, /*#__PURE__*/React.createElement("div", {
|
245
253
|
className: "product-image"
|
246
|
-
}, /*#__PURE__*/React.createElement("img", {
|
254
|
+
}, productData.cover ? /*#__PURE__*/React.createElement("img", {
|
247
255
|
src: productData.cover || ''
|
248
|
-
})
|
256
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
257
|
+
className: "product-cover-text"
|
258
|
+
}, coverText)), /*#__PURE__*/React.createElement("div", {
|
249
259
|
className: "product-actions"
|
250
260
|
}, /*#__PURE__*/React.createElement(Button, {
|
251
261
|
size: "large",
|
@@ -314,18 +324,22 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
314
324
|
fontSize: 20
|
315
325
|
}
|
316
326
|
}),
|
317
|
-
className: "remove-btn",
|
327
|
+
className: "sku-detail-content-footer-remove-btn",
|
318
328
|
onClick: handleRemove
|
319
329
|
}, locales.getText('pisell2.text.sku.detail.modal.btn.remove')), /*#__PURE__*/React.createElement("div", {
|
320
330
|
className: "modal-actions"
|
321
331
|
}, /*#__PURE__*/React.createElement(Button, {
|
322
332
|
type: "default",
|
323
333
|
size: "large",
|
324
|
-
onClick: handleManualPriceChange
|
325
|
-
|
334
|
+
onClick: handleManualPriceChange,
|
335
|
+
className: "sku-detail-content-footer-price-btn"
|
336
|
+
}, /*#__PURE__*/React.createElement("span", {
|
337
|
+
className: "sku-detail-content-footer-price-btn-text"
|
338
|
+
}, locales.getText('pisell2.text.sku.detail.modal.btn.manual.price.change'))), /*#__PURE__*/React.createElement(Button, {
|
326
339
|
type: "primary",
|
327
340
|
size: "large",
|
328
|
-
onClick: handleConfirm
|
341
|
+
onClick: handleConfirm,
|
342
|
+
className: "sku-detail-content-footer-confirm-btn"
|
329
343
|
}, locales.getText('pisell2.text.sku.detail.modal.btn.confirm'))))), noteModalOpen && /*#__PURE__*/React.createElement(NoteModal, {
|
330
344
|
open: noteModalOpen,
|
331
345
|
value: note,
|
@@ -34,6 +34,20 @@
|
|
34
34
|
object-fit: cover;
|
35
35
|
background: lightgray 50% / cover no-repeat;
|
36
36
|
}
|
37
|
+
|
38
|
+
.product-cover-text {
|
39
|
+
width: 100%;
|
40
|
+
height: 100%;
|
41
|
+
background-color: #dedede;
|
42
|
+
color: #747474;
|
43
|
+
display: flex;
|
44
|
+
align-items: center;
|
45
|
+
justify-content: center;
|
46
|
+
font-size: 40px;
|
47
|
+
font-weight: 600;
|
48
|
+
line-height: 1;
|
49
|
+
user-select: none;
|
50
|
+
}
|
37
51
|
}
|
38
52
|
|
39
53
|
.product-actions {
|
@@ -44,6 +58,7 @@
|
|
44
58
|
|
45
59
|
.add-note-btn {
|
46
60
|
width: 100%;
|
61
|
+
height: 48px;
|
47
62
|
}
|
48
63
|
}
|
49
64
|
|
@@ -199,10 +214,35 @@
|
|
199
214
|
align-items: center;
|
200
215
|
justify-content: space-between;
|
201
216
|
|
217
|
+
.sku-detail-content-footer-remove-btn {
|
218
|
+
width: 120px;
|
219
|
+
height: 48px;
|
220
|
+
}
|
221
|
+
|
202
222
|
.modal-actions {
|
203
223
|
display: flex;
|
204
224
|
gap: 8px;
|
205
225
|
justify-content: flex-end;
|
226
|
+
|
227
|
+
.sku-detail-content-footer-price-btn {
|
228
|
+
width: 140px;
|
229
|
+
height: 48px;
|
230
|
+
|
231
|
+
.sku-detail-content-footer-price-btn-text {
|
232
|
+
width: 100%;
|
233
|
+
text-align: center;
|
234
|
+
// 支持换行显示
|
235
|
+
white-space: wrap;
|
236
|
+
font-size: 16px;
|
237
|
+
font-weight: 400;
|
238
|
+
line-height: 20px;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
.sku-detail-content-footer-confirm-btn {
|
243
|
+
width: 200px;
|
244
|
+
height: 48px;
|
245
|
+
}
|
206
246
|
}
|
207
247
|
}
|
208
248
|
}
|
@@ -54,8 +54,9 @@ var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
54
54
|
var import_utils4 = require("@pisell/utils");
|
55
55
|
var import_dayjs = __toESM(require("dayjs"));
|
56
56
|
var import_useScanManager = __toESM(require("../../../ticketBooking/hooks/pisellos/useScanManager"));
|
57
|
+
var import_materials = require("@pisell/materials");
|
57
58
|
var Footer = (props) => {
|
58
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
59
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
59
60
|
const { state, buttons, dispatch, source } = props;
|
60
61
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
61
62
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
@@ -615,6 +616,11 @@ var Footer = (props) => {
|
|
615
616
|
)
|
616
617
|
);
|
617
618
|
}, []);
|
619
|
+
const hasOrderNote = (0, import_react.useMemo)(() => {
|
620
|
+
var _a2;
|
621
|
+
const note = ((_a2 = state == null ? void 0 : state.notes) == null ? void 0 : _a2.orderNote) || "";
|
622
|
+
return note.trim().length > 0;
|
623
|
+
}, [(_h = state == null ? void 0 : state.notes) == null ? void 0 : _h.orderNote]);
|
618
624
|
const noteButton = (0, import_react.useMemo)(() => {
|
619
625
|
return /* @__PURE__ */ import_react.default.createElement(
|
620
626
|
import_antd.ConfigProvider,
|
@@ -628,14 +634,15 @@ var Footer = (props) => {
|
|
628
634
|
/* @__PURE__ */ import_react.default.createElement(
|
629
635
|
import_antd.Button,
|
630
636
|
{
|
631
|
-
className: "pisell-lowcode__booking-footer-buttons-item",
|
637
|
+
className: "pisell-lowcode__booking-footer-buttons-item note-button",
|
632
638
|
type: "primary",
|
633
639
|
onClick: handleNote
|
634
640
|
},
|
635
|
-
import_utils.locales.getText("pisell2.ticket-booking.note")
|
641
|
+
import_utils.locales.getText("pisell2.ticket-booking.note"),
|
642
|
+
hasOrderNote && /* @__PURE__ */ import_react.default.createElement("span", { className: "note-indicator" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-info-circle2" }))
|
636
643
|
)
|
637
644
|
);
|
638
|
-
}, []);
|
645
|
+
}, [hasOrderNote]);
|
639
646
|
let buttonMap = {
|
640
647
|
checkout: checkoutButton,
|
641
648
|
save: saveButton,
|
@@ -779,7 +786,7 @@ var Footer = (props) => {
|
|
779
786
|
isShowPaymentLink,
|
780
787
|
source,
|
781
788
|
_buttons.length,
|
782
|
-
(
|
789
|
+
(_i = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _i.payment_status
|
783
790
|
]);
|
784
791
|
const isOnlyDeposit = (0, import_react.useMemo)(() => {
|
785
792
|
var _a2, _b2, _c2, _d2;
|
@@ -871,7 +878,7 @@ var Footer = (props) => {
|
|
871
878
|
}, [
|
872
879
|
state.bookingId,
|
873
880
|
state.bookingDetail,
|
874
|
-
(
|
881
|
+
(_j = state.addons) == null ? void 0 : _j.load,
|
875
882
|
state.renderType
|
876
883
|
]);
|
877
884
|
const menuChange = (e) => {
|
@@ -962,7 +969,7 @@ var Footer = (props) => {
|
|
962
969
|
label: import_utils.locales.getText("pisell1.text.rounding")
|
963
970
|
}
|
964
971
|
];
|
965
|
-
}, [total, (
|
972
|
+
}, [total, (_k = state.bookingDetail) == null ? void 0 : _k.surcharge, state, state.bookingId]);
|
966
973
|
const orderTotalList = (0, import_react.useMemo)(() => {
|
967
974
|
return [
|
968
975
|
// 订单已付金额
|
@@ -996,7 +1003,7 @@ var Footer = (props) => {
|
|
996
1003
|
label: import_utils.locales.getText("pisell2.text.refunded-amount")
|
997
1004
|
}
|
998
1005
|
];
|
999
|
-
}, [total, (
|
1006
|
+
}, [total, (_l = state.bookingDetail) == null ? void 0 : _l.surcharge, state, state.bookingId]);
|
1000
1007
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
|
1001
1008
|
"span",
|
1002
1009
|
{
|
@@ -1071,7 +1078,7 @@ var Footer = (props) => {
|
|
1071
1078
|
{
|
1072
1079
|
open: noteModalOpen,
|
1073
1080
|
title: import_utils.locales.getText("pisell2.text.add-order-notes"),
|
1074
|
-
value: ((
|
1081
|
+
value: ((_m = state.notes) == null ? void 0 : _m.orderNote) || "",
|
1075
1082
|
onConfirm: handleNoteConfirm,
|
1076
1083
|
onDelete: handleNoteDelete,
|
1077
1084
|
onCancel: handleNoteCancel
|
@@ -122,6 +122,29 @@
|
|
122
122
|
align-items: center;
|
123
123
|
justify-content: center;
|
124
124
|
flex: 1;
|
125
|
+
position: relative;
|
126
|
+
|
127
|
+
&.note-button {
|
128
|
+
.note-indicator {
|
129
|
+
position: absolute;
|
130
|
+
top: 0; // 不使用负数偏移
|
131
|
+
right: 0; // 不使用负数偏移
|
132
|
+
transform: translate(12%, -12%); // 向外溢出约 2-3px
|
133
|
+
width: 24px;
|
134
|
+
height: 24px;
|
135
|
+
border-radius: 50%;
|
136
|
+
background-color: #7F56DA; // 紫色
|
137
|
+
color: #fff;
|
138
|
+
font-weight: 700;
|
139
|
+
display: flex;
|
140
|
+
align-items: center;
|
141
|
+
justify-content: center;
|
142
|
+
line-height: 1;
|
143
|
+
font-size: 30px;
|
144
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
145
|
+
pointer-events: none;
|
146
|
+
}
|
147
|
+
}
|
125
148
|
}
|
126
149
|
|
127
150
|
.pisell-lowcode__booking-footer-buttons-item-primary {
|
@@ -81,7 +81,7 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
81
81
|
var _a2, _b;
|
82
82
|
return {
|
83
83
|
hideAddBtn: state.isTerminalDayBookingPage || state.isBookingCreatePage,
|
84
|
-
isShowNote: (0, import_utils.isEventBooking)(state),
|
84
|
+
isShowNote: state.isBookingTicket2 ? true : (0, import_utils.isEventBooking)(state),
|
85
85
|
isShowPackageNote: false,
|
86
86
|
accounts: [],
|
87
87
|
isEdit: !!(state == null ? void 0 : state.bookingId),
|
@@ -527,6 +527,7 @@ var getGeneralParams = (item, state, isParallelResource) => {
|
|
527
527
|
isShowChangeHolder: !isNormalProduct,
|
528
528
|
isShowAction: (0, import_utils4.isShowAddTime)(state, item),
|
529
529
|
actionText: import_utils2.locales.getText("page.booking.text.add-time"),
|
530
|
+
actionIcon: "pisell2-clock-plus",
|
530
531
|
isMultipleResource: true,
|
531
532
|
multiResources,
|
532
533
|
holderMaxCount: item == null ? void 0 : item._extend.quantity,
|
@@ -548,7 +549,7 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
548
549
|
const normalList = [];
|
549
550
|
const groupList = [];
|
550
551
|
const formItem = (item) => {
|
551
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
552
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
552
553
|
const _isDayBookingProduct = isDayBookingProduct(item, state);
|
553
554
|
const clientTitle = getHolderName(state, (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.holder_id);
|
554
555
|
const options = formatOptions((_c = (_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.option);
|
@@ -573,19 +574,19 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
573
574
|
num: item == null ? void 0 : item._extend.quantity,
|
574
575
|
image: item == null ? void 0 : item.cover,
|
575
576
|
isShowNote: true,
|
576
|
-
note: item == null ? void 0 : item.note,
|
577
|
-
like_status: (
|
577
|
+
note: (item == null ? void 0 : item.note) || ((_l = item == null ? void 0 : item._extend) == null ? void 0 : _l.note),
|
578
|
+
like_status: (_m = item == null ? void 0 : item._extend) == null ? void 0 : _m.like_status,
|
578
579
|
bundle,
|
579
580
|
options,
|
580
581
|
errorMessage,
|
581
|
-
product_option_string: (
|
582
|
-
discount_reason: (
|
583
|
-
resource_id: isNormalProduct ? 0 : (
|
582
|
+
product_option_string: (_o = (_n = item == null ? void 0 : item._extend) == null ? void 0 : _n.other) == null ? void 0 : _o.product_option_string,
|
583
|
+
discount_reason: (_p = item == null ? void 0 : item._extend) == null ? void 0 : _p.discount_reason,
|
584
|
+
resource_id: isNormalProduct ? 0 : (_q = item == null ? void 0 : item._extend) == null ? void 0 : _q.resource,
|
584
585
|
relation_form_name: isNormalProduct ? "" : (resourceItem == null ? void 0 : resourceItem.labelText) || item.relation_form_name,
|
585
586
|
holder_title: clientTitle,
|
586
|
-
start_date: !isNormalProduct ? (
|
587
|
-
end_date: !isNormalProduct ? (
|
588
|
-
holder_id: ((
|
587
|
+
start_date: !isNormalProduct ? (_r = item == null ? void 0 : item._extend) == null ? void 0 : _r.start_date : "",
|
588
|
+
end_date: !isNormalProduct ? (_s = item == null ? void 0 : item._extend) == null ? void 0 : _s.end_date : "",
|
589
|
+
holder_id: ((_t = item == null ? void 0 : item._extend) == null ? void 0 : _t.holder_id) || 0,
|
589
590
|
isNormalProduct,
|
590
591
|
isCustomItem: item == null ? void 0 : item.isCustomItem,
|
591
592
|
// 添加自定义商品标识
|
@@ -593,8 +594,8 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
|
|
593
594
|
// 是否适用优惠券/折扣
|
594
595
|
locale: state.locale,
|
595
596
|
symbol: state.amountSymbol,
|
596
|
-
relation_products: ((
|
597
|
-
items: isEventBooking(state) ? [] : formItems(((
|
597
|
+
relation_products: ((_u = item == null ? void 0 : item._extend) == null ? void 0 : _u.relation_details) || [],
|
598
|
+
items: isEventBooking(state) ? [] : formItems(((_v = item == null ? void 0 : item._extend) == null ? void 0 : _v.items) || []),
|
598
599
|
...generalParams,
|
599
600
|
_origin: item
|
600
601
|
};
|
@@ -59,7 +59,9 @@ var CartClientCard = (0, import_react.forwardRef)((props, ref) => {
|
|
59
59
|
);
|
60
60
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
61
61
|
const translationOriginal = (0, import_useTranslationOriginal.default)();
|
62
|
+
const [keyword, setKeyword] = (0, import_react.useState)("");
|
62
63
|
const keywordRef = (0, import_react.useRef)("");
|
64
|
+
keywordRef.current = keyword;
|
63
65
|
const Toast = (0, import_useToast.default)();
|
64
66
|
const { openScan, closeScan } = (0, import_useScanCustomer.default)();
|
65
67
|
const context = (0, import_useEngineContext.default)();
|
@@ -81,7 +83,6 @@ var CartClientCard = (0, import_react.forwardRef)((props, ref) => {
|
|
81
83
|
selectedCustomer,
|
82
84
|
loading,
|
83
85
|
pagination,
|
84
|
-
loadCustomers,
|
85
86
|
changePage,
|
86
87
|
selectCustomer,
|
87
88
|
addCustomerToFirst,
|
@@ -91,9 +92,22 @@ var CartClientCard = (0, import_react.forwardRef)((props, ref) => {
|
|
91
92
|
} = (0, import_useCustomer.useCustomer)({
|
92
93
|
changeCustomerToGlobalState
|
93
94
|
});
|
95
|
+
const handleSearchClient = async (keyword2) => {
|
96
|
+
var _a2, _b2;
|
97
|
+
await initLoad(keyword2);
|
98
|
+
(_b2 = (_a2 = clientSearchRef.current) == null ? void 0 : _a2.resetScrollPosition) == null ? void 0 : _b2.call(_a2);
|
99
|
+
};
|
100
|
+
const _debouncedSearch = (0, import_ahooks.useDebounceFn)(
|
101
|
+
async (_keyword) => {
|
102
|
+
var _a2, _b2;
|
103
|
+
await initLoad(keyword);
|
104
|
+
(_b2 = (_a2 = clientSearchRef.current) == null ? void 0 : _a2.resetScrollPosition) == null ? void 0 : _b2.call(_a2);
|
105
|
+
},
|
106
|
+
{ wait: 500 }
|
107
|
+
);
|
94
108
|
(0, import_react.useEffect)(() => {
|
95
|
-
|
96
|
-
}, []);
|
109
|
+
_debouncedSearch.run(keyword);
|
110
|
+
}, [keyword]);
|
97
111
|
(0, import_react.useEffect)(() => {
|
98
112
|
if (state.action) {
|
99
113
|
state.action({
|
@@ -104,27 +118,18 @@ var CartClientCard = (0, import_react.forwardRef)((props, ref) => {
|
|
104
118
|
});
|
105
119
|
}
|
106
120
|
}, []);
|
107
|
-
const updateSearchKeyword = (newVal) => {
|
108
|
-
var _a2, _b2;
|
109
|
-
(_b2 = (_a2 = clientSearchRef.current) == null ? void 0 : _a2.setSearchKeyword) == null ? void 0 : _b2.call(_a2, newVal);
|
110
|
-
keywordRef.current = newVal;
|
111
|
-
};
|
112
121
|
const handleScanCustomer = (customer) => {
|
113
122
|
if (customer == null ? void 0 : customer.scanCode) {
|
114
|
-
|
115
|
-
handleSearchClient(customer.scanCode);
|
123
|
+
setKeyword(customer.scanCode);
|
116
124
|
}
|
117
125
|
};
|
118
126
|
(0, import_react.useEffect)(() => {
|
119
|
-
var _a2, _b2;
|
120
127
|
if (searchModalVisible) {
|
121
128
|
openScan(handleScanCustomer);
|
122
129
|
} else {
|
123
130
|
closeScan();
|
124
131
|
if (keywordRef.current) {
|
125
|
-
|
126
|
-
(_b2 = (_a2 = clientSearchRef.current) == null ? void 0 : _a2.resetScrollPosition) == null ? void 0 : _b2.call(_a2);
|
127
|
-
initLoad();
|
132
|
+
setKeyword("");
|
128
133
|
}
|
129
134
|
}
|
130
135
|
}, [searchModalVisible, initLoad]);
|
@@ -133,34 +138,21 @@ var CartClientCard = (0, import_react.forwardRef)((props, ref) => {
|
|
133
138
|
};
|
134
139
|
const handleChangeClient = (data) => {
|
135
140
|
setSearchModalVisible(true);
|
136
|
-
console.log("更换客户:", data);
|
137
141
|
};
|
138
142
|
const handleRemoveClient = (data) => {
|
139
143
|
selectCustomer(null);
|
140
|
-
console.log("移除客户:", data);
|
141
144
|
};
|
142
145
|
const handleViewClient = (data) => {
|
143
|
-
console.log("查看客户:", data);
|
144
146
|
state.action({
|
145
147
|
type: "pisell1.handleOpenCustomerModal",
|
146
148
|
data: { id: state.client.value.id },
|
147
149
|
callback: (data2) => {
|
148
|
-
if (state.disabledEdit) {
|
149
|
-
return;
|
150
|
-
}
|
151
150
|
}
|
152
151
|
});
|
153
152
|
};
|
154
|
-
const handleRowClick = (record) => {
|
155
|
-
handleSetClient(record);
|
156
|
-
};
|
157
153
|
const handleModalCancel = () => {
|
158
154
|
setSearchModalVisible(false);
|
159
155
|
};
|
160
|
-
const handleSearchClient = async (keyword) => {
|
161
|
-
await loadCustomers({ search: keyword });
|
162
|
-
};
|
163
|
-
const _debouncedSearch = (0, import_ahooks.useDebounceFn)(handleSearchClient, { wait: 500 });
|
164
156
|
const handleAddClientSuccess = (record, isChecked) => {
|
165
157
|
addCustomerToFirst(record);
|
166
158
|
if (isChecked) {
|
@@ -261,11 +253,11 @@ var CartClientCard = (0, import_react.forwardRef)((props, ref) => {
|
|
261
253
|
loading,
|
262
254
|
dataSource: customers,
|
263
255
|
onSearch: handleSearchClient,
|
264
|
-
|
265
|
-
|
266
|
-
|
256
|
+
keyword,
|
257
|
+
onKeywordChange: (_keyword) => {
|
258
|
+
setKeyword(_keyword);
|
267
259
|
},
|
268
|
-
onRowClick:
|
260
|
+
onRowClick: handleSetClient,
|
269
261
|
containerProps: {
|
270
262
|
open: searchModalVisible,
|
271
263
|
onCancel: handleModalCancel
|
@@ -52,6 +52,7 @@ var import_materials = require("@pisell/materials");
|
|
52
52
|
var import_utils5 = require("../../../info/utils");
|
53
53
|
var import_utils6 = require("../../../info/service2/utils");
|
54
54
|
var import_utils7 = require("../../../../ticketBooking/utils");
|
55
|
+
var import_noteModal = __toESM(require("../../../../../plus/noteModal"));
|
55
56
|
var submitLock = false;
|
56
57
|
var Info = (_, ref) => {
|
57
58
|
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, _B, _C, _D, _E, _F, _G, _H, _I;
|
@@ -60,9 +61,11 @@ var Info = (_, ref) => {
|
|
60
61
|
const useResource = import_antd.Form.useWatch("resource", form);
|
61
62
|
const useStartTime = import_antd.Form.useWatch("start_time", form);
|
62
63
|
const useDuration = import_antd.Form.useWatch("duration", form);
|
64
|
+
const useNote = import_antd.Form.useWatch("note", form);
|
63
65
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
64
66
|
const resourcesRef = (0, import_react.useRef)(null);
|
65
67
|
const isChangeTotal = (0, import_react.useRef)(false);
|
68
|
+
const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
|
66
69
|
const isNormalProduct = (0, import_react.useMemo)(() => {
|
67
70
|
var _a2, _b2, _c2;
|
68
71
|
if (!((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.cacheItem)) {
|
@@ -587,26 +590,56 @@ var Info = (_, ref) => {
|
|
587
590
|
}, []);
|
588
591
|
const footer = (0, import_react.useMemo)(() => {
|
589
592
|
var _a2;
|
590
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
593
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
591
594
|
"div",
|
592
595
|
{
|
593
|
-
className: "pisell-lowcode__booking-service-
|
594
|
-
|
596
|
+
className: "pisell-lowcode__booking-service-body-edit-footer",
|
597
|
+
style: (state == null ? void 0 : state.isBookingTicket2) ? { justifyContent: "space-between" } : {}
|
595
598
|
},
|
596
|
-
/* @__PURE__ */ import_react.default.createElement(
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
599
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-body-edit-footer-left" }, /* @__PURE__ */ import_react.default.createElement(
|
600
|
+
"div",
|
601
|
+
{
|
602
|
+
className: "pisell-lowcode__booking-service-delete-wrap",
|
603
|
+
onClick: handleDeleteProduct
|
604
|
+
},
|
605
|
+
/* @__PURE__ */ import_react.default.createElement(import_Delete_wght300_24px.default, { className: "pisell-lowcode__booking-service-delete-icon" })
|
606
|
+
), (state == null ? void 0 : state.isBookingTicket2) && /* @__PURE__ */ import_react.default.createElement(
|
607
|
+
import_antd.ConfigProvider,
|
608
|
+
{
|
609
|
+
theme: {
|
610
|
+
token: {
|
611
|
+
colorPrimary: "#0d7fa9"
|
612
|
+
}
|
613
|
+
}
|
614
|
+
},
|
615
|
+
/* @__PURE__ */ import_react.default.createElement(
|
616
|
+
import_antd.Button,
|
617
|
+
{
|
618
|
+
className: "pisell-lowcode__booking-service-buttons-item note-button",
|
619
|
+
type: "primary",
|
620
|
+
size: "large",
|
621
|
+
onClick: () => setNoteModalOpen(true),
|
622
|
+
style: { height: "48px", width: "140px" }
|
623
|
+
},
|
624
|
+
import_utils.locales.getText("pisell2.ticket-booking.note"),
|
625
|
+
useNote && /* @__PURE__ */ import_react.default.createElement("span", { className: "note-indicator" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-info-circle2" }))
|
626
|
+
)
|
627
|
+
)),
|
628
|
+
/* @__PURE__ */ import_react.default.createElement(
|
629
|
+
import_antd.Button,
|
630
|
+
{
|
631
|
+
type: "primary",
|
632
|
+
className: "pisell-lowcode__booking-service-body-edit-footer-apple",
|
633
|
+
disabled: !isNormalProduct && !((_a2 = state.service.resourcesOrigin) == null ? void 0 : _a2.length),
|
634
|
+
onClick: () => {
|
635
|
+
form.submit();
|
636
|
+
},
|
637
|
+
style: (state == null ? void 0 : state.isBookingTicket2) ? { width: "200px", maxWidth: "200px" } : {}
|
638
|
+
},
|
639
|
+
import_utils.locales.getText("pisell2.text.apply")
|
640
|
+
)
|
641
|
+
);
|
642
|
+
}, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length, isNormalProduct]);
|
610
643
|
console.log("render edit");
|
611
644
|
console.log(state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose), performance.now() - window.pp1, "打开商品1");
|
612
645
|
const [val, setVal] = (0, import_react.useState)(false);
|
@@ -619,6 +652,17 @@ var Info = (_, ref) => {
|
|
619
652
|
setVal(false);
|
620
653
|
}
|
621
654
|
}, [isShowTimeAndResource]);
|
655
|
+
const handleNoteConfirm = (noteValue) => {
|
656
|
+
form.setFieldsValue({ note: noteValue });
|
657
|
+
setNoteModalOpen(false);
|
658
|
+
};
|
659
|
+
const handleNoteDelete = () => {
|
660
|
+
form.setFieldsValue({ note: "" });
|
661
|
+
setNoteModalOpen(false);
|
662
|
+
};
|
663
|
+
const handleNoteCancel = () => {
|
664
|
+
setNoteModalOpen(false);
|
665
|
+
};
|
622
666
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
623
667
|
import_drawer.default,
|
624
668
|
{
|
@@ -639,7 +683,16 @@ var Info = (_, ref) => {
|
|
639
683
|
});
|
640
684
|
}
|
641
685
|
},
|
642
|
-
/* @__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] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity)
|
686
|
+
/* @__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] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
|
687
|
+
import_noteModal.default,
|
688
|
+
{
|
689
|
+
open: noteModalOpen,
|
690
|
+
value: form.getFieldValue("note"),
|
691
|
+
onConfirm: handleNoteConfirm,
|
692
|
+
onDelete: handleNoteDelete,
|
693
|
+
onCancel: handleNoteCancel
|
694
|
+
}
|
695
|
+
))), footer)
|
643
696
|
));
|
644
697
|
};
|
645
698
|
var editService_default = (0, import_react.forwardRef)(Info);
|