@pisell/private-materials 3.0.120 → 3.0.121

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.
Files changed (54) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/booking/locales.d.ts +21 -0
  12. package/es/components/booking/locales.js +24 -0
  13. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +12 -0
  14. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +40 -0
  15. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.less +38 -0
  16. package/es/components/schedules/components/ScheduleList/index.d.ts +5 -4
  17. package/es/components/schedules/components/ScheduleList/index.js +53 -43
  18. package/es/components/schedules/hooks/useSchedulesDataSource.js +5 -3
  19. package/es/components/schedules/products/list/index.d.ts +2 -2
  20. package/es/components/schedules/products/list/index.js +8 -8
  21. package/es/components/schedules/schedules/AllSchedules/index.d.ts +3 -3
  22. package/es/components/schedules/schedules/AllSchedules/index.js +9 -6
  23. package/es/components/schedules/schedules/AllSchedules/index.less +11 -3
  24. package/es/components/schedules/schedules/serve.d.ts +7 -0
  25. package/es/components/schedules/schedules/serve.js +24 -3
  26. package/es/components/schedules/schedules/utils.d.ts +22 -0
  27. package/es/components/schedules/schedules/utils.js +143 -1
  28. package/es/components/schedules/type.d.ts +7 -0
  29. package/es/components/tabProduct/index.d.ts +3 -2
  30. package/es/components/tabProduct/index.js +27 -18
  31. package/es/components/tabProduct/tabs/index.d.ts +3 -3
  32. package/es/components/tabProduct/tabs/index.js +34 -21
  33. package/lib/components/booking/locales.d.ts +21 -0
  34. package/lib/components/booking/locales.js +24 -0
  35. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +12 -0
  36. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +77 -0
  37. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.less +38 -0
  38. package/lib/components/schedules/components/ScheduleList/index.d.ts +5 -4
  39. package/lib/components/schedules/components/ScheduleList/index.js +38 -31
  40. package/lib/components/schedules/hooks/useSchedulesDataSource.js +8 -2
  41. package/lib/components/schedules/products/list/index.d.ts +2 -2
  42. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +3 -3
  43. package/lib/components/schedules/schedules/AllSchedules/index.js +3 -2
  44. package/lib/components/schedules/schedules/AllSchedules/index.less +11 -3
  45. package/lib/components/schedules/schedules/serve.d.ts +7 -0
  46. package/lib/components/schedules/schedules/serve.js +5 -2
  47. package/lib/components/schedules/schedules/utils.d.ts +22 -0
  48. package/lib/components/schedules/schedules/utils.js +98 -0
  49. package/lib/components/schedules/type.d.ts +7 -0
  50. package/lib/components/tabProduct/index.d.ts +3 -2
  51. package/lib/components/tabProduct/index.js +15 -6
  52. package/lib/components/tabProduct/tabs/index.d.ts +3 -3
  53. package/lib/components/tabProduct/tabs/index.js +10 -6
  54. package/package.json +2 -2
