@pisell/private-materials 6.1.15 → 6.1.16

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.
Files changed (71) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +144 -144
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Summary/utils.d.ts +1 -1
  12. package/es/components/booking/components/actionButtons/index.d.ts +2 -0
  13. package/es/components/booking/components/actionButtons/index.js +93 -12
  14. package/es/components/booking/components/actionButtons/index.less +71 -4
  15. package/es/components/booking/components/footer/index.js +1 -1
  16. package/es/components/booking/components/footer/index.less +3 -2
  17. package/es/components/booking/components/footer/utils.js +1 -0
  18. package/es/components/booking/components/tabPane/index.js +6 -20
  19. package/es/components/booking/components/tabPane/index.less +1 -1
  20. package/es/components/booking/components/voucher/index.js +7 -4
  21. package/es/components/booking/components/voucherModal/index.d.ts +19 -0
  22. package/es/components/booking/components/voucherModal/index.js +47 -0
  23. package/es/components/booking/components/voucherModal/index.less +23 -0
  24. package/es/components/booking/forms/forms.js +1 -1
  25. package/es/components/booking/info/index.less +1 -1
  26. package/es/components/booking/info/pet/index.less +1 -1
  27. package/es/components/booking/info/service/index.less +1 -1
  28. package/es/components/booking/locales.d.ts +3 -0
  29. package/es/components/booking/locales.js +12 -6
  30. package/es/components/booking/utils.d.ts +2 -2
  31. package/es/components/eftposPay/store/index.d.ts +1 -1
  32. package/es/components/productSelect/components/productGroup/index.js +20 -4
  33. package/es/components/productSelect/components/productGroup/index.less +17 -0
  34. package/es/components/shoppingCart/components/Cart/Product.js +5 -3
  35. package/es/components/shoppingCart/components/Cart/index.less +1 -1
  36. package/es/components/ticketBooking/components/ticketBooking/index.js +1 -1
  37. package/es/components/ticketBooking/components/ticketBooking/index.less +1 -1
  38. package/es/components/ticketBooking/locales.d.ts +3 -0
  39. package/es/components/ticketBooking/locales.js +3 -0
  40. package/es/plus/clientCard/index.less +3 -6
  41. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  42. package/lib/components/booking/components/actionButtons/index.d.ts +2 -0
  43. package/lib/components/booking/components/actionButtons/index.js +64 -12
  44. package/lib/components/booking/components/actionButtons/index.less +71 -4
  45. package/lib/components/booking/components/footer/index.js +1 -1
  46. package/lib/components/booking/components/footer/index.less +3 -2
  47. package/lib/components/booking/components/footer/utils.js +1 -0
  48. package/lib/components/booking/components/tabPane/index.js +5 -26
  49. package/lib/components/booking/components/tabPane/index.less +1 -1
  50. package/lib/components/booking/components/voucher/index.js +5 -4
  51. package/lib/components/booking/components/voucherModal/index.d.ts +19 -0
  52. package/lib/components/booking/components/voucherModal/index.js +83 -0
  53. package/lib/components/booking/components/voucherModal/index.less +23 -0
  54. package/lib/components/booking/forms/forms.js +1 -1
  55. package/lib/components/booking/info/index.less +1 -1
  56. package/lib/components/booking/info/pet/index.less +1 -1
  57. package/lib/components/booking/info/service/index.less +1 -1
  58. package/lib/components/booking/locales.d.ts +3 -0
  59. package/lib/components/booking/locales.js +12 -6
  60. package/lib/components/booking/utils.d.ts +2 -2
  61. package/lib/components/eftposPay/store/index.d.ts +1 -1
  62. package/lib/components/productSelect/components/productGroup/index.js +16 -3
  63. package/lib/components/productSelect/components/productGroup/index.less +17 -0
  64. package/lib/components/shoppingCart/components/Cart/Product.js +5 -4
  65. package/lib/components/shoppingCart/components/Cart/index.less +1 -1
  66. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -1
  67. package/lib/components/ticketBooking/components/ticketBooking/index.less +1 -1
  68. package/lib/components/ticketBooking/locales.d.ts +3 -0
  69. package/lib/components/ticketBooking/locales.js +3 -0
  70. package/lib/plus/clientCard/index.less +3 -6
  71. package/package.json +1 -1
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | "flexible" | {
168
+ }) => number | {
169
169
  type: string;
170
170
  value: number;
171
- };
171
+ } | "flexible";
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "query" | "pay" | "fullPay" | "refund" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
300
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
301
  action?: "amount" | "deviceList" | "pay" | undefined;
