@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.
- 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 +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/utils.js +10 -5
- package/es/components/checkout/PaymentModal.js +8 -2
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.js +10 -5
- package/lib/components/checkout/PaymentModal.js +10 -2
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/package.json +3 -3
@@ -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[]
|
251
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
@@ -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 =
|
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 =
|
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
|
-
|
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
|
-
|
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:
|
@@ -41,7 +41,7 @@ declare type ScanData = {
|
|
41
41
|
};
|
42
42
|
};
|
43
43
|
export declare const formatScanCustomer: (data: ScanData) => {
|
44
|
-
searchType: "
|
44
|
+
searchType: "product" | "customer" | "walletPass" | "wallet" | "local_product";
|
45
45
|
data: any;
|
46
46
|
scanCode: string;
|
47
47
|
} | null;
|
@@ -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[]
|
251
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
@@ -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 =
|
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 =
|
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
|
-
|
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
|
-
|
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
|
}
|