@@ -163,6 +163,13 @@ declare const _default: {
163
163
  'pisell2.text.terminal-edit-message': string;
164
164
  "pisell2.text.actions": string;
165
165
  "pisell2.text.add-client": string;
166
+ "pisell2.schedule.tab.all": string;
167
+ "pisell2.schedule.tab.surcharge": string;
168
+ "pisell2.schedule.tab.resources": string;
169
+ "pisell2.schedule.tab.products": string;
170
+ "pisell2.schedule.tab.events": string;
171
+ "pisell2.schedule.tab.quotation": string;
172
+ "pisell2.schedule.tab.open-hours": string;
166
173
  'pisell2.text.variant-client-change': string;
167
174
  'pisell2.text.variant-client-no-data': string;
168
175
  'page.event.booking.text.duplicate-enrollment': string;
@@ -351,6 +358,13 @@ declare const _default: {
351
358
  'page.booking.text.unlimited': string;
352
359
  "pisell2.text.actions": string;
353
360
  "pisell2.text.add-client": string;
361
+ "pisell2.schedule.tab.all": string;
362
+ "pisell2.schedule.tab.surcharge": string;
363
+ "pisell2.schedule.tab.resources": string;
364
+ "pisell2.schedule.tab.products": string;
365
+ "pisell2.schedule.tab.events": string;
366
+ "pisell2.schedule.tab.quotation": string;
367
+ "pisell2.schedule.tab.open-hours": string;
354
368
  'pisell2.text.variant-client-change': string;
355
369
  'pisell2.text.variant-client-no-data': string;
356
370
  'page.event.booking.text.duplicate-enrollment': string;
@@ -539,6 +553,13 @@ declare const _default: {
539
553
  'page.booking.text.unlimited': string;
540
554
  "pisell2.text.actions": string;
541
555
  "pisell2.text.add-client": string;
556
+ "pisell2.schedule.tab.all": string;
557
+ "pisell2.schedule.tab.surcharge": string;
558
+ "pisell2.schedule.tab.resources": string;
559
+ "pisell2.schedule.tab.products": string;
560
+ "pisell2.schedule.tab.events": string;
561
+ "pisell2.schedule.tab.quotation": string;
562
+ "pisell2.schedule.tab.open-hours": string;
542
563
  'pisell2.text.variant-client-change': string;
543
564
  'pisell2.text.variant-client-no-data': string;
544
565
  'page.event.booking.text.duplicate-enrollment': string;
@@ -179,6 +179,14 @@ export default {
179
179
  'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the Pisell Terminal.",
180
180
  "pisell2.text.actions": "Actions",
181
181
  "pisell2.text.add-client": "Add customer",
182
+ // 日称tab
183
+ "pisell2.schedule.tab.all": "All",
184
+ "pisell2.schedule.tab.surcharge": "Surcharge",
185
+ "pisell2.schedule.tab.resources": "Resources",
186
+ "pisell2.schedule.tab.products": "Products",
187
+ "pisell2.schedule.tab.events": "Events",
188
+ "pisell2.schedule.tab.quotation": "Quotation",
189
+ "pisell2.schedule.tab.open-hours": "Open hours",
182
190
  'pisell2.text.variant-client-change': 'Change',
183
191
  'pisell2.text.variant-client-no-data': "No record",
184
192
  'page.event.booking.text.duplicate-enrollment': "Duplicate Enrollment",
@@ -399,6 +407,14 @@ export default {
399
407
  'page.booking.text.unlimited': '无限制',
400
408
  "pisell2.text.actions": "操作选项",
401
409
  "pisell2.text.add-client": "添加客户",
410
+ // 日称tab
411
+ "pisell2.schedule.tab.all": "全部",
412
+ "pisell2.schedule.tab.surcharge": "附加费",
413
+ "pisell2.schedule.tab.resources": "资源",
414
+ "pisell2.schedule.tab.products": "商品",
415
+ "pisell2.schedule.tab.events": "活动",
416
+ "pisell2.schedule.tab.quotation": "报价单",
417
+ "pisell2.schedule.tab.open-hours": "营业时间",
402
418
  'pisell2.text.variant-client-change': '更改客户',
403
419
  'pisell2.text.variant-client-no-data': "暂无数据",
404
420
  'page.event.booking.text.duplicate-enrollment': "重复报名",
@@ -619,6 +635,14 @@ export default {
619
635
  'page.booking.text.unlimited': '無限制',
620
636
  "pisell2.text.actions": "操作選項",
621
637
  "pisell2.text.add-client": "添加客戶",
638
+ // 日称tab
639
+ "pisell2.schedule.tab.all": "全部",
640
+ "pisell2.schedule.tab.surcharge": "附加費",
641
+ "pisell2.schedule.tab.resources": "資源",
642
+ "pisell2.schedule.tab.products": "商品",
643
+ "pisell2.schedule.tab.events": "活動",
644
+ "pisell2.schedule.tab.quotation": "報價單",
645
+ "pisell2.schedule.tab.open-hours": "營業時間",
622
646
  'pisell2.text.variant-client-change': '更改客戶',
623
647
  'pisell2.text.variant-client-no-data': "暫無數據",
624
648
  'page.event.booking.text.duplicate-enrollment': "重複報名",
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { ScheduleItem } from '../../../type';
4
+ declare type Item = any;
5
+ interface RenderScheduleItemProps {
6
+ item?: Item;
7
+ onItemClick?: (item: ScheduleItem) => void;
8
+ onDelete?: (item: ScheduleItem) => void;
9
+ showDeleteIcon?: boolean;
10
+ }
11
+ declare const RenderScheduleItem: ({ item, onItemClick, onDelete, showDeleteIcon, }: RenderScheduleItemProps) => React.JSX.Element;
12
+ export default RenderScheduleItem;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import AlertCircle from '@pisell/icon/es/AlertCircle';
3
+ import { Tooltip } from 'antd';
4
+ import useEngineContext from "../../../../../hooks/useEngineContext";
5
+ import "./index.less";
6
+ import XClose from '@pisell/icon/es/XClose';
7
+ var RenderScheduleItem = function RenderScheduleItem(_ref) {
8
+ var _appHelper$utils;
9
+ var item = _ref.item,
10
+ onItemClick = _ref.onItemClick,
11
+ onDelete = _ref.onDelete,
12
+ showDeleteIcon = _ref.showDeleteIcon;
13
+ var _useEngineContext = useEngineContext(),
14
+ appHelper = _useEngineContext.appHelper;
15
+ return /*#__PURE__*/React.createElement("div", {
16
+ key: item.id,
17
+ className: "pisell-lowcode__schedule-list-item",
18
+ onClick: function onClick() {
19
+ return onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item);
20
+ }
21
+ }, /*#__PURE__*/React.createElement("div", {
22
+ className: "pisell-lowcode__schedule-list-item-color",
23
+ style: {
24
+ backgroundColor: item.color
25
+ }
26
+ }), /*#__PURE__*/React.createElement("div", {
27
+ className: "pisell-lowcode__schedule-list-item-content"
28
+ }, appHelper === null || appHelper === void 0 ? void 0 : (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.translationShop(item.name)), item.conflict && /*#__PURE__*/React.createElement(Tooltip, {
29
+ title: "Days conflict with another schedule"
30
+ }, /*#__PURE__*/React.createElement(AlertCircle, {
31
+ className: "pisell-lowcode__schedule-list-item-conflict"
32
+ })), showDeleteIcon && /*#__PURE__*/React.createElement(XClose, {
33
+ className: "pisell-lowcode__schedule-list-item-delete",
34
+ onClick: function onClick(e) {
35
+ e.stopPropagation();
36
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete(item);
37
+ }
38
+ }));
39
+ };
40
+ export default RenderScheduleItem;
@@ -0,0 +1,38 @@
1
+ .pisell-lowcode__schedule-list {
2
+ &-item {
3
+ display: flex;
4
+ align-items: center;
5
+ padding: 10px 16px;
6
+ border-radius: 8px;
7
+ border: 1px solid var(--Gray-true-100, #F5F5F5);
8
+ margin-bottom: 16px;
9
+ cursor: pointer;
10
+
11
+ &-color {
12
+ width: 12px;
13
+ height: 12px;
14
+ margin: 8px;
15
+ border-radius: 50%;
16
+ }
17
+
18
+ &-content {
19
+ color: var(--Gray-true-900, #141414);
20
+ font-size: 14px;
21
+ font-style: normal;
22
+ font-weight: 600;
23
+ line-height: 20px;
24
+ flex: 1;
25
+ }
26
+
27
+ &-conflict {
28
+ color: #D92D20;
29
+ font-size: 16px;
30
+ }
31
+
32
+ &-delete {
33
+ margin-left: 8px;
34
+ font-size: 16px;
35
+ color: #141414;
36
+ }
37
+ }
38
+ }
@@ -1,7 +1,7 @@
1
- import React from "react";
2
- import { ButtonProps } from "antd";
3
- import { ScheduleItem } from "../../type";
4
- import "./index.less";
1
+ import React from 'react';
2
+ import { ButtonProps } from 'antd';
3
+ import { ScheduleItem } from '../../type';
4
+ import './index.less';
5
5
  declare type ScheduleListType = {
6
6
  dataSource: ScheduleItem[];
7
7
  onItemClick?: (item: ScheduleItem) => void;
@@ -10,6 +10,7 @@ declare type ScheduleListType = {
10
10
  loading?: boolean;
11
11
  className?: string;
12
12
  addButtonProps?: ButtonProps;
13
+ showTabs?: boolean;
13
14
  };
14
15
  /**
15
16
  * 日程列表 展示日程简略信息
@@ -1,12 +1,10 @@
1
- import React, { useMemo } from "react";
2
- import classNames from "classnames";
3
- import { Tooltip, Skeleton, Button, Empty } from "antd";
4
- // @ts-ignore
5
- import AlertCircle from "@pisell/icon/es/AlertCircle";
6
- // @ts-ignore
7
- import XClose from "@pisell/icon/es/XClose";
8
- import { locales } from "@pisell/utils";
9
- import useEngineContext from "../../../../hooks/useEngineContext";
1
+ import React, { useMemo } from 'react';
2
+ import classNames from 'classnames';
3
+ import { Skeleton, Button, Empty } from 'antd';
4
+ import TabProduct from "../../../tabProduct";
5
+ import { locales } from '@pisell/utils';
6
+ import { formatScheduleListByTabs } from "../../schedules/utils";
7
+ import RenderScheduleItem from "./RenderScheduleItem";
10
8
  import "./index.less";
11
9
  /**
12
10
  * 日程列表 展示日程简略信息
@@ -15,51 +13,63 @@ import "./index.less";
15
13
  */
16
14
  var ScheduleList = function ScheduleList(props) {
17
15
  var dataSource = props.dataSource,
18
- onItemClick = props.onItemClick,
16
+ _onItemClick = props.onItemClick,
19
17
  showDeleteIcon = props.showDeleteIcon,
20
- onDelete = props.onDelete,
18
+ _onDelete = props.onDelete,
21
19
  loading = props.loading,
22
20
  className = props.className,
23
- addButtonProps = props.addButtonProps;
24
- var _useEngineContext = useEngineContext(),
25
- appHelper = _useEngineContext.appHelper;
21
+ addButtonProps = props.addButtonProps,
22
+ showTabs = props.showTabs;
23
+
24
+ // 过滤和格式化日程数据
25
+ var renderList = useMemo(function () {
26
+ return formatScheduleListByTabs(dataSource);
27
+ }, [dataSource]);
26
28
  var content = useMemo(function () {
27
29
  if (dataSource.length === 0) {
28
30
  return /*#__PURE__*/React.createElement(Empty, {
29
31
  image: Empty.PRESENTED_IMAGE_SIMPLE,
30
- description: locales.getText("pisell2.text.schedules.no-schedules")
32
+ description: locales.getText('pisell2.text.schedules.no-schedules')
31
33
  });
32
34
  }
33
- return dataSource.map(function (item) {
34
- var _appHelper$utils;
35
- return /*#__PURE__*/React.createElement("div", {
36
- key: item.id,
37
- className: "pisell-lowcode__schedule-list-item",
38
- onClick: function onClick() {
39
- return onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item);
35
+
36
+ // 显示tab
37
+ if (showTabs) {
38
+ return /*#__PURE__*/React.createElement(TabProduct, {
39
+ scrollDom: ".pisell-lowcode__schedules-module-content-wrap",
40
+ list: renderList,
41
+ name: "schedule",
42
+ renderItem: function renderItem(item) {
43
+ return /*#__PURE__*/React.createElement(RenderScheduleItem, {
44
+ item: item,
45
+ key: item.id,
46
+ showDeleteIcon: showDeleteIcon,
47
+ onItemClick: function onItemClick() {
48
+ return _onItemClick === null || _onItemClick === void 0 ? void 0 : _onItemClick(item);
49
+ },
50
+ onDelete: function onDelete() {
51
+ return _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(item);
52
+ }
53
+ });
40
54
  }
41
- }, /*#__PURE__*/React.createElement("div", {
42
- className: "pisell-lowcode__schedule-list-item-color",
43
- style: {
44
- backgroundColor: item.color
45
- }
46
- }), /*#__PURE__*/React.createElement("div", {
47
- className: "pisell-lowcode__schedule-list-item-content"
48
- }, appHelper === null || appHelper === void 0 ? void 0 : (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.translationShop(item.name)), item.conflict && /*#__PURE__*/React.createElement(Tooltip, {
49
- title: "Days conflict with another schedule"
50
- }, /*#__PURE__*/React.createElement(AlertCircle, {
51
- className: "pisell-lowcode__schedule-list-item-conflict"
52
- })), showDeleteIcon && /*#__PURE__*/React.createElement(XClose, {
53
- className: "pisell-lowcode__schedule-list-item-delete",
54
- onClick: function onClick(e) {
55
- e.stopPropagation();
56
- onDelete === null || onDelete === void 0 ? void 0 : onDelete(item);
57
- }
58
- }));
59
- });
60
- }, [dataSource, showDeleteIcon]);
55
+ });
56
+ } else {
57
+ return dataSource.map(function (item) {
58
+ return /*#__PURE__*/React.createElement(RenderScheduleItem, {
59
+ item: item,
60
+ showDeleteIcon: showDeleteIcon,
61
+ onItemClick: function onItemClick() {
62
+ return _onItemClick === null || _onItemClick === void 0 ? void 0 : _onItemClick(item);
63
+ },
64
+ onDelete: function onDelete() {
65
+ return _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(item);
66
+ }
67
+ });
68
+ });
69
+ }
70
+ }, [dataSource, showDeleteIcon, showTabs]);
61
71
  return /*#__PURE__*/React.createElement("div", {
62
- className: classNames("pisell-lowcode__schedule-list", className)
72
+ className: classNames('pisell-lowcode__schedule-list', className)
63
73
  }, /*#__PURE__*/React.createElement(Skeleton, {
64
74
  active: true,
65
75
  round: true,
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { useEffect, useState } from "react";
8
8
  import { useRequest } from "ahooks";
9
- import { getScheduleList } from "../schedules/serve";
9
+ import { postScheduleList } from "../schedules/serve";
10
10
  var useSchedulesDataSource = function useSchedulesDataSource(params) {
11
11
  var _ref = params || {},
12
12
  scheduleIds = _ref.scheduleIds;
@@ -14,7 +14,7 @@ var useSchedulesDataSource = function useSchedulesDataSource(params) {
14
14
  _useState2 = _slicedToArray(_useState, 2),
15
15
  dataSource = _useState2[0],
16
16
  setDataSource = _useState2[1];
17
- var _useRequest = useRequest(getScheduleList, {
17
+ var _useRequest = useRequest(postScheduleList, {
18
18
  manual: true,
19
19
  onSuccess: function onSuccess(result, params) {
20
20
  if (result.status) {
@@ -29,7 +29,9 @@ var useSchedulesDataSource = function useSchedulesDataSource(params) {
29
29
  run({
30
30
  ids: scheduleIds,
31
31
  skip: 1,
32
- num: 1000
32
+ num: 500,
33
+ with: ['relation', 'timeSlot'],
34
+ with_count: ['relation', 'order']
33
35
  });
34
36
  }, [scheduleIds]);
35
37
  return {
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  interface ProductListProps {
4
4
  loading: boolean;
5
5
  list: any[];
@@ -10,20 +10,20 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useState, useMemo, useContext } from "react";
13
+ import React, { useState, useMemo, useContext } from 'react';
14
14
  import TabProduct from "../../../tabProduct";
15
15
  import Search from "../../components/Search";
16
16
  import { formatProductListByCategory } from "../utils";
17
17
  import { Context } from "../../model";
18
18
  import EmptyCom from "../../../booking/components/emptyBooking";
19
19
  import ProductItem from "./ProductItem";
20
- import { Skeleton } from "antd";
20
+ import { Skeleton } from 'antd';
21
21
  import "./index.less";
22
- import { locales } from "@pisell/utils";
22
+ import { locales } from '@pisell/utils';
23
23
  var ProductList = function ProductList(_ref) {
24
24
  var loading = _ref.loading,
25
25
  list = _ref.list;
26
- var _useState = useState(""),
26
+ var _useState = useState(''),
27
27
  _useState2 = _slicedToArray(_useState, 2),
28
28
  search = _useState2[0],
29
29
  setSearch = _useState2[1];
@@ -49,7 +49,7 @@ var ProductList = function ProductList(_ref) {
49
49
  return isIncludes(item.title);
50
50
  } : undefined);
51
51
  }, [search, list, currentSelectDayDetail]);
52
- console.log("state.scheduleMap", renderList);
52
+ console.log('state.scheduleMap', renderList);
53
53
  var searchChange = function searchChange(e) {
54
54
  setSearch(e);
55
55
  };
@@ -62,7 +62,7 @@ var ProductList = function ProductList(_ref) {
62
62
  };
63
63
  if (currentSelectDayDetail) {
64
64
  newData = {
65
- tabKey: "schedules",
65
+ tabKey: 'schedules',
66
66
  products: _objectSpread(_objectSpread({}, products), {}, {
67
67
  currentProduct: item,
68
68
  openProductDetailDrawer: !currentSelectDayDetail
@@ -70,13 +70,13 @@ var ProductList = function ProductList(_ref) {
70
70
  };
71
71
  }
72
72
  dispatch({
73
- type: "setState",
73
+ type: 'setState',
74
74
  payload: newData
75
75
  });
76
76
  };
77
77
  var empty = useMemo(function () {
78
78
  return /*#__PURE__*/React.createElement(EmptyCom, {
79
- description: locales.getText("pisell2.text.products.no-products")
79
+ description: locales.getText('pisell2.text.products.no-products')
80
80
  });
81
81
  }, []);
82
82
  var listDom = useMemo(function () {
@@ -1,6 +1,6 @@
1
- import React from "react";
2
- import { ScheduleItem } from "../../type";
3
- import "./index.less";
1
+ import React from 'react';
2
+ import { ScheduleItem } from '../../type';
3
+ import './index.less';
4
4
  declare type AllSchedulesPropsType = {
5
5
  onOpenDetail?: (id?: number) => void;
6
6
  dataSource: ScheduleItem[];
@@ -4,12 +4,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React, { useMemo, useState } from "react";
8
- import { Button } from "antd";
7
+ import React, { useMemo, useState } from 'react';
8
+ import { Button } from 'antd';
9
9
  import Search from "../../components/Search";
10
10
  import ScheduleList from "../../components/ScheduleList";
11
11
  import "./index.less";
12
- import { locales } from "@pisell/utils";
12
+ import { locales } from '@pisell/utils';
13
13
  /**
14
14
  * 所有schedules列表
15
15
  * @param props
@@ -19,7 +19,7 @@ var AllSchedules = function AllSchedules(props) {
19
19
  var onOpenDetail = props.onOpenDetail,
20
20
  dataSource = props.dataSource,
21
21
  loading = props.loading;
22
- var _useState = useState(""),
22
+ var _useState = useState(''),
23
23
  _useState2 = _slicedToArray(_useState, 2),
24
24
  search = _useState2[0],
25
25
  setSearch = _useState2[1];
@@ -42,8 +42,11 @@ var AllSchedules = function AllSchedules(props) {
42
42
  dataSource: showDataSource,
43
43
  onItemClick: function onItemClick(item) {
44
44
  return onOpenDetail === null || onOpenDetail === void 0 ? void 0 : onOpenDetail(item.id);
45
- }
46
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
45
+ },
46
+ showTabs: true
47
+ })), /*#__PURE__*/React.createElement("div", {
48
+ className: "pisell-lowcode__schedules-module-add-button-wrap"
49
+ }, /*#__PURE__*/React.createElement(Button, {
47
50
  className: "pisell-lowcode__schedules-module-add-button",
48
51
  onClick: function onClick() {
49
52
  return onOpenDetail === null || onOpenDetail === void 0 ? void 0 : onOpenDetail();
@@ -2,13 +2,21 @@
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
+ overflow-y: auto;
6
+ padding: 0 32px;
5
7
  .pisell-lowcode__schedules-module-header {
6
- padding: 16px 32px;
8
+ padding: 16px 0 0;
7
9
  }
8
10
  .pisell-lowcode__schedules-module-content {
9
- padding: 20px 32px;
11
+ padding: 0;
10
12
  flex: 1;
11
- overflow: auto;
13
+ overflow:initial;
14
+ }
15
+ .pisell-lowcode__schedules-module-add-button-wrap{
16
+ position: sticky;
17
+ bottom: 0;
18
+ z-index: 1;
19
+ background: #fff
12
20
  }
13
21
  .pisell-lowcode__schedules-module-add-button {
14
22
  margin: 24px 32px;
@@ -4,6 +4,13 @@ export declare const getScheduleList: (params: {
4
4
  num: number;
5
5
  ids?: number[];
6
6
  }) => Promise<ResponseListData<ScheduleItem[]>>;
7
+ export declare const postScheduleList: (params: {
8
+ skip: number;
9
+ num: number;
10
+ ids?: number[];
11
+ with?: Array<string>;
12
+ with_count?: Array<string>;
13
+ }) => Promise<ResponseListData<ScheduleItem[]>>;
7
14
  export declare const deleteSchedule: (params: {
8
15
  id: number;
9
16
  }) => Promise<ResponseListData<ScheduleItem[]>>;
@@ -22,13 +22,15 @@ export var getScheduleList = /*#__PURE__*/function () {
22
22
  return _ref.apply(this, arguments);
23
23
  };
24
24
  }();
25
- export var deleteSchedule = /*#__PURE__*/function () {
25
+
26
+ // 获取日程接口
27
+ export var postScheduleList = /*#__PURE__*/function () {
26
28
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
27
29
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
28
30
  while (1) switch (_context2.prev = _context2.next) {
29
31
  case 0:
30
32
  _context2.next = 2;
31
- return request.getRequest().remove("/shop/schedule/".concat(params.id));
33
+ return request.getRequest().post("/shop/schedule/v2", params);
32
34
  case 2:
33
35
  return _context2.abrupt("return", _context2.sent);
34
36
  case 3:
@@ -37,7 +39,26 @@ export var deleteSchedule = /*#__PURE__*/function () {
37
39
  }
38
40
  }, _callee2);
39
41
  }));
40
- return function deleteSchedule(_x2) {
42
+ return function postScheduleList(_x2) {
41
43
  return _ref2.apply(this, arguments);
42
44
  };
45
+ }();
46
+ export var deleteSchedule = /*#__PURE__*/function () {
47
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
48
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
49
+ while (1) switch (_context3.prev = _context3.next) {
50
+ case 0:
51
+ _context3.next = 2;
52
+ return request.getRequest().remove("/shop/schedule/".concat(params.id));
53
+ case 2:
54
+ return _context3.abrupt("return", _context3.sent);
55
+ case 3:
56
+ case "end":
57
+ return _context3.stop();
58
+ }
59
+ }, _callee3);
60
+ }));
61
+ return function deleteSchedule(_x3) {
62
+ return _ref3.apply(this, arguments);
63
+ };
43
64
  }();
@@ -48,3 +48,25 @@ export declare const formatScheduleResult: (schedule: ScheduleItem) => {
48
48
  export declare const calcScheduleDateRange: (schedule: ScheduleItem) => any[];
49
49
  export declare const calcCalendarDataBySchedules: (schedules: ScheduleItem[]) => unknown[];
50
50
  export declare const calcMinTimeMaxTimeBySchedules: (schedules: ScheduleItem[], scheduleAllMap: FormState["schedules"]["scheduleAllMap"], selectDate?: string) => {};
51
+ /**
52
+ * @title: 格式化日程数据
53
+ * @description:
54
+ * @param {Array} relation 资源列表
55
+ * @param {string} table_type 关联表类型
56
+ * @param {string} item_type 资源类型
57
+ * @param {boolean} isExcluded 是否排除
58
+ * @return {*}
59
+ * @Author: WangHan
60
+ * @Date: 2024-09-04 11:54
61
+ */
62
+ export declare const formatScheduleData: (relation: Array<any>, table_type?: string, item_type?: string, isExcluded?: boolean) => any;
63
+ /**
64
+ * @title: 格式化日程为二维结构
65
+ * @description:
66
+ * @param {any} list
67
+ * @param {any} filterItem
68
+ * @return {*}
69
+ * @Author: WangHan
70
+ * @Date: 2024-07-29 19:28
71
+ */
72
+ export declare const formatScheduleListByTabs: (list: any, filterItem?: any) => unknown[];