@pisell/materials 2.2.39 → 2.2.40
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +14 -14
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/collapse/index.js +27 -4
- package/es/components/productCard/components/Action/index.js +1 -1
- package/es/components/productCard/components/AmountFooter/index.d.ts +1 -1
- package/es/components/productCard/components/AmountFooter/index.js +30 -10
- package/es/components/productCard/components/AmountFooter/index.less +11 -0
- package/es/components/productCard/components/Header/index.js +22 -14
- package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/es/components/productCard/components/MultiDay/index.js +79 -0
- package/es/components/productCard/components/MultiDay/index.less +34 -0
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/MultiDay/utils.js +54 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +11 -5
- package/es/components/productCard/components/Packages/components/options/index.js +2 -2
- package/es/components/productCard/components/Packages/index.js +1 -2
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/index.js +15 -13
- package/es/components/productCard/index.d.ts +1 -1
- package/es/components/productCard/index.js +34 -20
- package/es/components/productCard/index.less +3 -2
- package/es/components/productCard/status.d.ts +24 -1
- package/es/components/productCard/status.js +52 -2
- package/es/components/productCard/types.d.ts +60 -1
- package/es/components/productCard/utils.d.ts +10 -144
- package/es/components/productCard/utils.js +36 -673
- package/es/components/table/Table/utils.d.ts +1 -1
- package/lib/components/collapse/index.js +30 -4
- package/lib/components/productCard/components/Action/index.js +1 -1
- package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -1
- package/lib/components/productCard/components/AmountFooter/index.js +33 -9
- package/lib/components/productCard/components/AmountFooter/index.less +11 -0
- package/lib/components/productCard/components/Header/index.js +16 -8
- package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/lib/components/productCard/components/MultiDay/index.js +72 -0
- package/lib/components/productCard/components/MultiDay/index.less +34 -0
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/MultiDay/utils.js +77 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
- package/lib/components/productCard/components/Packages/components/options/index.js +2 -2
- package/lib/components/productCard/components/Packages/index.js +1 -1
- package/lib/components/productCard/components/Sales/index.js +1 -2
- package/lib/components/productCard/components/Time/index.js +14 -11
- package/lib/components/productCard/index.d.ts +1 -1
- package/lib/components/productCard/index.js +32 -20
- package/lib/components/productCard/index.less +3 -2
- package/lib/components/productCard/status.d.ts +24 -1
- package/lib/components/productCard/status.js +35 -2
- package/lib/components/productCard/types.d.ts +60 -1
- package/lib/components/productCard/utils.d.ts +10 -144
- package/lib/components/productCard/utils.js +30 -567
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/es/components/table/Actions/component/ExportImport/utils/index.js +0 -11
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +0 -31
|
@@ -18,25 +18,28 @@ import Time from "./components/Time";
|
|
|
18
18
|
import Packages from "./components/Packages";
|
|
19
19
|
import Sales from "./components/Sales";
|
|
20
20
|
import AmountFooter from "./components/AmountFooter";
|
|
21
|
+
import Items from "./components/MultiDay";
|
|
21
22
|
import Note from "./components/Note";
|
|
22
23
|
import Action from "./components/Action";
|
|
23
24
|
import UseOpenNote from "./hooks/useOpenNote";
|
|
24
25
|
import localeTexts from "./locales";
|
|
26
|
+
import { defaultValue } from "./status";
|
|
25
27
|
import "./index.less";
|
|
26
28
|
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
27
29
|
var ProductCard = function ProductCard(props) {
|
|
28
|
-
var
|
|
29
|
-
var dataSource = props.dataSource,
|
|
30
|
+
var _classNames, _dataSource$items;
|
|
31
|
+
var _props$dataSource = props.dataSource,
|
|
32
|
+
dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
|
|
30
33
|
_props$isShowImage = props.isShowImage,
|
|
31
|
-
isShowImage = _props$isShowImage === void 0 ?
|
|
34
|
+
isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
|
|
32
35
|
_props$isShowHolder = props.isShowHolder,
|
|
33
|
-
isShowHolder = _props$isShowHolder === void 0 ?
|
|
36
|
+
isShowHolder = _props$isShowHolder === void 0 ? defaultValue.isShowHolder : _props$isShowHolder,
|
|
34
37
|
_props$isShowNote = props.isShowNote,
|
|
35
|
-
isShowNote = _props$isShowNote === void 0 ?
|
|
38
|
+
isShowNote = _props$isShowNote === void 0 ? defaultValue.isShowNote : _props$isShowNote,
|
|
36
39
|
_props$isShowDelete = props.isShowDelete,
|
|
37
|
-
isShowDelete = _props$isShowDelete === void 0 ?
|
|
40
|
+
isShowDelete = _props$isShowDelete === void 0 ? defaultValue.isShowDelete : _props$isShowDelete,
|
|
38
41
|
_props$isShowPackageN = props.isShowPackageNote,
|
|
39
|
-
isShowPackageNote = _props$isShowPackageN === void 0 ?
|
|
42
|
+
isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
|
|
40
43
|
_onAction = props.onAction,
|
|
41
44
|
_onDelete = props.onDelete,
|
|
42
45
|
onNote = props.onNote,
|
|
@@ -44,6 +47,15 @@ var ProductCard = function ProductCard(props) {
|
|
|
44
47
|
onCard = props.onCard,
|
|
45
48
|
other = _objectWithoutProperties(props, _excluded);
|
|
46
49
|
var useOpenNoteRef = useRef();
|
|
50
|
+
console.log(dataSource, isShowImage, isShowNote, 'dataSource');
|
|
51
|
+
var image = dataSource.image,
|
|
52
|
+
bundle = dataSource.bundle,
|
|
53
|
+
relation_products = dataSource.relation_products,
|
|
54
|
+
_id = dataSource._id,
|
|
55
|
+
isShowAction = dataSource.isShowAction,
|
|
56
|
+
actionText = dataSource.actionText,
|
|
57
|
+
errorMessage = dataSource.errorMessage,
|
|
58
|
+
isNormalProduct = dataSource.isNormalProduct;
|
|
47
59
|
|
|
48
60
|
/**
|
|
49
61
|
* @title: 显示图片
|
|
@@ -54,8 +66,8 @@ var ProductCard = function ProductCard(props) {
|
|
|
54
66
|
* @Date: 2024-11-21 19:33
|
|
55
67
|
*/
|
|
56
68
|
var showImage = useMemo(function () {
|
|
57
|
-
return isShowImage &&
|
|
58
|
-
}, [isShowImage,
|
|
69
|
+
return isShowImage && image;
|
|
70
|
+
}, [isShowImage, image]);
|
|
59
71
|
|
|
60
72
|
/**
|
|
61
73
|
* @title: 是否隐藏footer分割线
|
|
@@ -66,12 +78,11 @@ var ProductCard = function ProductCard(props) {
|
|
|
66
78
|
* @Date: 2024-11-23 13:30
|
|
67
79
|
*/
|
|
68
80
|
var hideDivider = useMemo(function () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.bundle, dataSource === null || dataSource === void 0 ? void 0 : dataSource.relation_details]);
|
|
81
|
+
return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
|
|
82
|
+
}, [bundle, relation_products]);
|
|
72
83
|
return /*#__PURE__*/React.createElement(CardPro, {
|
|
73
|
-
className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage &&
|
|
74
|
-
key:
|
|
84
|
+
className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct), _classNames)),
|
|
85
|
+
key: _id
|
|
75
86
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
76
87
|
onClick: function onClick(e) {
|
|
77
88
|
e.preventDefault();
|
|
@@ -86,19 +97,22 @@ var ProductCard = function ProductCard(props) {
|
|
|
86
97
|
onDelete: function onDelete() {
|
|
87
98
|
_onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
|
|
88
99
|
}
|
|
89
|
-
})),
|
|
100
|
+
})), /*#__PURE__*/React.createElement(Time, {
|
|
90
101
|
item: dataSource,
|
|
91
102
|
isShowHolder: isShowHolder,
|
|
92
103
|
onLike: function onLike(item) {
|
|
93
104
|
return _onLike === null || _onLike === void 0 ? void 0 : _onLike(item);
|
|
94
105
|
}
|
|
95
|
-
})
|
|
106
|
+
}), /*#__PURE__*/React.createElement(Packages, {
|
|
96
107
|
item: dataSource,
|
|
97
108
|
isShowPackageNote: isShowPackageNote
|
|
98
109
|
}), /*#__PURE__*/React.createElement(Sales, {
|
|
99
110
|
item: dataSource,
|
|
100
111
|
isShowNote: isShowNote
|
|
101
|
-
}), /*#__PURE__*/React.createElement(
|
|
112
|
+
}), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
|
|
113
|
+
dataSource: dataSource,
|
|
114
|
+
hideDivider: hideDivider
|
|
115
|
+
}) : /*#__PURE__*/React.createElement(AmountFooter, {
|
|
102
116
|
item: dataSource,
|
|
103
117
|
hideDivider: hideDivider,
|
|
104
118
|
type: "total"
|
|
@@ -109,13 +123,13 @@ var ProductCard = function ProductCard(props) {
|
|
|
109
123
|
item: dataSource
|
|
110
124
|
});
|
|
111
125
|
}
|
|
112
|
-
})) : null,
|
|
126
|
+
})) : null, isShowAction && actionText ? /*#__PURE__*/React.createElement(Action, {
|
|
113
127
|
item: dataSource,
|
|
114
128
|
onAction: function onAction() {
|
|
115
129
|
return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
|
|
116
130
|
}
|
|
117
|
-
}) : null,
|
|
118
|
-
message:
|
|
131
|
+
}) : null, errorMessage ? /*#__PURE__*/React.createElement(Alert, {
|
|
132
|
+
message: errorMessage,
|
|
119
133
|
type: "warning",
|
|
120
134
|
showIcon: true,
|
|
121
135
|
className: "pisell-lowcode-product-card-error"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.pisell-lowcode-product-card {
|
|
2
2
|
overflow: hidden;
|
|
3
3
|
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
4
|
+
|
|
4
5
|
&:hover,
|
|
5
6
|
&:active {
|
|
6
7
|
border: 1px solid var(--Gray-400, #98a2b3);
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
width: 6px;
|
|
37
38
|
height: 100%;
|
|
38
39
|
background: var(--Blue-400, #53b1fd);
|
|
39
|
-
z-index:
|
|
40
|
+
z-index: 0 !important;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -50,4 +51,4 @@
|
|
|
50
51
|
border: none !important;
|
|
51
52
|
margin: 8px -16px -8px;
|
|
52
53
|
border-radius: 0 0 8px 8px;
|
|
53
|
-
}
|
|
54
|
+
}
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
import { ProductCardTypes } from './types';
|
|
1
|
+
import { ProductCardTypes, bundleType, optionType, productType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @title: 套餐数据
|
|
4
|
+
* @description:
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2025-01-02 23:21
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultBundle: bundleType;
|
|
10
|
+
/**
|
|
11
|
+
* @description: 单规格
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @Author: WangHan
|
|
14
|
+
* @Date: 2025-01-02 23:00
|
|
15
|
+
*/
|
|
16
|
+
export declare const defaultOption: optionType;
|
|
17
|
+
/**
|
|
18
|
+
* @title: 商品商品类型
|
|
19
|
+
* @description:
|
|
20
|
+
* @return {*}
|
|
21
|
+
* @Author: WangHan
|
|
22
|
+
* @Date: 2025-01-02 22:48
|
|
23
|
+
*/
|
|
24
|
+
export declare const defaultProduct: productType;
|
|
2
25
|
/**
|
|
3
26
|
* @title: 默认数据
|
|
4
27
|
* @description:
|
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 套餐数据
|
|
3
|
+
* @description:
|
|
4
|
+
* @return {*}
|
|
5
|
+
* @Author: WangHan
|
|
6
|
+
* @Date: 2025-01-02 23:21
|
|
7
|
+
*/
|
|
8
|
+
export var defaultBundle = {
|
|
9
|
+
id: 0,
|
|
10
|
+
name: '',
|
|
11
|
+
num: 1,
|
|
12
|
+
price: 0,
|
|
13
|
+
total: 0
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @description: 单规格
|
|
18
|
+
* @return {*}
|
|
19
|
+
* @Author: WangHan
|
|
20
|
+
* @Date: 2025-01-02 23:00
|
|
21
|
+
*/
|
|
22
|
+
export var defaultOption = {
|
|
23
|
+
id: 0,
|
|
24
|
+
name: '',
|
|
25
|
+
num: 1,
|
|
26
|
+
price: 0,
|
|
27
|
+
total: 0
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @title: 商品商品类型
|
|
32
|
+
* @description:
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: WangHan
|
|
35
|
+
* @Date: 2025-01-02 22:48
|
|
36
|
+
*/
|
|
37
|
+
export var defaultProduct = {
|
|
38
|
+
id: 0,
|
|
39
|
+
_id: 0,
|
|
40
|
+
name: '',
|
|
41
|
+
price: 0,
|
|
42
|
+
total: 0,
|
|
43
|
+
num: 1,
|
|
44
|
+
image: '',
|
|
45
|
+
isShowNote: true,
|
|
46
|
+
note: ''
|
|
47
|
+
};
|
|
48
|
+
|
|
1
49
|
/**
|
|
2
50
|
* @title: 默认数据
|
|
3
51
|
* @description:
|
|
@@ -6,10 +54,12 @@
|
|
|
6
54
|
* @Date: 2024-12-12 16:49
|
|
7
55
|
*/
|
|
8
56
|
export var defaultValue = {
|
|
9
|
-
dataSource:
|
|
57
|
+
dataSource: defaultProduct,
|
|
10
58
|
isShowImage: true,
|
|
11
59
|
isShowHolder: true,
|
|
12
60
|
isShowNote: true,
|
|
13
61
|
isShowDelete: true,
|
|
14
|
-
isShowPackageNote: true
|
|
62
|
+
isShowPackageNote: true,
|
|
63
|
+
locale: 'en-US',
|
|
64
|
+
symbol: '$'
|
|
15
65
|
};
|
|
@@ -1,14 +1,73 @@
|
|
|
1
|
+
export declare type bundleType = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
num: number;
|
|
5
|
+
price: number;
|
|
6
|
+
total: number;
|
|
7
|
+
origin_total?: number;
|
|
8
|
+
price_type?: string;
|
|
9
|
+
options?: optionType[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description:
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: WangHan
|
|
15
|
+
* @Date: 2025-01-02 23:00
|
|
16
|
+
*/
|
|
17
|
+
export declare type optionType = {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
num: number;
|
|
21
|
+
price: number;
|
|
22
|
+
total: number;
|
|
23
|
+
origin_total?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @title: 商品商品类型
|
|
27
|
+
* @description:
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2025-01-02 22:48
|
|
31
|
+
*/
|
|
32
|
+
export declare type productType = {
|
|
33
|
+
_id: string | number;
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
price: number;
|
|
37
|
+
total: number;
|
|
38
|
+
num: number;
|
|
39
|
+
origin_total?: number;
|
|
40
|
+
image?: string;
|
|
41
|
+
isShowNote?: boolean;
|
|
42
|
+
note?: string;
|
|
43
|
+
like_status?: string;
|
|
44
|
+
bundle?: bundleType[];
|
|
45
|
+
options?: optionType[];
|
|
46
|
+
isShowAction?: boolean;
|
|
47
|
+
actionText?: string;
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
product_option_string?: string;
|
|
50
|
+
discount_reason?: string;
|
|
51
|
+
relation_products?: any[];
|
|
52
|
+
resource_id?: string | number;
|
|
53
|
+
relation_form_name?: string;
|
|
54
|
+
holder_title?: string;
|
|
55
|
+
start_date?: string;
|
|
56
|
+
end_date?: string;
|
|
57
|
+
};
|
|
1
58
|
/**
|
|
2
59
|
* 排序总配置
|
|
3
60
|
*/
|
|
4
61
|
export declare type ProductCardTypes = {
|
|
5
|
-
dataSource:
|
|
62
|
+
dataSource: productType;
|
|
6
63
|
isShowImage?: boolean;
|
|
7
64
|
isShowHolder?: boolean;
|
|
8
65
|
isShowNote?: boolean;
|
|
9
66
|
isShowPackageNote?: boolean;
|
|
10
67
|
isShowDelete?: boolean;
|
|
11
68
|
disabledEdit?: boolean;
|
|
69
|
+
locale?: string;
|
|
70
|
+
symbol?: string;
|
|
12
71
|
onAction?: (val: any) => void;
|
|
13
72
|
onDelete?: (val: any) => void;
|
|
14
73
|
onNote?: (val: any) => void;
|
|
@@ -1,60 +1,24 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
1
|
import 'dayjs/locale/zh-cn';
|
|
3
2
|
import 'dayjs/locale/en';
|
|
4
3
|
import 'dayjs/locale/zh-tw';
|
|
5
|
-
declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
|
|
6
|
-
declare class Request {
|
|
7
|
-
private request;
|
|
8
|
-
constructor();
|
|
9
|
-
setRequest(val: any): void;
|
|
10
|
-
getRequest(): {
|
|
11
|
-
get: RType;
|
|
12
|
-
post: RType;
|
|
13
|
-
put: RType;
|
|
14
|
-
remove: RType;
|
|
15
|
-
custom: RType;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare const request: Request;
|
|
19
4
|
/**
|
|
20
|
-
* @title:
|
|
5
|
+
* @title: 是否英文
|
|
21
6
|
* @description:
|
|
22
|
-
* @param {
|
|
7
|
+
* @param {any} item
|
|
23
8
|
* @return {*}
|
|
24
|
-
* @Author:
|
|
25
|
-
* @Date: 2024-
|
|
9
|
+
* @Author: WangHan
|
|
10
|
+
* @Date: 2024-12-28 22:49
|
|
26
11
|
*/
|
|
27
|
-
export declare const
|
|
12
|
+
export declare const isEn: (item: any) => boolean;
|
|
28
13
|
/**
|
|
29
|
-
* @title:
|
|
14
|
+
* @title: 跨日预约时间
|
|
30
15
|
* @description:
|
|
31
|
-
* @param {any}
|
|
32
|
-
* @param {string} locale
|
|
33
|
-
* @return {*}
|
|
34
|
-
* @Author: zhiwei.Wang
|
|
35
|
-
* @Date: 2024-04-26 13:59
|
|
36
|
-
*/
|
|
37
|
-
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
|
|
38
|
-
timeSlices: {
|
|
39
|
-
label: string;
|
|
40
|
-
value: string;
|
|
41
|
-
}[];
|
|
42
|
-
durationSlicesBasedOnTime: {
|
|
43
|
-
label: string;
|
|
44
|
-
value: number;
|
|
45
|
-
}[];
|
|
46
|
-
};
|
|
47
|
-
export declare const getNowTime: () => string;
|
|
48
|
-
export declare const isNowTime: (time: string) => boolean;
|
|
49
|
-
/**
|
|
50
|
-
* @title: 获取服务的开始时间, 如果是now 转换为当前的时间
|
|
51
|
-
* @description:
|
|
52
|
-
* @param {string} start_time
|
|
16
|
+
* @param {any} item
|
|
53
17
|
* @return {*}
|
|
54
|
-
* @Author:
|
|
55
|
-
* @Date: 2024-
|
|
18
|
+
* @Author: WangHan
|
|
19
|
+
* @Date: 2024-12-28 22:50
|
|
56
20
|
*/
|
|
57
|
-
export declare const
|
|
21
|
+
export declare const formatMultiDayDate: (item: any) => string;
|
|
58
22
|
/**
|
|
59
23
|
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
60
24
|
* @description:
|
|
@@ -65,101 +29,3 @@ export declare const getServeStartTime: (start_time: string) => string;
|
|
|
65
29
|
* @Date: 2024-04-26 14:04
|
|
66
30
|
*/
|
|
67
31
|
export declare const getServiceTime: (item: any, currentDate: any) => string;
|
|
68
|
-
export declare const findNextSlice: ({ timeSlices, index, date, }: {
|
|
69
|
-
timeSlices: any[];
|
|
70
|
-
index?: number | undefined;
|
|
71
|
-
date?: string | undefined;
|
|
72
|
-
}) => any;
|
|
73
|
-
export declare const findNextDuration: (current: any, array: any, defaultValue?: any) => any;
|
|
74
|
-
export declare const formatProductListByCategory: (list: any, filterItem: any) => unknown[];
|
|
75
|
-
export declare const getResourceTimeIsUsable: (item: any, cacheItem: any) => any;
|
|
76
|
-
/**
|
|
77
|
-
* @title: 查找是否有可用的time
|
|
78
|
-
* @description:
|
|
79
|
-
* @param {any} resourceItem
|
|
80
|
-
* @return {*}
|
|
81
|
-
* @Author: zhiwei.Wang
|
|
82
|
-
* @Date: 2024-01-09 13:57
|
|
83
|
-
*/
|
|
84
|
-
export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
|
|
85
|
-
/**
|
|
86
|
-
* @title: 获取店铺的营业结束时间
|
|
87
|
-
* @description:
|
|
88
|
-
* @return {*}
|
|
89
|
-
* @Author: zhiwei.Wang
|
|
90
|
-
* @Date: 2024-02-23 10:00
|
|
91
|
-
*/
|
|
92
|
-
export declare const getShopOpeningHours: () => string;
|
|
93
|
-
/**
|
|
94
|
-
* @title: 对灵活时长进行处理
|
|
95
|
-
* @description:
|
|
96
|
-
* @return {*}
|
|
97
|
-
* @Author: zhiwei.Wang
|
|
98
|
-
* @Date: 2024-02-23 10:00
|
|
99
|
-
*/
|
|
100
|
-
export declare const flexibleObj: {
|
|
101
|
-
create: (num: number) => any;
|
|
102
|
-
getValue: (str: string | number) => number;
|
|
103
|
-
isFlexible: (str: string | number) => boolean;
|
|
104
|
-
add: (current: number | string, duration: number) => any;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* @title: 获取结束时间
|
|
108
|
-
* @description: 取 endDate | 店铺营业时间 最小的那一个
|
|
109
|
-
* @param {any} startDate
|
|
110
|
-
* @param {string} duration
|
|
111
|
-
* @param {any} endDate
|
|
112
|
-
* @return {*}
|
|
113
|
-
* @Author: zhiwei.Wang
|
|
114
|
-
* @Date: 2024-02-23 10:01
|
|
115
|
-
*/
|
|
116
|
-
export declare const getEndDate: (startDate: any, duration: string | number, endDate: any) => any;
|
|
117
|
-
export declare const getServiceTimes: (service: any) => {
|
|
118
|
-
startDate: dayjs.Dayjs;
|
|
119
|
-
endDate: dayjs.Dayjs;
|
|
120
|
-
};
|
|
121
|
-
export declare const getErrorList: (resource: any, cacheItem: any) => {
|
|
122
|
-
label: any;
|
|
123
|
-
type: string;
|
|
124
|
-
}[];
|
|
125
|
-
/**
|
|
126
|
-
* @title: 格式化资源, 添加自定义参数
|
|
127
|
-
* @description:
|
|
128
|
-
* @param {any} resourceItem
|
|
129
|
-
* @return {*}
|
|
130
|
-
* @Author: zhiwei.Wang
|
|
131
|
-
* @Date: 2024-01-09 13:40
|
|
132
|
-
*/
|
|
133
|
-
export declare const formatResource: (resourceItem: any, cacheItem?: any, formatLabel?: any) => any;
|
|
134
|
-
export declare const getLastServer: (list: any) => any;
|
|
135
|
-
export declare const getCacheParams: () => any;
|
|
136
|
-
export declare const deleteCacheParams: () => void;
|
|
137
|
-
/**
|
|
138
|
-
* @title: 创建一个服务商品
|
|
139
|
-
* @description:
|
|
140
|
-
* @param {any} state
|
|
141
|
-
* @param {any} item
|
|
142
|
-
* @return {*}
|
|
143
|
-
* @Author: zhiwei.Wang
|
|
144
|
-
* @Date: 2024-01-26 14:09
|
|
145
|
-
*/
|
|
146
|
-
export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
|
|
147
|
-
export declare const getProductTotalPrice: (item: any) => number;
|
|
148
|
-
/**
|
|
149
|
-
* @title: 判断 duration
|
|
150
|
-
* @description: 用于处理不同格式的duration
|
|
151
|
-
* @param {number} duration
|
|
152
|
-
* @return {*}
|
|
153
|
-
* @Author: zhiwei.Wang
|
|
154
|
-
* @Date: 2024-02-23 10:02
|
|
155
|
-
*/
|
|
156
|
-
export declare const getDuration: (duration: number | {
|
|
157
|
-
type: string;
|
|
158
|
-
value: number;
|
|
159
|
-
}) => number | {
|
|
160
|
-
type: string;
|
|
161
|
-
value: number;
|
|
162
|
-
} | "flexible";
|
|
163
|
-
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
164
|
-
export declare const getIsEdit: (state: any) => boolean;
|
|
165
|
-
export {};
|