@pisell/private-materials 6.1.33 → 6.1.35
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +25 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/amount.d.ts +16 -1
- package/es/components/booking/components/footer/amount.js +73 -47
- package/es/components/booking/editBookingModal/index.js +3 -4
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/es/components/booking/forms/single/RenderValueById.js +68 -17
- package/es/components/booking/forms/single/index.less +67 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/addService/utils.js +3 -2
- package/es/components/booking/info2/utilsByBooking.js +3 -2
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- package/es/components/booking/materiels/duration/index.js +1 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.js +3 -3
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +4 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/pro/pisellPriceRadio/index.js +2 -2
- package/es/utils/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/amount.d.ts +16 -1
- package/lib/components/booking/components/footer/amount.js +31 -33
- package/lib/components/booking/editBookingModal/index.js +3 -4
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/lib/components/booking/forms/single/RenderValueById.js +37 -9
- package/lib/components/booking/forms/single/index.less +67 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/utils.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.js +4 -4
- package/lib/components/booking/info2/service/editService/index.js +5 -1
- package/lib/components/booking/info2/utilsByBooking.js +4 -4
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/materiels/duration/index.js +1 -1
- package/lib/components/booking/materiels/startTime/index.js +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.js +3 -3
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +9 -4
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/pro/pisellPriceRadio/index.js +2 -2
- package/lib/utils/index.d.ts +1 -1
- package/package.json +12 -12
@@ -31,14 +31,14 @@ var getRelationDetailsTotal = (relation_details) => {
|
|
31
31
|
let total = 0;
|
32
32
|
for (let item of relation_details) {
|
33
33
|
const number = item.product_quantity || item.num;
|
34
|
-
const
|
35
|
-
total += Number(
|
34
|
+
const price2 = item.selling_price || item.payment_price || item.price;
|
35
|
+
total += Number(price2) * Number(number);
|
36
36
|
}
|
37
37
|
return total;
|
38
38
|
};
|
39
|
-
var
|
39
|
+
var getProductExpectAmount = (state, isEdit) => {
|
40
40
|
var _a, _b;
|
41
|
-
let
|
41
|
+
let price2 = 0;
|
42
42
|
let duration = 0;
|
43
43
|
const isDay = (0, import_utils3.isDayBooking)(state);
|
44
44
|
if (isEdit) {
|
@@ -46,24 +46,24 @@ var getProductAmount = (state, isEdit) => {
|
|
46
46
|
for (let item of state == null ? void 0 : state.service.value) {
|
47
47
|
if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item)) {
|
48
48
|
const quantity = item._extend.quantity || 1;
|
49
|
-
|
49
|
+
price2 += Number(item._extend.total) * Number(quantity);
|
50
50
|
const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? item._extend.duration : 0;
|
51
51
|
duration += _duration;
|
52
52
|
} else {
|
53
53
|
const quantity = item._extend.quantity || 1;
|
54
|
-
|
55
|
-
|
54
|
+
price2 += Number(item._extend.total) * Number(quantity);
|
55
|
+
price2 += getRelationDetailsTotal(item._extend.relation_details || []);
|
56
56
|
duration += import_utils.flexibleObj.getValue(item._extend.duration);
|
57
57
|
}
|
58
58
|
}
|
59
59
|
if (!isDay) {
|
60
60
|
for (let item of state.addons.value) {
|
61
|
-
|
61
|
+
price2 += Number(item._extend.total) * item._extend.quantity;
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}
|
65
65
|
} else {
|
66
|
-
|
66
|
+
price2 = Number((_a = state.bookingDetail) == null ? void 0 : _a.product_expect_amount);
|
67
67
|
let services = ((_b = state == null ? void 0 : state.service) == null ? void 0 : _b.value) || [];
|
68
68
|
duration = services.reduce((pre, cur) => {
|
69
69
|
var _a2;
|
@@ -78,25 +78,25 @@ var getProductAmount = (state, isEdit) => {
|
|
78
78
|
}, 0);
|
79
79
|
}
|
80
80
|
return {
|
81
|
-
|
81
|
+
productExpectAmount: Number(price2),
|
82
82
|
duration: (0, import_utils.getDiscountTime)(duration, isDay)
|
83
83
|
};
|
84
84
|
};
|
85
85
|
var getProductItemTax = (item, bookingDetail) => {
|
86
|
-
let
|
86
|
+
let price2 = 0;
|
87
87
|
const productDiscountPrice = Number(item.total);
|
88
88
|
const shopTax = productDiscountPrice * Number(bookingDetail.tax_rate) * Number(item.is_charge_tax);
|
89
89
|
const shopTaxRate = 1 + bookingDetail.tax_rate * bookingDetail.is_price_include_tax;
|
90
90
|
const res = shopTax / shopTaxRate * item.quantity;
|
91
|
-
|
92
|
-
return
|
91
|
+
price2 += res;
|
92
|
+
return price2;
|
93
93
|
};
|
94
94
|
var getTotal = (item) => {
|
95
95
|
return item._extend.payment_price !== void 0 ? item._extend.payment_price : item._extend.total;
|
96
96
|
};
|
97
97
|
var getTax = (state, isEdit) => {
|
98
98
|
var _a;
|
99
|
-
let
|
99
|
+
let tax = 0;
|
100
100
|
if (!state.bookingId || !state.bookingDetail) {
|
101
101
|
return 0;
|
102
102
|
}
|
@@ -105,7 +105,7 @@ var getTax = (state, isEdit) => {
|
|
105
105
|
}
|
106
106
|
if ((state == null ? void 0 : state.service) || (state == null ? void 0 : state.addons)) {
|
107
107
|
for (let item of state == null ? void 0 : state.service.value) {
|
108
|
-
|
108
|
+
tax += getProductItemTax(
|
109
109
|
{
|
110
110
|
...item,
|
111
111
|
total: getTotal(item),
|
@@ -116,7 +116,7 @@ var getTax = (state, isEdit) => {
|
|
116
116
|
);
|
117
117
|
}
|
118
118
|
for (let item of state.addons.value) {
|
119
|
-
|
119
|
+
tax += getProductItemTax({
|
120
120
|
...item,
|
121
121
|
total: getTotal(item),
|
122
122
|
price: item._extend.price,
|
@@ -124,16 +124,18 @@ var getTax = (state, isEdit) => {
|
|
124
124
|
}, state.bookingDetail);
|
125
125
|
}
|
126
126
|
}
|
127
|
-
return
|
127
|
+
return tax;
|
128
128
|
};
|
129
129
|
var getPaySurchargeFee = (state) => {
|
130
130
|
const { bookingDetail, bookingId } = state;
|
131
131
|
if (!bookingDetail || !bookingId) return 0;
|
132
132
|
return Number(bookingDetail.pay_processing_fee) + Number(bookingDetail.gateway_fee);
|
133
133
|
};
|
134
|
-
var
|
134
|
+
var getSurchargeAmount = (state) => {
|
135
135
|
const { bookingDetail, bookingId } = state;
|
136
|
-
if (!bookingDetail || !bookingId)
|
136
|
+
if (!bookingDetail || !bookingId) {
|
137
|
+
return;
|
138
|
+
}
|
137
139
|
return Number(bookingDetail.surcharge_fee);
|
138
140
|
};
|
139
141
|
var getPaidAmount = (state) => {
|
@@ -152,16 +154,12 @@ var is_price_include_tax = (state) => {
|
|
152
154
|
var _a;
|
153
155
|
return (_a = state.bookingDetail) == null ? void 0 : _a.is_price_include_tax;
|
154
156
|
};
|
155
|
-
var getExpectAmount = ({ price, tax,
|
156
|
-
var _a;
|
157
|
-
if (!isEdit) {
|
158
|
-
return Number((_a = state.bookingDetail) == null ? void 0 : _a.expect_amount) || 0;
|
159
|
-
}
|
157
|
+
var getExpectAmount = ({ price: price2, tax, surchargeAmount, shopDiscount, state }) => {
|
160
158
|
let _tax = tax;
|
161
|
-
if (
|
159
|
+
if (is_price_include_tax(state)) {
|
162
160
|
_tax = 0;
|
163
161
|
}
|
164
|
-
return
|
162
|
+
return price2 + _tax + surchargeAmount - shopDiscount;
|
165
163
|
};
|
166
164
|
var getTotalRefundAmount = (state) => {
|
167
165
|
var _a;
|
@@ -179,28 +177,28 @@ var getSumTotalAmount = ({ expectAmount, roundingAmount }) => {
|
|
179
177
|
return expectAmount + roundingAmount;
|
180
178
|
};
|
181
179
|
var getSumTotal = (state, isEdit) => {
|
182
|
-
const {
|
180
|
+
const { productExpectAmount, duration } = getProductExpectAmount(state, isEdit);
|
181
|
+
const shopDiscount = getShopDiscount(state);
|
183
182
|
const roundingAmount = getRoundingAmount(state);
|
184
|
-
const tax = getTax(state, isEdit);
|
185
183
|
const paySurchargeFee = getPaySurchargeFee(state);
|
186
|
-
const
|
184
|
+
const surchargeAmount = getSurchargeAmount(state);
|
185
|
+
const tax = getTax(state, isEdit);
|
187
186
|
const paidAmount = getPaidAmount(state);
|
188
187
|
const orderPaidAmount = getOrderPaidAmount(state);
|
189
188
|
const totalRefundAmount = getTotalRefundAmount(state);
|
190
|
-
const
|
191
|
-
const expectAmount = getExpectAmount({ price, tax, otherAmount, shopDiscount, state, isEdit });
|
189
|
+
const expectAmount = getExpectAmount({ price: productExpectAmount, tax, surchargeAmount, shopDiscount, state, isEdit });
|
192
190
|
const originExpectAmount = getExpectAmount({ price, tax, shopDiscount: 0, otherAmount, state, isEdit });
|
193
191
|
const sumTotalAmount = getSumTotalAmount({ expectAmount, roundingAmount });
|
194
192
|
const notPaidAmount = Number((0, import_utils2.formatAmount)(sumTotalAmount, 2, "")) - orderPaidAmount;
|
195
193
|
const actualPaidAmount = paidAmount;
|
196
194
|
const dueAmount = notPaidAmount < 0 ? Number((0, import_utils2.formatAmount)(notPaidAmount + totalRefundAmount, 2, "")) : 0;
|
197
195
|
return {
|
198
|
-
productAmount:
|
196
|
+
productAmount: productExpectAmount,
|
199
197
|
duration,
|
200
198
|
tax,
|
201
199
|
shopDiscount,
|
202
200
|
// taxText,
|
203
|
-
otherAmount,
|
201
|
+
otherAmount: surchargeAmount,
|
204
202
|
sumTotalAmount,
|
205
203
|
paidAmount,
|
206
204
|
notPaidAmount,
|
@@ -60,6 +60,7 @@ var EditBookingModal = (props, ref) => {
|
|
60
60
|
return {
|
61
61
|
open: (params2) => {
|
62
62
|
console.log("change", params2);
|
63
|
+
form.resetFields();
|
63
64
|
setParams(params2);
|
64
65
|
setOpen(true);
|
65
66
|
}
|
@@ -159,9 +160,7 @@ var EditBookingModal = (props, ref) => {
|
|
159
160
|
});
|
160
161
|
}, [data]);
|
161
162
|
const updateResource = (resource) => {
|
162
|
-
form.
|
163
|
-
resource
|
164
|
-
});
|
163
|
+
form.setFieldValue("resource", resource);
|
165
164
|
};
|
166
165
|
const originCacheItem = (0, import_react.useMemo)(() => {
|
167
166
|
if (!data) {
|
@@ -211,9 +210,9 @@ var EditBookingModal = (props, ref) => {
|
|
211
210
|
};
|
212
211
|
}, [data, useToDate, useResource]);
|
213
212
|
const initState = () => {
|
214
|
-
form.resetFields();
|
215
213
|
setData(null);
|
216
214
|
setOpen(false);
|
215
|
+
form.resetFields();
|
217
216
|
};
|
218
217
|
const onCancel = () => {
|
219
218
|
initState();
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
5
5
|
handleOpen: () => void;
|
6
6
|
handleValuesChange: (val: any) => void;
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
7
|
+
handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
|
8
8
|
};
|
9
9
|
export default useSendModal;
|
@@ -34,17 +34,20 @@ __export(RenderValueById_exports, {
|
|
34
34
|
module.exports = __toCommonJS(RenderValueById_exports);
|
35
35
|
var import_react = __toESM(require("react"));
|
36
36
|
var import_utils = require("@pisell/utils");
|
37
|
+
var import_materials = require("@pisell/materials");
|
37
38
|
var import_antd = require("antd");
|
38
39
|
var import_ahooks = require("ahooks");
|
39
40
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
40
41
|
var import_serve = require("../serve");
|
42
|
+
var import_index = require("./index.less");
|
41
43
|
var RenderValueById = (props) => {
|
42
|
-
var _a, _b, _c, _d, _e, _f;
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
43
45
|
const { field, value: propsValue } = props;
|
44
46
|
const { appHelper } = (0, import_useEngineContext.default)();
|
47
|
+
const [displayCount, setDisplayCount] = (0, import_react.useState)(10);
|
45
48
|
const _getFormData = (0, import_ahooks.useRequest)(import_serve.getFormData, {
|
46
49
|
manual: true,
|
47
|
-
cacheKey: `formOption-${(_a = field.setting) == null ? void 0 : _a.linkedTable}`,
|
50
|
+
cacheKey: `formOption-${(_a = field.setting) == null ? void 0 : _a.linkedTable}-${(_c = (_b = propsValue || []) == null ? void 0 : _b.toString) == null ? void 0 : _c.call(_b)}`,
|
48
51
|
staleTime: 500,
|
49
52
|
cacheTime: 5e3
|
50
53
|
});
|
@@ -81,24 +84,49 @@ var RenderValueById = (props) => {
|
|
81
84
|
}))) || [];
|
82
85
|
}
|
83
86
|
return (_e2 = field == null ? void 0 : field.setting) == null ? void 0 : _e2.customTypeList;
|
84
|
-
}, [field.filed_type, (
|
87
|
+
}, [field.filed_type, (_d = field == null ? void 0 : field.setting) == null ? void 0 : _d.customTypeList, _getFormData.data]);
|
85
88
|
if ((0, import_utils.isArr)(value)) {
|
89
|
+
const formListDisplay = ((_e = field == null ? void 0 : field.setting) == null ? void 0 : _e.displayStyle) === "list" && (field == null ? void 0 : field.filed_type) === "form_to_form";
|
86
90
|
let _list = options == null ? void 0 : options.filter((i) => {
|
87
91
|
return value == null ? void 0 : value.includes((i == null ? void 0 : i.id) || i.value);
|
88
92
|
});
|
89
|
-
let _str = (_list == null ? void 0 : _list.map((i) => {
|
93
|
+
let _str = !formListDisplay && (_list == null ? void 0 : _list.map((i) => {
|
90
94
|
var _a2;
|
91
|
-
|
95
|
+
const title = (_a2 = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a2.translationShop((i == null ? void 0 : i.title) || (i == null ? void 0 : i.label));
|
96
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title }, /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { className: "pisell-lowcode__booking-form-link-tag-title" }, title));
|
92
97
|
})) || "-";
|
93
|
-
|
98
|
+
if (formListDisplay) {
|
99
|
+
const displayList = (_list == null ? void 0 : _list.slice(0, displayCount)) || [];
|
100
|
+
_str = (displayList == null ? void 0 : displayList.map((i, index) => {
|
101
|
+
var _a2;
|
102
|
+
const title = (_a2 = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a2.translationShop((i == null ? void 0 : i.title) || (i == null ? void 0 : i.label));
|
103
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-link-to-list-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-form-link-to-list-item-index" }, index + 1), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-form-link-to-list-item-title" }, title)));
|
104
|
+
})) || "-";
|
105
|
+
}
|
106
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
107
|
+
"span",
|
108
|
+
{
|
109
|
+
className: formListDisplay ? "pisell-lowcode__booking-form-link-to-list-wrap" : ""
|
110
|
+
},
|
111
|
+
_str || "-",
|
112
|
+
formListDisplay && (_list == null ? void 0 : _list.length) > displayCount && /* @__PURE__ */ import_react.default.createElement(
|
113
|
+
"div",
|
114
|
+
{
|
115
|
+
className: "pisell-lowcode__booking-form-link-to-list-item-more",
|
116
|
+
onClick: () => setDisplayCount((prev) => Math.min(prev + 10, (_list == null ? void 0 : _list.length) || 0))
|
117
|
+
},
|
118
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.form.link.to.another.record.more")),
|
119
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "icona-IconStroke" })
|
120
|
+
)
|
121
|
+
);
|
94
122
|
}
|
95
123
|
if (!(0, import_utils.isUndefined)(value)) {
|
96
|
-
if ((field == null ? void 0 : field.filed_type) === "select" && !((
|
124
|
+
if ((field == null ? void 0 : field.filed_type) === "select" && !((_f = field == null ? void 0 : field.setting) == null ? void 0 : _f.version)) {
|
97
125
|
return /* @__PURE__ */ import_react.default.createElement("span", null, value || "-");
|
98
126
|
}
|
99
127
|
let _item = options == null ? void 0 : options.filter((i) => (i == null ? void 0 : i.id) == value);
|
100
|
-
return ((
|
101
|
-
((
|
128
|
+
return ((_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.translationShop(
|
129
|
+
((_g = _item == null ? void 0 : _item[0]) == null ? void 0 : _g.title) || ((_h = _item == null ? void 0 : _item[0]) == null ? void 0 : _h.label)
|
102
130
|
)) || "-";
|
103
131
|
}
|
104
132
|
return null;
|
@@ -1,3 +1,69 @@
|
|
1
1
|
.attachment-item {
|
2
2
|
width: 100%;
|
3
|
-
}
|
3
|
+
}
|
4
|
+
|
5
|
+
.pisell-lowcode__booking-form-link-tag-title {
|
6
|
+
overflow: hidden;
|
7
|
+
text-overflow: ellipsis;
|
8
|
+
white-space: nowrap;
|
9
|
+
display: inline-block;
|
10
|
+
max-width: 100%;
|
11
|
+
}
|
12
|
+
|
13
|
+
.pisell-lowcode__booking-form-link-to-list-wrap {
|
14
|
+
display: flex;
|
15
|
+
flex-direction: column;
|
16
|
+
gap: 12px;
|
17
|
+
|
18
|
+
|
19
|
+
.pisell-lowcode__booking-form-link-to-list-item-more {
|
20
|
+
padding: 4px 6px;
|
21
|
+
color: #705dff;
|
22
|
+
font-size: 14px;
|
23
|
+
cursor: pointer;
|
24
|
+
background-color: #f9fafb;
|
25
|
+
border-radius: 8px;
|
26
|
+
border: 1px solid #eaecf0;
|
27
|
+
display: flex;
|
28
|
+
justify-content: center;
|
29
|
+
align-items: center;
|
30
|
+
gap: 4px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.pisell-lowcode__booking-form-link-to-list-item {
|
34
|
+
display: flex;
|
35
|
+
align-items: center;
|
36
|
+
gap: 8px;
|
37
|
+
background-color: #f9fafb;
|
38
|
+
padding: 12px 14px;
|
39
|
+
border-radius: 8px;
|
40
|
+
border: 1px solid #eaecf0;
|
41
|
+
color: #101828;
|
42
|
+
font-size: 16px;
|
43
|
+
font-weight: 500;
|
44
|
+
white-space: normal;
|
45
|
+
|
46
|
+
.pisell-lowcode__booking-form-link-to-list-item-index {
|
47
|
+
padding: 0 5px;
|
48
|
+
min-width: 20px;
|
49
|
+
min-height: 20px;
|
50
|
+
line-height: 20px;
|
51
|
+
border-radius: 20px;
|
52
|
+
font-size: 14px;
|
53
|
+
font-weight: 600;
|
54
|
+
background-color: #705dff;
|
55
|
+
display: flex;
|
56
|
+
align-items: center;
|
57
|
+
justify-content: center;
|
58
|
+
color: #fff;
|
59
|
+
}
|
60
|
+
|
61
|
+
.pisell-lowcode__booking-form-link-to-list-item-title {
|
62
|
+
flex: 1;
|
63
|
+
overflow: hidden;
|
64
|
+
text-overflow: ellipsis;
|
65
|
+
white-space: nowrap;
|
66
|
+
display: block;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
@@ -1,14 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { FormState } from '../model';
|
3
1
|
export declare const walkInData: {
|
4
2
|
id: number;
|
5
3
|
nickname: string;
|
6
4
|
};
|
7
|
-
export declare const Provider:
|
8
|
-
state: FormState;
|
9
|
-
} & {
|
10
|
-
dispatch: (params: {
|
11
|
-
type: string;
|
12
|
-
payload: any;
|
13
|
-
}) => void;
|
14
|
-
}>;
|
5
|
+
export declare const Provider: any, Context: any;
|
@@ -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) => Promise<any
|
251
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
@@ -145,7 +145,8 @@ var isBooking4Shop = (shopId, renderType, businessUtils) => {
|
|
145
145
|
8824,
|
146
146
|
8913,
|
147
147
|
8918,
|
148
|
-
6413
|
148
|
+
6413,
|
149
|
+
8943
|
149
150
|
];
|
150
151
|
return booking4Shops.includes(shopId) || (businessUtils == null ? void 0 : businessUtils.getAppByModal("resourcekit"));
|
151
152
|
};
|
@@ -233,7 +233,7 @@ var setDefaultResource = ({ cacheItem, resources }) => {
|
|
233
233
|
let resourceId = Number(serviceParams == null ? void 0 : serviceParams.resource_id);
|
234
234
|
for (let item of resources) {
|
235
235
|
const renderList = item.renderList.filter(
|
236
|
-
(d) => d.
|
236
|
+
(d) => d.id === resourceId
|
237
237
|
);
|
238
238
|
let defaultOriginalResource = [];
|
239
239
|
if (renderList.length === 0) {
|
@@ -384,7 +384,7 @@ var getIsAutoClose = (cacheItem) => {
|
|
384
384
|
);
|
385
385
|
};
|
386
386
|
var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
387
|
-
var _a, _b, _c, _d;
|
387
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
388
388
|
const isNew = cacheItem.new || !cacheItem._extend.endDate;
|
389
389
|
let _cacheItem = { ...cacheItem };
|
390
390
|
const resourcesOriginMap = state.service.resourcesOriginMap || {};
|
@@ -432,7 +432,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
432
432
|
state
|
433
433
|
});
|
434
434
|
if ((0, import_utils.getDuration)(_cacheItem == null ? void 0 : _cacheItem.duration) === "flexible") {
|
435
|
-
_cacheItem._extend.duration = _cacheItem._data.timeObj.durationSlicesBasedOnTime[0].value;
|
435
|
+
_cacheItem._extend.duration = (_e = (_d = (_c = _cacheItem._data.timeObj) == null ? void 0 : _c.durationSlicesBasedOnTime) == null ? void 0 : _d[0]) == null ? void 0 : _e.value;
|
436
436
|
const { startDate, endDate } = (0, import_utils.getServiceTimes)({
|
437
437
|
_extend: _cacheItem._extend
|
438
438
|
});
|
@@ -466,7 +466,7 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
466
466
|
{
|
467
467
|
extraResources,
|
468
468
|
// 此数据用来控制 该商品所展示的资源是自身关联的, 还是全部的
|
469
|
-
resourceTab: (
|
469
|
+
resourceTab: (_g = (_f = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f.config) == null ? void 0 : _g.resource_tab,
|
470
470
|
resourcesOrigin: state.service.resourcesOrigin
|
471
471
|
}
|
472
472
|
);
|
@@ -638,7 +638,11 @@ var Info = (_, ref) => {
|
|
638
638
|
));
|
639
639
|
}, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length, isNormalProduct]);
|
640
640
|
console.log("render edit");
|
641
|
-
console.log(
|
641
|
+
console.log(
|
642
|
+
state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose),
|
643
|
+
performance.now() - window.pp1,
|
644
|
+
"打开商品1"
|
645
|
+
);
|
642
646
|
const [val, setVal] = (0, import_react.useState)(false);
|
643
647
|
(0, import_react.useEffect)(() => {
|
644
648
|
if (isShowTimeAndResource) {
|
@@ -211,7 +211,7 @@ var getAppointmentTimingPreference = (state) => {
|
|
211
211
|
return ((_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.information_tab) == null ? void 0 : _c.appointment_timing_preference) || "sequential";
|
212
212
|
};
|
213
213
|
var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
214
|
-
var _a, _b, _c, _d;
|
214
|
+
var _a, _b, _c, _d, _e;
|
215
215
|
if (cacheItem == null ? void 0 : cacheItem.isCustomItem) {
|
216
216
|
return {
|
217
217
|
duration: null
|
@@ -224,7 +224,7 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
224
224
|
// 时长: 当前商品时长 > 第一个时长
|
225
225
|
duration: (0, import_utils2.findNextDuration)(
|
226
226
|
cacheItem.duration,
|
227
|
-
timeObj.durationSlicesBasedOnTime,
|
227
|
+
timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime,
|
228
228
|
(_b = cacheItem == null ? void 0 : cacheItem.duration) == null ? void 0 : _b.value
|
229
229
|
)
|
230
230
|
};
|
@@ -235,7 +235,7 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
235
235
|
_extend.start_time = lastServerStartDate.format("HH:mm");
|
236
236
|
} else {
|
237
237
|
if ((0, import_dayjs.default)(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
|
238
|
-
_extend.start_time = timeObj.timeSlices[timeObj.timeSlices.length - 1].value;
|
238
|
+
_extend.start_time = timeObj == null ? void 0 : timeObj.timeSlices[((_c = timeObj == null ? void 0 : timeObj.timeSlices) == null ? void 0 : _c.length) - 1].value;
|
239
239
|
} else {
|
240
240
|
_extend.start_time = lastServerEndDate.format("HH:mm");
|
241
241
|
}
|
@@ -268,7 +268,7 @@ var getServiceStartTimeAndEndTime = (state, cacheItem, timeObj) => {
|
|
268
268
|
const { startDate, endDate } = (0, import_utils2.getServiceTimes)({ _extend });
|
269
269
|
_extend.startDate = startDate;
|
270
270
|
_extend.endDate = endDate;
|
271
|
-
const session = (
|
271
|
+
const session = (_e = (_d = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.session;
|
272
272
|
if ((0, import_utils2.isSessionProduct)(cacheItem) && session) {
|
273
273
|
_extend.start_date = session.start_at;
|
274
274
|
_extend.startDate = session.start_at;
|
@@ -299,6 +299,7 @@ declare const _default: {
|
|
299
299
|
'pisell2.text.quotation.product.change.title': string;
|
300
300
|
'pisell2.text.quotation.product.change.describe': string;
|
301
301
|
'pisell2.booking.notes.placeholder': string;
|
302
|
+
'pisell2.text.form.link.to.another.record.more': string;
|
302
303
|
};
|
303
304
|
'zh-CN': {
|
304
305
|
'pisell2.text.refunded-amount': string;
|
@@ -600,6 +601,7 @@ declare const _default: {
|
|
600
601
|
'pisell2.text.quotation.product.change.title': string;
|
601
602
|
'pisell2.text.quotation.product.change.describe': string;
|
602
603
|
'pisell2.booking.notes.placeholder': string;
|
604
|
+
'pisell2.text.form.link.to.another.record.more': string;
|
603
605
|
};
|
604
606
|
'zh-HK': {
|
605
607
|
'pisell2.text.refunded-amount': string;
|
@@ -901,6 +903,7 @@ declare const _default: {
|
|
901
903
|
'pisell2.text.quotation.product.change.title': string;
|
902
904
|
'pisell2.text.quotation.product.change.describe': string;
|
903
905
|
'pisell2.booking.notes.placeholder': string;
|
906
|
+
'pisell2.text.form.link.to.another.record.more': string;
|
904
907
|
};
|
905
908
|
};
|
906
909
|
export default _default;
|
@@ -366,7 +366,8 @@ var locales_default = {
|
|
366
366
|
"pisell2.text.quotation.product.change.title": "Notification",
|
367
367
|
"pisell2.text.quotation.product.change.describe": "Product updates available: Please refresh the following items to load the latest data.",
|
368
368
|
// Notes
|
369
|
-
"pisell2.booking.notes.placeholder": "Enter a note..."
|
369
|
+
"pisell2.booking.notes.placeholder": "Enter a note...",
|
370
|
+
"pisell2.text.form.link.to.another.record.more": "View More"
|
370
371
|
},
|
371
372
|
"zh-CN": {
|
372
373
|
"pisell2.text.refunded-amount": "已退金额",
|
@@ -705,7 +706,8 @@ var locales_default = {
|
|
705
706
|
"pisell2.text.quotation.product.change.title": "提示",
|
706
707
|
"pisell2.text.quotation.product.change.describe": "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
707
708
|
// Notes
|
708
|
-
"pisell2.booking.notes.placeholder": "输入备注..."
|
709
|
+
"pisell2.booking.notes.placeholder": "输入备注...",
|
710
|
+
"pisell2.text.form.link.to.another.record.more": "查看更多"
|
709
711
|
},
|
710
712
|
"zh-HK": {
|
711
713
|
"pisell2.text.refunded-amount": "已退金額",
|
@@ -1044,6 +1046,7 @@ var locales_default = {
|
|
1044
1046
|
"pisell2.text.quotation.product.change.title": "提示",
|
1045
1047
|
"pisell2.text.quotation.product.change.describe": "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
1046
1048
|
// Notes
|
1047
|
-
"pisell2.booking.notes.placeholder": "輸入備註..."
|
1049
|
+
"pisell2.booking.notes.placeholder": "輸入備註...",
|
1050
|
+
"pisell2.text.form.link.to.another.record.more": "查看更多"
|
1048
1051
|
}
|
1049
1052
|
};
|
@@ -77,7 +77,7 @@ var Duration = (props) => {
|
|
77
77
|
});
|
78
78
|
}
|
79
79
|
return durationSlicesBasedOnTime;
|
80
|
-
}, [timeObj.durationSlicesBasedOnTime, slice, locale, duration, startDateStr, usableTime == null ? void 0 : usableTime.end_at]);
|
80
|
+
}, [timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime, slice, locale, duration, startDateStr, usableTime == null ? void 0 : usableTime.end_at]);
|
81
81
|
(0, import_react.useEffect)(() => {
|
82
82
|
timeObjChange == null ? void 0 : timeObjChange(times);
|
83
83
|
}, [times]);
|
@@ -52,6 +52,6 @@ var StartTime = (props) => {
|
|
52
52
|
},
|
53
53
|
[]
|
54
54
|
);
|
55
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { ...selectProps, ...resetProps }, renderOptions(timeObj.timeSlices));
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { ...selectProps, ...resetProps }, renderOptions(timeObj == null ? void 0 : timeObj.timeSlices));
|
56
56
|
};
|
57
57
|
var startTime_default = StartTime;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
amountSymbol: string;
|
4
3
|
apis: {
|
@@ -106,11 +105,4 @@ export declare const walkInData: {
|
|
106
105
|
id: number;
|
107
106
|
nickname: string;
|
108
107
|
};
|
109
|
-
export declare const Provider:
|
110
|
-
state: FormState;
|
111
|
-
} & {
|
112
|
-
dispatch: (params: {
|
113
|
-
type: string;
|
114
|
-
payload: any;
|
115
|
-
}) => void;
|
116
|
-
}>;
|
108
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -550,7 +550,7 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
550
550
|
}
|
551
551
|
return findNextDuration(
|
552
552
|
cacheItem.duration,
|
553
|
-
timeObj.durationSlicesBasedOnTime,
|
553
|
+
timeObj == null ? void 0 : timeObj.durationSlicesBasedOnTime,
|
554
554
|
(_a = cacheItem == null ? void 0 : cacheItem.duration) == null ? void 0 : _a.value
|
555
555
|
);
|
556
556
|
};
|
@@ -566,14 +566,14 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
566
566
|
_extend.start_time = lastServerStartDate.format("HH:mm");
|
567
567
|
} else {
|
568
568
|
if ((0, import_dayjs.default)(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
|
569
|
-
_extend.start_time = timeObj.timeSlices[timeObj.timeSlices.length - 1].value;
|
569
|
+
_extend.start_time = timeObj == null ? void 0 : timeObj.timeSlices[(timeObj == null ? void 0 : timeObj.timeSlices.length) - 1].value;
|
570
570
|
} else {
|
571
571
|
_extend.start_time = lastServerEndDate.format("HH:mm");
|
572
572
|
}
|
573
573
|
}
|
574
574
|
} else {
|
575
575
|
let findNextSliceProps = {
|
576
|
-
timeSlices: timeObj.timeSlices,
|
576
|
+
timeSlices: timeObj == null ? void 0 : timeObj.timeSlices,
|
577
577
|
index: 0,
|
578
578
|
date: ""
|
579
579
|
};
|