@pisell/pisellos 0.0.448 → 0.0.449
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.
|
@@ -877,7 +877,12 @@ export var getSurcharge = function getSurcharge(_ref11, options) {
|
|
|
877
877
|
var firstAppointmentCartItem = (_service$filter = service.filter(function (n) {
|
|
878
878
|
return !isNormalProduct(n._productOrigin);
|
|
879
879
|
})) === null || _service$filter === void 0 ? void 0 : _service$filter[0];
|
|
880
|
-
var startDate =
|
|
880
|
+
var startDate = '';
|
|
881
|
+
if (firstAppointmentCartItem) {
|
|
882
|
+
startDate = firstAppointmentCartItem.start_date + ' ' + firstAppointmentCartItem.start_time + ':00';
|
|
883
|
+
} else {
|
|
884
|
+
startDate = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
|
885
|
+
}
|
|
881
886
|
// 编辑状态, 且未修改商品时直接从详情取出
|
|
882
887
|
if (!isEdit && bookingId) {
|
|
883
888
|
if (Array.isArray(bookingDetail === null || bookingDetail === void 0 ? void 0 : bookingDetail.surcharge)) {
|
|
@@ -529,7 +529,12 @@ var getSurcharge = ({ service, addons, bookingDetail, bookingId }, options) => {
|
|
|
529
529
|
const firstAppointmentCartItem = (_a = service.filter(
|
|
530
530
|
(n) => !(0, import_utils.isNormalProduct)(n._productOrigin)
|
|
531
531
|
)) == null ? void 0 : _a[0];
|
|
532
|
-
|
|
532
|
+
let startDate = "";
|
|
533
|
+
if (firstAppointmentCartItem) {
|
|
534
|
+
startDate = firstAppointmentCartItem.start_date + " " + firstAppointmentCartItem.start_time + ":00";
|
|
535
|
+
} else {
|
|
536
|
+
startDate = (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss");
|
|
537
|
+
}
|
|
533
538
|
if (!isEdit && bookingId) {
|
|
534
539
|
if (Array.isArray(bookingDetail == null ? void 0 : bookingDetail.surcharge)) {
|
|
535
540
|
return ((bookingDetail == null ? void 0 : bookingDetail.surcharge) || []).filter((d) => Number(d.amount) > 0).map(
|