@@ -55,6 +55,17 @@ var ProductGroup = function ProductGroup(_ref) {
55
55
  }
56
56
  return "".concat(locales.getText('pisell2.product-select.stock'), "\uFF1A").concat(item.stock_quantity);
57
57
  };
58
+
59
+ // 获取商品名称的前两个字符作为文字封面
60
+ var getTextCover = function getTextCover(title) {
61
+ if (!title) return '';
62
+ // 移除首尾空格并取前两个字符
63
+ var cleanTitle = title.trim();
64
+ if (cleanTitle.length === 0) return '';
65
+
66
+ // 取前两个字符(无论是中文、英文还是其他字符)
67
+ return cleanTitle.substring(0, 2).toUpperCase();
68
+ };
58
69
  var renderPrice = function renderPrice(item) {
59
70
  var _price = item.price,
60
71
  _original_price = item.original_price,
@@ -86,23 +97,28 @@ var ProductGroup = function ProductGroup(_ref) {
86
97
  className: classNames('product-card', {
87
98
  selected: currentProductId && item.id === currentProductId
88
99
  }),
89
- onClick: function onClick() {
100
+ onTouchStart: function onTouchStart() {
90
101
  console.log('进入 renderItem onClick');
91
102
  onSelectProduct === null || onSelectProduct === void 0 || onSelectProduct(item);
92
103
  }
93
- }, isProductCover && item.cover ? /*#__PURE__*/React.createElement("div", {
104
+ }, isProductCover ? /*#__PURE__*/React.createElement("div", {
94
105
  className: "card-left",
95
106
  style: {
96
107
  width: imgWidth || 'auto',
97
108
  height: imgHeight || 'auto'
98
109
  }
99
- }, /*#__PURE__*/React.createElement("img", {
110
+ }, item.cover ? /*#__PURE__*/React.createElement("img", {
100
111
  loading: "lazy",
101
112
  src: item.cover,
102
113
  style: {
103
114
  borderRadius: radius
104
115
  }
105
- })) : null, /*#__PURE__*/React.createElement("div", {
116
+ }) : /*#__PURE__*/React.createElement("div", {
117
+ className: "text-cover",
118
+ style: {
119
+ borderRadius: radius
120
+ }
121
+ }, getTextCover(item.title))) : null, /*#__PURE__*/React.createElement("div", {
106
122
  className: "card-right"
107
123
  }, !!isTitle ? /*#__PURE__*/React.createElement("div", {
108
124
  className: "title"
@@ -106,6 +106,23 @@
106
106
  height: 100%;
107
107
  object-fit: cover;
108
108
  }
109
+
110
+ .text-cover {
111
+ width: 100%;
112
+ height: 100%;
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ background: #dedede;
117
+ color: #6c6c6c;
118
+ font-size: 60px;
119
+ font-weight: 600;
120
+ text-align: center;
121
+ line-height: 1;
122
+ letter-spacing: 1px;
123
+ border-radius: 8px;
124
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
125
+ }
109
126
  }
110
127
 
111
128
  .card-right {
@@ -1,7 +1,7 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
  import React, { useMemo } from 'react';
3
- // import { ProductCard } from '@pisell/materials';
4
- import ProductCard from "../../../../../../materials/src/components/productCard";
3
+ import { ProductCard } from '@pisell/materials';
4
+ // import ProductCard from '../../../../../../materials/src/components/productCard';
5
5
  import useClearCart from "../../hooks/useClearCart";
6
6
  import { useContext } from "../../hooks/useContext";
7
7
  import useAddService from "../../hooks/useAddService";
@@ -134,7 +134,9 @@ var Product = function Product(props) {
134
134
  onAddHolder: function onAddHolder(e) {
135
135
  return handleChange(item, 'add_holder', e);
136
136
  }
137
- }, productParams, getProductCardStyleProps(isRetail ? 'retail' : 'appointment')));
137
+ }, productParams, getProductCardStyleProps(isRetail ? 'retail' : 'appointment'), {
138
+ scenario: state.scenario
139
+ }));
138
140
  }), !hideAddBtn && platform !== 'h5' && isAdd ? useAddService(id, 'more') : null);
