@pisell/private-materials 6.4.45 → 6.4.46

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 (95) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  8. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  9. package/es/components/booking/components/footer/index.d.ts +0 -1
  10. package/es/components/booking/components/voucher/index.d.ts +0 -1
  11. package/es/components/booking/deposit/index.d.ts +0 -1
  12. package/es/components/booking/forms/footer.d.ts +0 -1
  13. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  14. package/es/components/booking/forms/single/index.d.ts +0 -1
  15. package/es/components/booking/hooks/useQuotation.d.ts +0 -1
  16. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  17. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  18. package/es/components/booking/info/date/index.d.ts +0 -1
  19. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  20. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  21. package/es/components/booking/info/index.d.ts +0 -1
  22. package/es/components/booking/info/notes/index.d.ts +0 -1
  23. package/es/components/booking/info/service/Lists.d.ts +0 -1
  24. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  25. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  26. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  27. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  28. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  29. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  30. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  31. package/es/components/booking/info/service2/utils.d.ts +1 -1
  32. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  33. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  34. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  35. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  36. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  37. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  38. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  39. package/es/components/booking/utils.js +10 -5
  40. package/es/components/checkout/PaymentModal.js +8 -2
  41. package/es/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
  42. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  43. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  44. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  45. package/es/components/productExtension/index.d.ts +0 -1
  46. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  47. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  48. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  49. package/es/components/ticketBooking/index.d.ts +0 -1
  50. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  51. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  52. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  53. package/lib/components/booking/components/footer/index.d.ts +0 -1
  54. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  55. package/lib/components/booking/deposit/index.d.ts +0 -1
  56. package/lib/components/booking/forms/footer.d.ts +0 -1
  57. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  58. package/lib/components/booking/forms/single/index.d.ts +0 -1
  59. package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
  60. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  61. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  62. package/lib/components/booking/info/date/index.d.ts +0 -1
  63. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  64. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  65. package/lib/components/booking/info/index.d.ts +0 -1
  66. package/lib/components/booking/info/notes/index.d.ts +0 -1
  67. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  68. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  69. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  70. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  71. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  72. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  73. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  74. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  75. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  76. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  77. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  78. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  79. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  80. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  81. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  82. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  83. package/lib/components/booking/utils.js +10 -5
  84. package/lib/components/checkout/PaymentModal.js +10 -2
  85. package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
  86. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  87. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  88. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  89. package/lib/components/productExtension/index.d.ts +0 -1
  90. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  91. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  92. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  93. package/lib/components/ticketBooking/index.d.ts +0 -1
  94. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  95. package/package.json +3 -3
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const VoucherCard: (props: any) => JSX.Element | null;
4
3
  export default VoucherCard;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: (props: any) => JSX.Element;
