@pisell/private-materials 3.3.38 → 3.3.39
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/footer/index.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +32 -31
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.js +1 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/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/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +23 -23
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.js +1 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/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/package.json +4 -4
|
@@ -148,7 +148,7 @@ var ContinueButton = function ContinueButton() {
|
|
|
148
148
|
var _ref3 = item._originData || {},
|
|
149
149
|
product = _ref3.product;
|
|
150
150
|
var newProduct = productById[product.product_id];
|
|
151
|
-
//
|
|
151
|
+
// 目前默认按单件商品计算,即 价格 * 1
|
|
152
152
|
var _totalPrice = Number(newProduct.price);
|
|
153
153
|
if (!(item !== null && item !== void 0 && item._productDetail)) {
|
|
154
154
|
// 没有 _productDetail 说明可能是普通商品 则直接替换价格
|
|
@@ -162,19 +162,8 @@ var ContinueButton = function ContinueButton() {
|
|
|
162
162
|
_item$_productDetail$ = _item$_productDetail.bundle,
|
|
163
163
|
bundle = _item$_productDetail$ === void 0 ? [] : _item$_productDetail$,
|
|
164
164
|
options = _item$_productDetail.options;
|
|
165
|
-
|
|
166
|
-
// 1.
|
|
167
|
-
if (product !== null && product !== void 0 && product.product_variant_id) {
|
|
168
|
-
var _newProduct$variant = newProduct.variant,
|
|
169
|
-
variant = _newProduct$variant === void 0 ? [] : _newProduct$variant;
|
|
170
|
-
var _variant = variant.find(function (v) {
|
|
171
|
-
return v.id === product.product_variant_id;
|
|
172
|
-
});
|
|
173
|
-
if (_variant) {
|
|
174
|
-
_totalPrice = Number(_variant.price);
|
|
175
|
-
}
|
|
176
|
-
} else if (
|
|
177
|
-
// 2. 套餐商品
|
|
165
|
+
if (
|
|
166
|
+
// 1. 套餐商品
|
|
178
167
|
Array.isArray(product === null || product === void 0 ? void 0 : product.product_bundle) && product.product_bundle.length > 0) {
|
|
179
168
|
// 登录后的最新商品分组信息
|
|
180
169
|
var _newProduct$bundle_gr = newProduct.bundle_group,
|
|
@@ -201,7 +190,7 @@ var ContinueButton = function ContinueButton() {
|
|
|
201
190
|
if ((_originBundleItemInfo === null || _originBundleItemInfo === void 0 ? void 0 : _originBundleItemInfo._bundle_product_id) === (_newBundleItemInfo === null || _newBundleItemInfo === void 0 ? void 0 : _newBundleItemInfo.bundle_product_id)) {
|
|
202
191
|
var price_type = _originBundleItemInfo.price_type,
|
|
203
192
|
_originBundleItemInfo2 = _originBundleItemInfo.num,
|
|
204
|
-
num = _originBundleItemInfo2 === void 0 ?
|
|
193
|
+
num = _originBundleItemInfo2 === void 0 ? 1 : _originBundleItemInfo2,
|
|
205
194
|
_originBundleItemOptions = _originBundleItemInfo.option;
|
|
206
195
|
var _bundleItemPrice = Number(_newBundleItemInfo.price);
|
|
207
196
|
if (price_type === 'markup') {
|
|
@@ -221,7 +210,7 @@ var ContinueButton = function ContinueButton() {
|
|
|
221
210
|
if (_originOptionItem) {
|
|
222
211
|
var price = _originOptionItem.price,
|
|
223
212
|
_originOptionItem$num = _originOptionItem.num,
|
|
224
|
-
_optionNum = _originOptionItem$num === void 0 ?
|
|
213
|
+
_optionNum = _originOptionItem$num === void 0 ? 1 : _originOptionItem$num;
|
|
225
214
|
_totalPrice += Number(price) * _optionNum;
|
|
226
215
|
}
|
|
227
216
|
};
|
|
@@ -235,23 +224,35 @@ var ContinueButton = function ContinueButton() {
|
|
|
235
224
|
for (var i = 0; i < product.product_bundle.length; i++) {
|
|
236
225
|
_loop();
|
|
237
226
|
}
|
|
238
|
-
} else
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
var
|
|
244
|
-
return
|
|
227
|
+
} else {
|
|
228
|
+
// 2. 组合商品
|
|
229
|
+
if (product !== null && product !== void 0 && product.product_variant_id) {
|
|
230
|
+
var _newProduct$variant = newProduct.variant,
|
|
231
|
+
variant = _newProduct$variant === void 0 ? [] : _newProduct$variant;
|
|
232
|
+
var _variant = variant.find(function (v) {
|
|
233
|
+
return v.id === product.product_variant_id;
|
|
245
234
|
});
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
235
|
+
if (_variant) {
|
|
236
|
+
_totalPrice = Number(_variant.price);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// 3. 单规格商品
|
|
240
|
+
if (Array.isArray(product === null || product === void 0 ? void 0 : product.product_option_item) && product.product_option_item.length > 0) {
|
|
241
|
+
var _loop3 = function _loop3() {
|
|
242
|
+
var option_group_item_id = product.product_option_item[_i].option_group_item_id;
|
|
243
|
+
var _originOptionItem = options.find(function (op) {
|
|
244
|
+
return op.product_option_item_id === option_group_item_id;
|
|
245
|
+
});
|
|
246
|
+
if (_originOptionItem) {
|
|
247
|
+
var price = _originOptionItem.price,
|
|
248
|
+
_originOptionItem$num2 = _originOptionItem.num,
|
|
249
|
+
num = _originOptionItem$num2 === void 0 ? 1 : _originOptionItem$num2;
|
|
250
|
+
_totalPrice += Number(price) * num;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
for (var _i = 0; _i < product.product_option_item.length; _i++) {
|
|
254
|
+
_loop3();
|
|
251
255
|
}
|
|
252
|
-
};
|
|
253
|
-
for (var _i = 0; _i < product.product_option_item.length; _i++) {
|
|
254
|
-
_loop3();
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
258
|
item.price = _totalPrice;
|
|
@@ -55,7 +55,7 @@ var Event = function Event() {
|
|
|
55
55
|
customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
|
|
56
56
|
open_quotation: 1
|
|
57
57
|
});
|
|
58
|
-
}, [data === null || data === void 0 || (_data$resourceData2 = data.resourceData) === null || _data$resourceData2 === void 0 || (_data$resourceData2 = _data$resourceData2.currentResourceItem) === null || _data$resourceData2 === void 0 ? void 0 : _data$resourceData2.id, customer]);
|
|
58
|
+
}, [data === null || data === void 0 || (_data$resourceData2 = data.resourceData) === null || _data$resourceData2 === void 0 || (_data$resourceData2 = _data$resourceData2.currentResourceItem) === null || _data$resourceData2 === void 0 ? void 0 : _data$resourceData2.id, customer === null || customer === void 0 ? void 0 : customer.id]);
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* @title: 点击选择event
|
|
@@ -103,16 +103,8 @@ var ContinueButton = () => {
|
|
|
103
103
|
return item;
|
|
104
104
|
}
|
|
105
105
|
const { bundle = [], options } = item._productDetail;
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
const _variant = variant.find(
|
|
109
|
-
(v) => v.id === product.product_variant_id
|
|
110
|
-
);
|
|
111
|
-
if (_variant) {
|
|
112
|
-
_totalPrice = Number(_variant.price);
|
|
113
|
-
}
|
|
114
|
-
} else if (
|
|
115
|
-
// 2. 套餐商品
|
|
106
|
+
if (
|
|
107
|
+
// 1. 套餐商品
|
|
116
108
|
Array.isArray(product == null ? void 0 : product.product_bundle) && product.product_bundle.length > 0
|
|
117
109
|
) {
|
|
118
110
|
const { bundle_group = [] } = newProduct;
|
|
@@ -132,7 +124,7 @@ var ContinueButton = () => {
|
|
|
132
124
|
if ((_originBundleItemInfo == null ? void 0 : _originBundleItemInfo._bundle_product_id) === (_newBundleItemInfo == null ? void 0 : _newBundleItemInfo.bundle_product_id)) {
|
|
133
125
|
const {
|
|
134
126
|
price_type,
|
|
135
|
-
num =
|
|
127
|
+
num = 1,
|
|
136
128
|
option: _originBundleItemOptions
|
|
137
129
|
} = _originBundleItemInfo;
|
|
138
130
|
const _bundleItemPrice = Number(_newBundleItemInfo.price);
|
|
@@ -150,7 +142,7 @@ var ContinueButton = () => {
|
|
|
150
142
|
(op) => op.product_option_item_id === option_group_item_id
|
|
151
143
|
);
|
|
152
144
|
if (_originOptionItem) {
|
|
153
|
-
const { price, num: _optionNum =
|
|
145
|
+
const { price, num: _optionNum = 1 } = _originOptionItem;
|
|
154
146
|
_totalPrice += Number(price) * _optionNum;
|
|
155
147
|
}
|
|
156
148
|
}
|
|
@@ -158,18 +150,26 @@ var ContinueButton = () => {
|
|
|
158
150
|
}
|
|
159
151
|
}
|
|
160
152
|
}
|
|
161
|
-
} else
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const { option_group_item_id } = product.product_option_item[i];
|
|
167
|
-
const _originOptionItem = options.find(
|
|
168
|
-
(op) => op.product_option_item_id === option_group_item_id
|
|
153
|
+
} else {
|
|
154
|
+
if (product == null ? void 0 : product.product_variant_id) {
|
|
155
|
+
const { variant = [] } = newProduct;
|
|
156
|
+
const _variant = variant.find(
|
|
157
|
+
(v) => v.id === product.product_variant_id
|
|
169
158
|
);
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
|
|
159
|
+
if (_variant) {
|
|
160
|
+
_totalPrice = Number(_variant.price);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (Array.isArray(product == null ? void 0 : product.product_option_item) && product.product_option_item.length > 0) {
|
|
164
|
+
for (let i = 0; i < product.product_option_item.length; i++) {
|
|
165
|
+
const { option_group_item_id } = product.product_option_item[i];
|
|
166
|
+
const _originOptionItem = options.find(
|
|
167
|
+
(op) => op.product_option_item_id === option_group_item_id
|
|
168
|
+
);
|
|
169
|
+
if (_originOptionItem) {
|
|
170
|
+
const { price, num = 1 } = _originOptionItem;
|
|
171
|
+
_totalPrice += Number(price) * num;
|
|
172
|
+
}
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -69,7 +69,7 @@ var Event = () => {
|
|
|
69
69
|
customer_id: customer == null ? void 0 : customer.id,
|
|
70
70
|
open_quotation: 1
|
|
71
71
|
});
|
|
72
|
-
}, [(_b = (_a = data == null ? void 0 : data.resourceData) == null ? void 0 : _a.currentResourceItem) == null ? void 0 : _b.id, customer]);
|
|
72
|
+
}, [(_b = (_a = data == null ? void 0 : data.resourceData) == null ? void 0 : _a.currentResourceItem) == null ? void 0 : _b.id, customer == null ? void 0 : customer.id]);
|
|
73
73
|
const handleClick = (item) => {
|
|
74
74
|
selectEvent(item);
|
|
75
75
|
onOpenEventDetail(item);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.39",
|
|
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/
|
|
62
|
+
"@pisell/materials": "3.3.14",
|
|
63
63
|
"@pisell/icon": "0.0.11",
|
|
64
|
-
"@pisell/
|
|
65
|
-
"@pisell/
|
|
64
|
+
"@pisell/utils": "1.0.42",
|
|
65
|
+
"@pisell/date-picker": "3.0.2"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|