139
141
  }, [clearCart, lists, productParams, hideAddBtn, isAdd, platform]);
140
142
  };
@@ -18,7 +18,7 @@
18
18
  .pisell-lowcode__shopping-cart-content {
19
19
  display: flex;
20
20
  flex-direction: column;
21
- gap: 16px;
21
+ gap: 8px;
22
22
 
23
23
  .pisell-lowcode-product-card {
24
24
  margin-bottom: 0;
@@ -1079,7 +1079,7 @@ var TicketBooking = function TicketBooking() {
1079
1079
  })), /*#__PURE__*/React.createElement("div", {
1080
1080
  style: {
1081
1081
  flexShrink: 0,
1082
- width: 355
1082
+ width: 400
1083
1083
  }
1084
1084
  }, /*#__PURE__*/React.createElement(BookingInfo, {
1085
1085
  key: state.createCount,
@@ -11,7 +11,7 @@
11
11
  }
12
12
  }
13
13
  .pisell-lowcode__booking-tab-pane-footer {
14
- padding: 16px;
14
+ padding: 8px 10px;
15
15
  }
16
16
  .create-booking-page-info-wrap-create {
17
17
  background-color: #1b1b1b;
@@ -2,6 +2,7 @@ declare const _default: {
2
2
  en: {
3
3
  'pisell2.ticket-booking.info': string;
4
4
  'pisell2.ticket-booking.notes': string;
5
+ 'pisell2.ticket-booking.note': string;
5
6
  'pisell2.ticket-booking.forms': string;
6
7
  'pisell2.ticket-booking.sales': string;
7
8
  'pisell2.ticket-booking.payment': string;
@@ -60,6 +61,7 @@ declare const _default: {
60
61
  'zh-CN': {
61
62
  'pisell2.ticket-booking.info': string;
62
63
  'pisell2.ticket-booking.notes': string;
64
+ 'pisell2.ticket-booking.note': string;
63
65
  'pisell2.ticket-booking.forms': string;
64
66
  'pisell2.ticket-booking.sales': string;
65
67
  'pisell2.ticket-booking.payment': string;
@@ -118,6 +120,7 @@ declare const _default: {
118
120
  'zh-HK': {
119
121
  'pisell2.ticket-booking.info': string;
120
122
  'pisell2.ticket-booking.notes': string;
123
+ 'pisell2.ticket-booking.note': string;
121
124
  'pisell2.ticket-booking.forms': string;
122
125
  'pisell2.ticket-booking.sales': string;
123
126
  'pisell2.ticket-booking.payment': string;
@@ -2,6 +2,7 @@ export default {
2
2
  en: {
3
3
  'pisell2.ticket-booking.info': 'Info',
4
4
  'pisell2.ticket-booking.notes': 'Notes',
5
+ 'pisell2.ticket-booking.note': 'Note',
5
6
  'pisell2.ticket-booking.forms': 'Forms',
6
7
  'pisell2.ticket-booking.sales': 'Sales',
7
8
  'pisell2.ticket-booking.payment': 'Payment',
@@ -72,6 +73,7 @@ export default {
72
73
  'zh-CN': {
73
74
  'pisell2.ticket-booking.info': '信息',
74
75
  'pisell2.ticket-booking.notes': '备注',
76
+ 'pisell2.ticket-booking.note': '备注',
75
77
  'pisell2.ticket-booking.forms': '表单',
76
78
  'pisell2.ticket-booking.sales': '销售',
77
79
  'pisell2.ticket-booking.payment': '付款',
@@ -142,6 +144,7 @@ export default {
142
144
  'zh-HK': {
143
145
  'pisell2.ticket-booking.info': '資訊',
144
146
  'pisell2.ticket-booking.notes': '備註',
147
+ 'pisell2.ticket-booking.note': '備註',
145
148
  'pisell2.ticket-booking.forms': '表单',
146
149
  'pisell2.ticket-booking.sales': '銷售',
147
150
  'pisell2.ticket-booking.payment': '付款',
@@ -411,12 +411,6 @@
411
411
  text-align: center;
412
412
  }
413
413
 
414
- .pisell-client-card__name-tags {
415
- justify-content: center;
416
- flex-direction: column;
417
- gap: 8px;
418
- }
419
-
420
414
  .pisell-client-card__fields {
421
415
  align-items: center;
422
416
  }
@@ -470,6 +464,9 @@
470
464
  font-size: 12px;
471
465
  color: #8c8c8c;
472
466
  margin-top: 2px;
467
+ overflow: hidden;
468
+ text-overflow: ellipsis;
469
+ white-space: nowrap;
473
470
  }
474
471
 
475
472
  .pisell-client-card__plugin-icon {
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -24,6 +24,8 @@ interface ActionButtonsProps {
24
24
  }) => void;
25
25
  /** 是否禁用所有按钮 */
26
26
  disabled?: boolean;
27
+ /** 数据源,传递给 VoucherCard */
28
+ source?: any;
27
29
  }
28
30
  declare const ActionButtons: React.FC<ActionButtonsProps>;
29
31
  export default ActionButtons;
@@ -41,6 +41,7 @@ var import_materials = require("@pisell/materials");
41
41
  var import_dayjs = __toESM(require("dayjs"));
42
42
  var import_clearCartModal = __toESM(require("../clearCartModal"));
43
43
  var import_customiseItemModal = __toESM(require("../customiseItemModal"));
44
+ var import_voucherModal = __toESM(require("../voucherModal"));
44
45
  var import_amount = require("../footer/amount");
45
46
  var import_utils2 = require("@pisell/utils");
46
47
  var import_index = require("./index.less");
@@ -51,12 +52,14 @@ var createToastContent = (text) => /* @__PURE__ */ import_react.default.createEl
51
52
  var ActionButtons = ({
52
53
  state,
53
54
  dispatch,
54
- disabled = false
55
+ disabled = false,
56
+ source
55
57
  }) => {
56
- var _a, _b, _c, _d, _e, _f, _g;
58
+ var _a, _b, _c, _d, _e, _f, _g, _h;
57
59
  const [showClearModal, setShowClearModal] = (0, import_react.useState)(false);
58
60
  const [showPriceAdjustModal, setShowPriceAdjustModal] = (0, import_react.useState)(false);
59
61
  const [showCustomiseModal, setShowCustomiseModal] = (0, import_react.useState)(false);
62
+ const [showVoucherModal, setShowVoucherModal] = (0, import_react.useState)(false);
60
63
  const context = (0, import_useEngineContext.default)();
61
64
  const Toast = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.Toast;
62
65
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
@@ -109,6 +112,35 @@ var ActionButtons = ({
109
112
  const { originExpectAmount } = (0, import_amount.getSumTotal)(state, true);
110
113
  return originExpectAmount;
111
114
  }, [state, hasCartItems]);
115
+ const [discountList, setDiscountList] = (0, import_react.useState)([]);
116
+ const usedVouchersCount = (0, import_react.useMemo)(() => {
117
+ try {
118
+ return discountList.filter((discount) => discount.isSelected).length;
119
+ } catch (error) {
120
+ console.error("计算已使用券数量失败:", error);
121
+ return 0;
122
+ }
123
+ }, [discountList]);
124
+ const shouldShowWarning = (0, import_react.useMemo)(() => {
125
+ try {
126
+ return discountList.length > 0 && !discountList.some((discount) => discount.isSelected) && discountList.some((discount) => discount.isManualSelect);
127
+ } catch (error) {
128
+ console.error("判断警告状态失败:", error);
129
+ return false;
130
+ }
131
+ }, [discountList]);
132
+ (0, import_react.useEffect)(() => {
133
+ var _a2;
134
+ const { pisellos } = ((_a2 = context.appHelper) == null ? void 0 : _a2.utils) || {};
135
+ if (!pisellos) return;
136
+ const onDiscountListChange = (discount) => {
137
+ setDiscountList(discount);
138
+ };
139
+ pisellos.effects.on("shopDiscount:onDiscountListChange", onDiscountListChange);
140
+ return () => {
141
+ pisellos.effects.off("shopDiscount:onDiscountListChange", onDiscountListChange);
142
+ };
143
+ }, [(_e = context.appHelper) == null ? void 0 : _e.utils]);
112
144
  const handleClear = () => {
113
145
  setShowClearModal(true);
114
146
  };
@@ -201,6 +233,9 @@ var ActionButtons = ({
201
233
  const handleCustomiseItem = () => {
202
234
  setShowCustomiseModal(true);
203
235
  };
236
+ const handleGoodPassClick = () => {
237
+ setShowVoucherModal(true);
238
+ };
204
239
  const handleCustomiseItemSave = (data) => {
205
240
  var _a2;
206
241
  console.log("保存自定义商品:", data);
@@ -261,8 +296,17 @@ var ActionButtons = ({
261
296
  onClick: handleClear,
262
297
  type: "text",
263
298
  disabled: isDisabledEdit
299
+ }
300
+ ), /* @__PURE__ */ import_react.default.createElement(
301
+ import_antd.Button,
302
+ {
303
+ className: "action-button customise-button",
304
+ icon: /* @__PURE__ */ import_react.default.createElement(import_icon.PlusCircle, { size: 22 }),
305
+ onClick: handleCustomiseItem,
306
+ type: "text",
307
+ disabled: isDisabledEdit
264
308
  },
265
- import_utils.locales.getText("pisell2.action-buttons.clear")
309
+ import_utils.locales.getText("pisell2.action-buttons.customise-item")
266
310
  ), /* @__PURE__ */ import_react.default.createElement(
267
311
  import_antd.Button,
268
312
  {
@@ -273,17 +317,16 @@ var ActionButtons = ({
273
317
  disabled: isDisabledEdit
274
318
  },
275
319
  import_utils.locales.getText("pisell2.action-buttons.manuel-order")
276
- ), /* @__PURE__ */ import_react.default.createElement(
320
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: "action-button-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
277
321
  import_antd.Button,
278
322
  {
279
- className: "action-button customise-button",
280
- icon: /* @__PURE__ */ import_react.default.createElement(import_icon.PlusCircle, { size: 22 }),
281
- onClick: handleCustomiseItem,
282
- type: "text",
283
- disabled: isDisabledEdit
323
+ className: "action-button goodpass-button",
324
+ icon: /* @__PURE__ */ import_react.default.createElement(import_icon.Sale03, { size: 22 }),
325
+ onClick: handleGoodPassClick,
326
+ type: "text"
284
327
  },
285
- import_utils.locales.getText("pisell2.action-buttons.customise-item")
286
- )), /* @__PURE__ */ import_react.default.createElement(
328
+ import_utils.locales.getText("pisell2.text.goodpass")
329
+ ), usedVouchersCount > 0 && /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-badge" }, usedVouchersCount), shouldShowWarning && /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-warning-icon" }, "!"))), /* @__PURE__ */ import_react.default.createElement(
287
330
  import_clearCartModal.default,
288
331
  {
289
332
  visible: showClearModal,
@@ -317,9 +360,18 @@ var ActionButtons = ({
317
360
  visible: showCustomiseModal,
318
361
  onClose: () => setShowCustomiseModal(false),
319
362
  onSave: handleCustomiseItemSave,
320
- currencySymbol: ((_g = (_f = (_e = context.appHelper) == null ? void 0 : _e.utils) == null ? void 0 : _f.getSymbolic) == null ? void 0 : _g.call(_f)) || "$",
363
+ currencySymbol: ((_h = (_g = (_f = context.appHelper) == null ? void 0 : _f.utils) == null ? void 0 : _g.getSymbolic) == null ? void 0 : _h.call(_g)) || "$",
321
364
  disabled: isDisabledEdit
322
365
  }
366
+ ), /* @__PURE__ */ import_react.default.createElement(
367
+ import_voucherModal.default,
368
+ {
369
+ visible: showVoucherModal,
370
+ onClose: () => setShowVoucherModal(false),
371
+ state,
372
+ dispatch,
373
+ source
374
+ }
323
375
  ));
324
376
  };
325
377
  var actionButtons_default = ActionButtons;
@@ -6,6 +6,52 @@
6
6
  margin-top: 8px;
7
7
  padding: 0;
8
8
 
9
+ .action-button-wrapper {
10
+ position: relative;
11
+ flex: 1.4;
12
+ display: flex;
13
+
14
+ .voucher-badge {
15
+ position: absolute;
16
+ top: -8px;
17
+ right: -8px;
18
+ width: 20px;
19
+ height: 20px;
20
+ border-radius: 50%;
21
+ background-color: #7F56DA;
22
+ color: white;
23
+ font-size: 12px;
24
+ font-weight: 600;
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ z-index: 10;
29
+ min-width: 20px;
30
+ padding: 0 4px;
31
+ box-sizing: border-box;
32
+ }
33
+
34
+ .voucher-warning-icon {
35
+ position: absolute;
36
+ top: -6px;
37
+ right: -6px;
38
+ width: 18px;
39
+ height: 18px;
40
+ border-radius: 50%;
41
+ background-color: #ff4d4f;
42
+ color: white;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ z-index: 10;
47
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
48
+
49
+ .anticon {
50
+ font-size: 10px;
51
+ }
52
+ }
53
+ }
54
+
9
55
  .action-button {
10
56
  display: flex;
11
57
  justify-content: center;
@@ -18,7 +64,7 @@
18
64
  color: white;
19
65
  background: #2C2C2C;
20
66
  border: 1px solid #2C2C2C;
21
- border-radius: 4px;
67
+ border-radius: 8px;
22
68
  font-size: 12px;
23
69
  font-weight: 500;
24
70
  transition: all 0.2s ease;
@@ -44,9 +90,10 @@
44
90
  }
45
91
  }
46
92
 
47
- // Clear 按钮更小
93
+ // Clear 按钮固定宽度
48
94
  &.clear-button {
49
- flex: 0.8;
95
+ width: 44px;
96
+ flex: none;
50
97
  border-color: #FF4D4F;
51
98
 
52
99
  &:hover:not(:disabled) {
@@ -59,6 +106,7 @@
59
106
  flex: 1;
60
107
  border-color: #CC8E50;
61
108
  align-items: center;
109
+ padding: 0 4px;
62
110
 
63
111
  &:hover:not(:disabled) {
64
112
  border-color: #CC8E50;
@@ -82,12 +130,31 @@
82
130
 
83
131
  // Customise 按钮更大一些
84
132
  &.customise-button {
85
- flex: 1.3;
133
+ flex: 1;
86
134
  border-color: #8157D5;
87
135
 
88
136
  &:hover:not(:disabled) {
89
137
  border-color: #8157D5;
90
138
  }
139
+
140
+ // Customise按钮文本支持换行,保持与图标水平对齐
141
+ span {
142
+ white-space: pre-line !important;
143
+ line-height: 1.15;
144
+ text-align: center;
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ }
149
+ }
150
+
151
+ &.goodpass-button {
152
+ flex: 1.4;
153
+ border-color: #CC8E50;
154
+
155
+ &:hover:not(:disabled) {
156
+ border-color: #CC8E50;
157
+ }
91
158
  }
92
159
 
93
160
  // 图标样式
@@ -650,7 +650,7 @@ var Footer = (props) => {
650
650
  type: "primary",
651
651
  onClick: handleNote
652
652
  },
653
- import_utils.locales.getText("pisell2.ticket-booking.notes")
653
+ import_utils.locales.getText("pisell2.ticket-booking.note")
654
654
  )
655
655
  );
656
656
  }, []);
@@ -1,6 +1,6 @@
1
1
  .pisell-lowcode__booking-footer-total {
2
2
  width: 100%;
3
- padding-bottom: 16px;
3
+ padding-bottom: 8px;
4
4
  display: flex;
5
5
  align-items: flex-start;
6
6
  justify-content: space-between;
@@ -15,7 +15,8 @@
15
15
  display: flex;
16
16
  flex-direction: column;
17
17
 
18
- .pisell-lowcode__booking-footer-left-total {}
18
+ .pisell-lowcode__booking-footer-left-total {
19
+ }
19
20
 
20
21
  .pisell-lowcode__booking-footer-left-arrears {
21
22
  font-size: 14px;
@@ -432,6 +432,7 @@ var formatValues = (state) => {
432
432
  type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
433
433
  platform: state.isBookingTicket2 ? "pos" : "shop",
434
434
  sales_channel: "my_pisel",
435
+ order_sales_channel: state.isBookingTicket2 ? "pos" : "online_store",
435
436
  bookings: [],
436
437
  customer_id: 1,
437
438
  customer_name: "",
@@ -52,7 +52,7 @@ var TabPane = ({
52
52
  dispatch,
53
53
  source
54
54
  }) => {
55
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
55
+ var _a, _b, _c, _d, _e, _f;
56
56
  const context = (0, import_useEngineContext.default)();
57
57
  const { businessUtils } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
58
58
  const hasGoodPassApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "goodpass"));
@@ -102,28 +102,7 @@ var TabPane = ({
102
102
  },
103
103
  children
104
104
  )
105
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-tab-pane-voucher-section" }, shouldShowTerminalVoucher && state && dispatch && /* @__PURE__ */ import_react.default.createElement(
106
- import_voucher.default,
107
- {
108
- state: {
109
- ...state,
110
- service: {
111
- ...state.service || {},
112
- value: ((_d = state.service) == null ? void 0 : _d.value) || []
113
- },
114
- addons: {
115
- ...state.addons || {},
116
- value: ((_e = state.addons) == null ? void 0 : _e.value) || []
117
- },
118
- client: {
119
- ...state.client || {},
120
- value: ((_f = state.client) == null ? void 0 : _f.value) || {}
121
- }
122
- },
123
- dispatch,
124
- source
125
- }
126
- ), /* @__PURE__ */ import_react.default.createElement(import_actionButtons.default, { state, dispatch })), /* @__PURE__ */ import_react.default.createElement(
105
+ ), state && dispatch && (state == null ? void 0 : state.isBookingTicket2) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-tab-pane-voucher-section" }, /* @__PURE__ */ import_react.default.createElement(import_actionButtons.default, { state, dispatch })), /* @__PURE__ */ import_react.default.createElement(
127
106
  import_authWrap.default,
128
107
  {
129
108
  show: !!footer || shouldShowFooterVoucher,
@@ -134,15 +113,15 @@ var TabPane = ({
134
113
  ...state,
135
114
  service: {
136
115
  ...state.service || {},
137
- value: ((_g = state.service) == null ? void 0 : _g.value) || []
116
+ value: ((_d = state.service) == null ? void 0 : _d.value) || []
138
117
  },
139
118
  addons: {
140
119
  ...state.addons || {},
141
- value: ((_h = state.addons) == null ? void 0 : _h.value) || []
120
+ value: ((_e = state.addons) == null ? void 0 : _e.value) || []
142
121
  },
143
122
  client: {
144
123
  ...state.client || {},
145
- value: ((_i = state.client) == null ? void 0 : _i.value) || {}
124
+ value: ((_f = state.client) == null ? void 0 : _f.value) || {}
146
125
  }
147
126
  },
148
127
  dispatch,
@@ -50,7 +50,7 @@
50
50
  .pisell-lowcode__booking-tab-pane-voucher-section {
51
51
  display: flex;
52
52
  flex-direction: column;
53
- padding: 8px 16px;
53
+ padding: 10px;
54
54
  position: relative;
55
55
  z-index: 3;
56
56
  background-color: #1b1b1b;
@@ -58,8 +58,8 @@ var services = {};
58
58
  var VoucherCard = (props) => {
59
59
  var _a, _b, _c, _d;
60
60
  const context = (0, import_useEngineContext.default)();
61
- const { state, dispatch, source } = props;
62
- const [showDetail, setShowDetail] = (0, import_react.useState)(false);
61
+ const { state, dispatch, source, isInModal = false } = props;
62
+ const [showDetail, setShowDetail] = (0, import_react.useState)(isInModal ? true : false);
63
63
  const { pisellos } = (_a = context.appHelper) == null ? void 0 : _a.utils;
64
64
  const [code, setCode] = (0, import_react.useState)("");
65
65
  const [discountList, setDisCountList] = (0, import_react.useState)([]);
@@ -253,7 +253,7 @@ var VoucherCard = (props) => {
253
253
  return Number(b == null ? void 0 : b.isSelected) - Number(a == null ? void 0 : a.isSelected);
254
254
  });
255
255
  };
256
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-voucher-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), /* @__PURE__ */ import_react.default.createElement(
256
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-voucher-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), !isInModal && /* @__PURE__ */ import_react.default.createElement(
257
257
  "span",
258
258
  {
259
259
  className: "voucher-title-right",
@@ -276,13 +276,14 @@ var VoucherCard = (props) => {
276
276
  "div",
277
277
  {
278
278
  className: (0, import_classnames.default)("voucher-detail", {
279
- show: showDetail
279
+ show: showDetail || isInModal
280
280
  })
281
281
  },
282
282
  (availableData == null ? void 0 : availableData.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(
283
283
  import_materials.PisellGoodPassCard,
284
284
  {
285
285
  style: { width: "100%" },
286
+ isInModal: isInModal || false,
286
287
  dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
287
288
  mixedSort,
288
289
  onChange: (val) => {
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface VoucherModalProps {
4
+ /** 是否显示弹窗 */
5
+ visible: boolean;
6
+ /** 关闭弹窗回调 */
7
+ onClose: () => void;
8
+ /** booking 状态对象 */
9
+ state: any;
10
+ /** dispatch 函数 */
11
+ dispatch: (action: {
12
+ type: string;
13
+ payload?: any;
14
+ }) => void;
15
+ /** 数据源 */
16
+ source?: any;
17
+ }
18
+ declare const VoucherModal: React.FC<VoucherModalProps>;
19
+ export default VoucherModal;