3
2
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface FooterProps {
3
2
  state: any;
4
3
  reload: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 表单选择器
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const calculateTotalPrice: (data: any) => number;
3
2
  declare const useQuotation: (state: any, dispatch: any) => {
4
3
  dom: JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from '../../../model';
3
2
  interface useClientFnParams {
4
3
  state: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
4
3
  declare const DateCom: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
248
248
  * @Author: WangHan
249
249
  * @Date: 2024-12-24 11:32
250
250
  */
251
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
251
+ export declare const updateServicePrice: (state: any) => Promise<any> | never[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../info/service/actions/index.less';
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import '../../../info/service/addService/index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface DurationProps extends SelectProps {
4
3
  locale?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  interface StartTimeProps extends SelectProps {
4
3
  locale?: string;
@@ -18,6 +18,7 @@ import { locales } from '@pisell/utils';
18
18
  import { isDayBooking, formatDayDate } from "./info/service2/utils";
19
19
  import { intersectionBy } from 'lodash';
20
20
  import { getAppointmentTimingPreference } from "./info2/utilsByBooking";
21
+ import Decimal from 'decimal.js';
21
22
  var Request = /*#__PURE__*/function () {
22
23
  function Request() {
23
24
  _classCallCheck(this, Request);
@@ -757,27 +758,31 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
757
758
  // 商品价格: (商品价格 + (套餐价格 + 单规格价格 * 单规格数量) * 套餐数量 + 单规格价格 * 单规格数量) * 商品数量
758
759
  export var getProductTotalPrice = function getProductTotalPrice(item) {
759
760
  var _item$_extend;
760
- var price = Number(item._extend.price);
761
+ var price = new Decimal(item._extend.price || 0);
761
762
  var other = (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.other;
762
763
 
763
764
  // 多规格
764
765
  if (other !== null && other !== void 0 && other.product_variant_id) {
765
- price = Number(other === null || other === void 0 ? void 0 : other.price);
766
+ price = new Decimal((other === null || other === void 0 ? void 0 : other.price) || 0);
766
767
  }
767
768
  if (other !== null && other !== void 0 && other.bundle) {
768
769
  // bundle
769
770
  price = other === null || other === void 0 ? void 0 : other.bundle.reduce(function (accumulator, currentValue) {
770
- return accumulator + Number(currentValue.price) * Number(currentValue.num);
771
+ var currentPrice = new Decimal(currentValue.price || 0);
772
+ var currentNum = new Decimal(currentValue.num || 0);
773
+ return accumulator.add(currentPrice.mul(currentNum));
771
774
  }, price);
772
775
  }
773
776
 
774
777
  // 单规格
775
778
  if (other !== null && other !== void 0 && other.option) {
776
779
  price = other === null || other === void 0 ? void 0 : other.option.reduce(function (accumulator, currentValue) {
777
- return accumulator + Number(currentValue.price) * Number(currentValue.num);
780
+ var currentPrice = new Decimal(currentValue.price || 0);
781
+ var currentNum = new Decimal(currentValue.num || 0);
782
+ return accumulator.add(currentPrice.mul(currentNum));
778
783
  }, price);
779
784
  }
780
- return price;
785
+ return price.toNumber();
781
786
  };
782
787
  /**
783
788
  * @title: 判断 duration
@@ -372,7 +372,10 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
372
372
  // handleToastClose();
373
373
  interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
374
374
  module: 'till',
375
- key: 'open_till'
375
+ key: 'open_till',
376
+ data: {
377
+ type: 'cash' // cash 不需要验证钱箱权限
378
+ }
376
379
  });
377
380
  }
378
381
  // 从支付方式列表中查找现金支付方式
@@ -614,7 +617,10 @@ var PaymentContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
614
617
  // handleToastClose();
615
618
  interaction === null || interaction === void 0 || (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 || (_interaction$utils3$p = _interaction$utils3.postMessageToApp) === null || _interaction$utils3$p === void 0 || _interaction$utils3$p.call(_interaction$utils3, {
616
619
  module: 'till',
617
- key: 'open_till'
620
+ key: 'open_till',
621
+ data: {
622
+ type: 'cash' // cash 不需要验证钱箱权限
623
+ }
618
624
  });
619
625
  }
620
626
  case 16:
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export interface IScanResult {
4
3
  status: 'success' | 'failed';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const Actor: ({ name }: {
3
2
  name: string;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface valueType {
4
3
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface ProductExtensionProps {
4
3
  onDataChange: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface AddServiceProps {
4
3
  onEdit?: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const _formatBookingDetail: (data: any, modalState: any) => any;
4
3
  declare const TicketBooking: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface TicketBookingProps {
4
3
  productExtensionType: string[];
@@ -41,7 +41,7 @@ declare type ScanData = {
41
41
  };
42
42
  };
43
43
  export declare const formatScanCustomer: (data: ScanData) => {
44
- searchType: "wallet" | "walletPass" | "product" | "customer" | "local_product";
44
+ searchType: "product" | "customer" | "walletPass" | "wallet" | "local_product";
45
45
  data: any;
46
46
  scanCode: string;
47
47
  } | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const VoucherCard: (props: any) => JSX.Element | null;
4
3
  export default VoucherCard;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: (props: any) => JSX.Element;
3
2
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface FooterProps {
3
2
  state: any;
4
3
  reload: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 表单选择器
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const calculateTotalPrice: (data: any) => number;
3
2
  declare const useQuotation: (state: any, dispatch: any) => {
4
3
  dom: JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from '../../../model';
3
2
  interface useClientFnParams {
4
3
  state: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
4
3
  declare const DateCom: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
248
248
  * @Author: WangHan
249
249
  * @Date: 2024-12-24 11:32
250
250
  */
251
- export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
251
+ export declare const updateServicePrice: (state: any) => Promise<any> | never[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../info/service/actions/index.less';
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import '../../../info/service/addService/index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface DurationProps extends SelectProps {
4
3
  locale?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  interface StartTimeProps extends SelectProps {
4
3
  locale?: string;
@@ -66,6 +66,7 @@ var import_utils = require("@pisell/utils");
66
66
  var import_utils2 = require("./info/service2/utils");
67
67
  var import_lodash = require("lodash");
68
68
  var import_utilsByBooking = require("./info2/utilsByBooking");
69
+ var import_decimal = __toESM(require("decimal.js"));
69
70
  var Request = class {
70
71
  request = {};
71
72
  constructor() {
@@ -611,22 +612,26 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
611
612
  };
612
613
  var getProductTotalPrice = (item) => {
613
614
  var _a;
614
- let price = Number(item._extend.price);
615
+ let price = new import_decimal.default(item._extend.price || 0);
615
616
  let other = (_a = item._extend) == null ? void 0 : _a.other;
616
617
  if (other == null ? void 0 : other.product_variant_id) {
617
- price = Number(other == null ? void 0 : other.price);
618
+ price = new import_decimal.default((other == null ? void 0 : other.price) || 0);
618
619
  }
619
620
  if (other == null ? void 0 : other.bundle) {
620
621
  price = other == null ? void 0 : other.bundle.reduce((accumulator, currentValue) => {
621
- return accumulator + Number(currentValue.price) * Number(currentValue.num);
622
+ const currentPrice = new import_decimal.default(currentValue.price || 0);
623
+ const currentNum = new import_decimal.default(currentValue.num || 0);
624
+ return accumulator.add(currentPrice.mul(currentNum));
622
625
  }, price);
623
626
  }
624
627
  if (other == null ? void 0 : other.option) {
625
628
  price = other == null ? void 0 : other.option.reduce((accumulator, currentValue) => {
626
- return accumulator + Number(currentValue.price) * Number(currentValue.num);
629
+ const currentPrice = new import_decimal.default(currentValue.price || 0);
630
+ const currentNum = new import_decimal.default(currentValue.num || 0);
631
+ return accumulator.add(currentPrice.mul(currentNum));
627
632
  }, price);
628
633
  }
629
- return price;
634
+ return price.toNumber();
630
635
  };
631
636
  var getDuration = (duration) => {
632
637
  if (typeof duration === "number") {
@@ -286,7 +286,11 @@ var PaymentContent = (0, import_react.forwardRef)(
286
286
  });
287
287
  (_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.postMessageToApp) == null ? void 0 : _d.call(_c2, {
288
288
  module: "till",
289
- key: "open_till"
289
+ key: "open_till",
290
+ data: {
291
+ type: "cash"
292
+ // cash 不需要验证钱箱权限
293
+ }
290
294
  });
291
295
  }
292
296
  await (checkoutModule == null ? void 0 : checkoutModule.addPaymentItemAsync({
@@ -487,7 +491,11 @@ var PaymentContent = (0, import_react.forwardRef)(
487
491
  });
488
492
  (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
489
493
  module: "till",
490
- key: "open_till"
494
+ key: "open_till",
495
+ data: {
496
+ type: "cash"
497
+ // cash 不需要验证钱箱权限
498
+ }
491
499
  });
492
500
  }
493
501
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export interface IScanResult {
4
3
  status: 'success' | 'failed';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const Actor: ({ name }: {
3
2
  name: string;
4
3
  }) => JSX.Element;