@pisell/private-materials 3.0.202 → 3.0.203
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/info/service2/utils.js +11 -9
- package/lib/components/booking/info/service2/utils.js +4 -1
- package/package.json +4 -4
|
@@ -977,11 +977,12 @@ export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
|
977
977
|
_product_id = product_id || ((_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI.product_id) || 0;
|
|
978
978
|
multi_day_price = null;
|
|
979
979
|
if (product_id) {
|
|
980
|
-
_context2.next =
|
|
980
|
+
_context2.next = 10;
|
|
981
981
|
break;
|
|
982
982
|
}
|
|
983
|
+
console.log('updateAppointmentServicePrice', product_id);
|
|
983
984
|
return _context2.abrupt("return", defaultReturn);
|
|
984
|
-
case
|
|
985
|
+
case 10:
|
|
985
986
|
startDate = dayjs(start_date).format(format);
|
|
986
987
|
endDate = dayjs(end_date).subtract(1, 'days').format(format);
|
|
987
988
|
params = {
|
|
@@ -991,9 +992,9 @@ export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
|
991
992
|
end: endDate
|
|
992
993
|
}
|
|
993
994
|
};
|
|
994
|
-
_context2.next =
|
|
995
|
+
_context2.next = 15;
|
|
995
996
|
return postMultiDay(_product_id, params);
|
|
996
|
-
case
|
|
997
|
+
case 15:
|
|
997
998
|
res = _context2.sent;
|
|
998
999
|
_prices = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.multi_day_price) || []; // 如果接口返回的有报价单,则分割商品数据
|
|
999
1000
|
multi_day_price = _prices === null || _prices === void 0 ? void 0 : _prices.map(function (p) {
|
|
@@ -1015,16 +1016,17 @@ export var updateAppointmentServicePrice = /*#__PURE__*/function () {
|
|
|
1015
1016
|
multiDayPrices: multi_day_price,
|
|
1016
1017
|
price: Number(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.price) || 0
|
|
1017
1018
|
});
|
|
1018
|
-
case
|
|
1019
|
-
_context2.prev =
|
|
1019
|
+
case 21:
|
|
1020
|
+
_context2.prev = 21;
|
|
1020
1021
|
_context2.t0 = _context2["catch"](2);
|
|
1021
|
-
|
|
1022
|
+
console.log('updateAppointmentServicePrice', _context2.t0);
|
|
1023
|
+
case 24:
|
|
1022
1024
|
return _context2.abrupt("return", defaultReturn);
|
|
1023
|
-
case
|
|
1025
|
+
case 25:
|
|
1024
1026
|
case "end":
|
|
1025
1027
|
return _context2.stop();
|
|
1026
1028
|
}
|
|
1027
|
-
}, _callee2, null, [[2,
|
|
1029
|
+
}, _callee2, null, [[2, 21]]);
|
|
1028
1030
|
}));
|
|
1029
1031
|
return function updateAppointmentServicePrice(_x4, _x5) {
|
|
1030
1032
|
return _ref6.apply(this, arguments);
|
|
@@ -600,8 +600,10 @@ var updateAppointmentServicePrice = async (state, { start_date, end_date, produc
|
|
|
600
600
|
const customer_id = ((_e = (_d = state == null ? void 0 : state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id) || 1;
|
|
601
601
|
const _product_id = product_id || ((_f = state.service.cacheItem) == null ? void 0 : _f.product_id) || 0;
|
|
602
602
|
let multi_day_price = null;
|
|
603
|
-
if (!product_id)
|
|
603
|
+
if (!product_id) {
|
|
604
|
+
console.log("updateAppointmentServicePrice", product_id);
|
|
604
605
|
return defaultReturn;
|
|
606
|
+
}
|
|
605
607
|
const startDate = (0, import_dayjs.default)(start_date).format(format);
|
|
606
608
|
const endDate = (0, import_dayjs.default)(end_date).subtract(1, "days").format(format);
|
|
607
609
|
const params = {
|
|
@@ -629,6 +631,7 @@ var updateAppointmentServicePrice = async (state, { start_date, end_date, produc
|
|
|
629
631
|
price: Number((_h = res == null ? void 0 : res.data) == null ? void 0 : _h.price) || 0
|
|
630
632
|
};
|
|
631
633
|
} catch (error) {
|
|
634
|
+
console.log("updateAppointmentServicePrice", error);
|
|
632
635
|
}
|
|
633
636
|
return defaultReturn;
|
|
634
637
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.203",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
-
"@pisell/utils": "1.0.42",
|
|
63
62
|
"@pisell/materials": "3.0.62",
|
|
64
|
-
"@pisell/
|
|
65
|
-
"@pisell/
|
|
63
|
+
"@pisell/date-picker": "3.0.1",
|
|
64
|
+
"@pisell/utils": "1.0.42",
|
|
65
|
+
"@pisell/icon": "0.0.11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|