@pisell/private-materials 3.4.82 → 3.4.84
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 +2 -2
- package/build/lowcode/preview.js +152 -152
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -10
- package/es/components/booking/info/header/index.js +7 -7
- package/es/components/booking/info/header/index.less +5 -5
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.js +3 -2
- package/es/components/booking/utils.d.ts +2 -2
- 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 +6 -6
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +3 -1
- package/es/plus/contactInfo/components/SwipeAction/index.js +1 -1
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/HandleActions.js +5 -2
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.js +4 -2
- package/es/plus/orderList/index.d.ts +1 -0
- package/es/plus/orderList/index.js +7 -2
- package/es/plus/pisellSalesGrid/PisellSalesGrid.d.ts +5 -0
- package/es/plus/pisellSalesGrid/PisellSalesGrid.js +363 -0
- package/es/plus/pisellSalesGrid/PisellSalesGrid.less +16 -0
- package/es/plus/pisellSalesGrid/PisellSalesGrid.stories.d.ts +14 -0
- package/es/plus/pisellSalesGrid/PisellSalesGrid.stories.js +559 -0
- package/es/plus/pisellSalesGrid/hooks/useActions.d.ts +19 -0
- package/es/plus/pisellSalesGrid/hooks/useActions.js +723 -0
- package/es/plus/pisellSalesGrid/index.d.ts +4 -0
- package/es/plus/pisellSalesGrid/index.js +3 -0
- package/es/plus/pisellSalesGrid/locales.d.ts +9 -0
- package/es/plus/pisellSalesGrid/locales.js +8 -0
- package/es/plus/pisellSalesGrid/serve.d.ts +19 -0
- package/es/plus/pisellSalesGrid/serve.js +151 -0
- package/es/plus/pisellSalesGrid/types.d.ts +170 -0
- package/es/plus/pisellSalesGrid/types.js +1 -0
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +15 -0
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.js +211 -0
- package/es/plus/pisellSalesManagement/components/BookingNotesPreview.d.ts +19 -0
- package/es/plus/pisellSalesManagement/components/BookingNotesPreview.js +167 -0
- package/es/plus/pisellSalesManagement/components/ResourceSelector.d.ts +9 -0
- package/es/plus/pisellSalesManagement/components/ResourceSelector.js +102 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +186 -0
- package/es/plus/pisellSalesManagement/config/booking.js +380 -0
- package/es/plus/pisellSalesManagement/config/index.d.ts +2 -0
- package/es/plus/pisellSalesManagement/config/index.js +11 -0
- package/es/plus/pisellSalesManagement/config/order.d.ts +172 -0
- package/es/plus/pisellSalesManagement/config/order.js +460 -0
- package/es/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +15 -0
- package/es/plus/pisellSalesManagement/hooks/perspectiveUtils.js +66 -0
- package/es/plus/pisellSalesManagement/hooks/useBookingPerspective.d.ts +2 -0
- package/es/plus/pisellSalesManagement/hooks/useBookingPerspective.js +651 -0
- package/es/plus/pisellSalesManagement/hooks/useOrderPerspective.d.ts +2 -0
- package/es/plus/pisellSalesManagement/hooks/useOrderPerspective.js +656 -0
- package/es/plus/pisellSalesManagement/hooks/usePerspectives.d.ts +5 -0
- package/es/plus/pisellSalesManagement/hooks/usePerspectives.js +12 -0
- package/es/plus/pisellSalesManagement/index.d.ts +10 -0
- package/es/plus/pisellSalesManagement/index.js +84 -0
- package/es/plus/pisellSalesManagement/locales.d.ts +303 -0
- package/es/plus/pisellSalesManagement/locales.js +302 -0
- package/es/plus/pisellSalesManagement/serve.d.ts +26 -0
- package/es/plus/pisellSalesManagement/serve.js +222 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.js +2 -26
- package/es/plus/walletPassGallery/components/passList/index.js +12 -4
- package/es/plus/walletPassGallery/index.js +5 -35
- package/es/pro/Login2.0/Login2.js +8 -8
- package/es/pro/Login2.0/locales.d.ts +5 -0
- package/es/pro/Login2.0/locales.js +5 -0
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/lib/components/booking/info/header/index.js +7 -7
- package/lib/components/booking/info/header/index.less +5 -5
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.js +2 -1
- package/lib/components/booking/utils.d.ts +2 -2
- 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 +6 -6
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +8 -2
- package/lib/plus/contactInfo/components/SwipeAction/index.js +23 -23
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/HandleActions.js +2 -2
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.js +2 -2
- package/lib/plus/orderList/index.d.ts +1 -0
- package/lib/plus/orderList/index.js +3 -3
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.d.ts +5 -0
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.js +339 -0
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.less +16 -0
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.stories.d.ts +14 -0
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.stories.js +455 -0
- package/lib/plus/pisellSalesGrid/hooks/useActions.d.ts +19 -0
- package/lib/plus/pisellSalesGrid/hooks/useActions.js +545 -0
- package/lib/plus/pisellSalesGrid/index.d.ts +4 -0
- package/lib/plus/pisellSalesGrid/index.js +42 -0
- package/lib/plus/pisellSalesGrid/locales.d.ts +9 -0
- package/lib/plus/pisellSalesGrid/locales.js +29 -0
- package/lib/plus/pisellSalesGrid/serve.d.ts +19 -0
- package/lib/plus/pisellSalesGrid/serve.js +142 -0
- package/lib/plus/pisellSalesGrid/types.d.ts +170 -0
- package/lib/plus/pisellSalesGrid/types.js +17 -0
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +15 -0
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.js +250 -0
- package/lib/plus/pisellSalesManagement/components/BookingNotesPreview.d.ts +19 -0
- package/lib/plus/pisellSalesManagement/components/BookingNotesPreview.js +193 -0
- package/lib/plus/pisellSalesManagement/components/ResourceSelector.d.ts +9 -0
- package/lib/plus/pisellSalesManagement/components/ResourceSelector.js +106 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +186 -0
- package/lib/plus/pisellSalesManagement/config/booking.js +500 -0
- package/lib/plus/pisellSalesManagement/config/index.d.ts +2 -0
- package/lib/plus/pisellSalesManagement/config/index.js +43 -0
- package/lib/plus/pisellSalesManagement/config/order.d.ts +172 -0
- package/lib/plus/pisellSalesManagement/config/order.js +492 -0
- package/lib/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +15 -0
- package/lib/plus/pisellSalesManagement/hooks/perspectiveUtils.js +113 -0
- package/lib/plus/pisellSalesManagement/hooks/useBookingPerspective.d.ts +2 -0
- package/lib/plus/pisellSalesManagement/hooks/useBookingPerspective.js +699 -0
- package/lib/plus/pisellSalesManagement/hooks/useOrderPerspective.d.ts +2 -0
- package/lib/plus/pisellSalesManagement/hooks/useOrderPerspective.js +700 -0
- package/lib/plus/pisellSalesManagement/hooks/usePerspectives.d.ts +5 -0
- package/lib/plus/pisellSalesManagement/hooks/usePerspectives.js +42 -0
- package/lib/plus/pisellSalesManagement/index.d.ts +10 -0
- package/lib/plus/pisellSalesManagement/index.js +113 -0
- package/lib/plus/pisellSalesManagement/locales.d.ts +303 -0
- package/lib/plus/pisellSalesManagement/locales.js +326 -0
- package/lib/plus/pisellSalesManagement/serve.d.ts +26 -0
- package/lib/plus/pisellSalesManagement/serve.js +120 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.js +1 -16
- package/lib/plus/walletPassGallery/components/passList/index.js +12 -5
- package/lib/plus/walletPassGallery/index.js +4 -32
- package/lib/pro/Login2.0/Login2.js +8 -8
- package/lib/pro/Login2.0/locales.d.ts +5 -0
- package/lib/pro/Login2.0/locales.js +5 -0
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/lowcode/pisell-sales-management/meta.ts +88 -0
- package/package.json +2 -2
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
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
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { locales } from '@pisell/utils';
|
|
8
|
+
import { getCustomerSelectOptions, getChannelSelectOptions, getPaymentSelectOptions } from "./../../orderList/serve";
|
|
9
|
+
import { getOrderStatusMap, getPaymentStatusMap } from "./order";
|
|
10
|
+
import ResourceSelector from "../components/ResourceSelector";
|
|
11
|
+
export var getBookingStatusMap = function getBookingStatusMap() {
|
|
12
|
+
return {
|
|
13
|
+
new: locales.getText('pisell2.salesManagement.booking.status.new'),
|
|
14
|
+
confirmed: locales.getText('pisell2.salesManagement.booking.status.confirmed'),
|
|
15
|
+
arrived: locales.getText('pisell2.salesManagement.booking.status.arrived'),
|
|
16
|
+
started: locales.getText('pisell2.salesManagement.booking.status.started'),
|
|
17
|
+
cancelled: locales.getText('pisell2.salesManagement.booking.status.cancelled'),
|
|
18
|
+
no_show: locales.getText('pisell2.salesManagement.booking.status.no_show'),
|
|
19
|
+
completed: locales.getText('pisell2.salesManagement.booking.status.completed')
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export var BOOKING_STATUS_COLOR_MAP = {
|
|
23
|
+
new: '#91caff',
|
|
24
|
+
confirmed: '#b7eb8f',
|
|
25
|
+
arrived: '#d3adf7',
|
|
26
|
+
started: '#fffb8f',
|
|
27
|
+
cancelled: '#bfbfbf',
|
|
28
|
+
no_show: '#ffa39e',
|
|
29
|
+
completed: '#ffd591'
|
|
30
|
+
};
|
|
31
|
+
export var getBookingPlatformMap = function getBookingPlatformMap() {
|
|
32
|
+
return {
|
|
33
|
+
online_store: locales.getText('pisell2.salesManagement.booking.platform.online_store'),
|
|
34
|
+
wholesalebusiness: locales.getText('pisell2.salesManagement.booking.platform.wholesalebusiness'),
|
|
35
|
+
'table-order': locales.getText('pisell2.salesManagement.booking.platform.table-order'),
|
|
36
|
+
mobile_order: locales.getText('pisell2.salesManagement.booking.platform.mobile_order'),
|
|
37
|
+
kiosk: locales.getText('pisell2.salesManagement.booking.platform.kiosk'),
|
|
38
|
+
pos: locales.getText('pisell2.salesManagement.booking.platform.pos')
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export var getBookingHeaderLabels = function getBookingHeaderLabels() {
|
|
42
|
+
return {
|
|
43
|
+
bookingBrief: locales.getText('pisell2.salesManagement.booking.column.bookingBrief'),
|
|
44
|
+
serviceTime: locales.getText('pisell2.salesManagement.booking.column.serviceTime'),
|
|
45
|
+
customer: locales.getText('pisell2.salesManagement.booking.column.customer'),
|
|
46
|
+
contact: locales.getText('pisell2.salesManagement.booking.column.contact'),
|
|
47
|
+
holder: locales.getText('pisell2.salesManagement.booking.column.holder'),
|
|
48
|
+
services: locales.getText('pisell2.salesManagement.booking.column.services'),
|
|
49
|
+
pax: locales.getText('pisell2.salesManagement.booking.column.pax'),
|
|
50
|
+
resource: locales.getText('pisell2.salesManagement.booking.column.resource'),
|
|
51
|
+
forms: locales.getText('pisell2.salesManagement.booking.column.forms'),
|
|
52
|
+
orderInfo: locales.getText('pisell2.salesManagement.booking.column.orderInfo'),
|
|
53
|
+
bookingId: locales.getText('pisell2.salesManagement.booking.column.bookingId'),
|
|
54
|
+
orderOrigin: locales.getText('pisell2.salesManagement.booking.column.orderOrigin'),
|
|
55
|
+
updated: locales.getText('pisell2.salesManagement.booking.column.updated'),
|
|
56
|
+
orderNote: locales.getText('pisell2.salesManagement.booking.common.orderNote'),
|
|
57
|
+
internalNote: locales.getText('pisell2.salesManagement.booking.common.internalNote'),
|
|
58
|
+
more: locales.getText('pisell2.salesManagement.booking.common.more'),
|
|
59
|
+
createdBy: locales.getText('pisell2.salesManagement.booking.common.createdBy'),
|
|
60
|
+
guest: locales.getText('pisell2.salesManagement.order.common.guest'),
|
|
61
|
+
walkIn: locales.getText('pisell2.salesManagement.order.common.walkIn')
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export var defaultPaymentStatusKeys = ['payment_processing', 'partially_paid', 'paid', 'partially_refunded', 'refunded'];
|
|
65
|
+
export var getFilterButtonList = function getFilterButtonList() {
|
|
66
|
+
var BOOKING_STATUS_MAP = getBookingStatusMap();
|
|
67
|
+
var ORDER_STATUS_MAP = getOrderStatusMap();
|
|
68
|
+
var PAYMENT_STATUS_MAP = getPaymentStatusMap();
|
|
69
|
+
return [{
|
|
70
|
+
name: 'appointment_status',
|
|
71
|
+
type: 'single',
|
|
72
|
+
key: 'appointmentStatus',
|
|
73
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.bookingStatus.label'),
|
|
74
|
+
other: {
|
|
75
|
+
allowClear: true,
|
|
76
|
+
mode: 'multiple',
|
|
77
|
+
maxTagCount: 'responsive',
|
|
78
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.bookingStatus.placeholder'),
|
|
79
|
+
options: Object.entries(BOOKING_STATUS_MAP).map(function (_ref) {
|
|
80
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
81
|
+
key = _ref2[0],
|
|
82
|
+
value = _ref2[1];
|
|
83
|
+
return {
|
|
84
|
+
label: value,
|
|
85
|
+
value: key
|
|
86
|
+
};
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
// {
|
|
91
|
+
// name: 'holder',
|
|
92
|
+
// type: 'input',
|
|
93
|
+
// key: 'holder',
|
|
94
|
+
// label: locales.getText(
|
|
95
|
+
// 'pisell2.salesManagement.booking.filter.holder.label',
|
|
96
|
+
// ),
|
|
97
|
+
// other: {
|
|
98
|
+
// placeholder: locales.getText(
|
|
99
|
+
// 'pisell2.salesManagement.booking.filter.holder.placeholder',
|
|
100
|
+
// ),
|
|
101
|
+
// },
|
|
102
|
+
// },
|
|
103
|
+
{
|
|
104
|
+
name: 'number_between',
|
|
105
|
+
type: 'numberRange',
|
|
106
|
+
key: 'number_between',
|
|
107
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.paxRange.label'),
|
|
108
|
+
other: {
|
|
109
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.paxRange.placeholder'),
|
|
110
|
+
minInputNumberProps: {
|
|
111
|
+
min: 0,
|
|
112
|
+
precision: 0
|
|
113
|
+
},
|
|
114
|
+
maxInputNumberProps: {
|
|
115
|
+
min: 0,
|
|
116
|
+
precision: 0
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
name: 'form_record_ids',
|
|
121
|
+
type: 'custom',
|
|
122
|
+
key: 'formRecordIds',
|
|
123
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.resource.label'),
|
|
124
|
+
sort: true,
|
|
125
|
+
localFilter: false,
|
|
126
|
+
other: {
|
|
127
|
+
allowClear: true,
|
|
128
|
+
mode: 'multiple',
|
|
129
|
+
maxTagCount: 'responsive',
|
|
130
|
+
component: ResourceSelector
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
name: 'order_sales_channel',
|
|
134
|
+
type: 'single',
|
|
135
|
+
key: 'orderSalesChannel',
|
|
136
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.salesChannel.label'),
|
|
137
|
+
other: {
|
|
138
|
+
allowClear: true,
|
|
139
|
+
mode: 'multiple',
|
|
140
|
+
maxTagCount: 'responsive',
|
|
141
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.salesChannel.placeholder'),
|
|
142
|
+
options: function options() {
|
|
143
|
+
return getChannelSelectOptions().then(function (res) {
|
|
144
|
+
return res.map(function (item) {
|
|
145
|
+
return {
|
|
146
|
+
label: item.name,
|
|
147
|
+
value: item.code
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
name: 'total_amount_between',
|
|
155
|
+
type: 'numberRange',
|
|
156
|
+
key: 'total_amount_between',
|
|
157
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.orderAmount.label'),
|
|
158
|
+
other: {
|
|
159
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.orderAmount.placeholder')
|
|
160
|
+
}
|
|
161
|
+
}, {
|
|
162
|
+
name: 'order_status',
|
|
163
|
+
type: 'single',
|
|
164
|
+
key: 'order_status',
|
|
165
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.orderStatus.label'),
|
|
166
|
+
other: {
|
|
167
|
+
allowClear: true,
|
|
168
|
+
mode: 'multiple',
|
|
169
|
+
maxTagCount: 'responsive',
|
|
170
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.orderStatus.placeholder'),
|
|
171
|
+
options: Object.entries(ORDER_STATUS_MAP).map(function (_ref3) {
|
|
172
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
173
|
+
key = _ref4[0],
|
|
174
|
+
value = _ref4[1];
|
|
175
|
+
return {
|
|
176
|
+
label: value,
|
|
177
|
+
value: key
|
|
178
|
+
};
|
|
179
|
+
})
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
name: 'order_payment_status',
|
|
183
|
+
type: 'single',
|
|
184
|
+
key: 'orderPaymentStatus',
|
|
185
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.paymentStatus.label'),
|
|
186
|
+
other: {
|
|
187
|
+
allowClear: true,
|
|
188
|
+
mode: 'multiple',
|
|
189
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.paymentStatus.placeholder'),
|
|
190
|
+
options: Object.entries(PAYMENT_STATUS_MAP).map(function (_ref5) {
|
|
191
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
192
|
+
key = _ref6[0],
|
|
193
|
+
value = _ref6[1];
|
|
194
|
+
return {
|
|
195
|
+
label: value,
|
|
196
|
+
value: key
|
|
197
|
+
};
|
|
198
|
+
}),
|
|
199
|
+
maxTagCount: 'responsive'
|
|
200
|
+
}
|
|
201
|
+
}, {
|
|
202
|
+
name: 'customer_id',
|
|
203
|
+
type: 'single',
|
|
204
|
+
key: 'customer_id',
|
|
205
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.customer.label'),
|
|
206
|
+
other: {
|
|
207
|
+
allowClear: true,
|
|
208
|
+
isSearchServer: true,
|
|
209
|
+
showSearch: true,
|
|
210
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.customer.placeholder'),
|
|
211
|
+
options: function options(params) {
|
|
212
|
+
return getCustomerSelectOptions(params).then(function (res) {
|
|
213
|
+
return res.map(function (item) {
|
|
214
|
+
return {
|
|
215
|
+
label: item.display_name,
|
|
216
|
+
value: item.id
|
|
217
|
+
};
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
// todo:
|
|
224
|
+
// {
|
|
225
|
+
// name: 'products',
|
|
226
|
+
// type: 'input',
|
|
227
|
+
// key: 'products',
|
|
228
|
+
// label: locales.getText(
|
|
229
|
+
// 'pisell2.salesManagement.booking.filter.includeItems.label',
|
|
230
|
+
// ),
|
|
231
|
+
// other: {
|
|
232
|
+
// placeholder: locales.getText(
|
|
233
|
+
// 'pisell2.salesManagement.booking.filter.includeItems.placeholder',
|
|
234
|
+
// ),
|
|
235
|
+
// },
|
|
236
|
+
// },
|
|
237
|
+
{
|
|
238
|
+
name: 'payment_method',
|
|
239
|
+
type: 'single',
|
|
240
|
+
key: 'payment_method',
|
|
241
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.paymentMethod.label'),
|
|
242
|
+
other: {
|
|
243
|
+
allowClear: true,
|
|
244
|
+
mode: 'multiple',
|
|
245
|
+
maxTagCount: 'responsive',
|
|
246
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.paymentMethod.placeholder'),
|
|
247
|
+
options: function options() {
|
|
248
|
+
return getPaymentSelectOptions().then(function (res) {
|
|
249
|
+
var map = new Map(res.map(function (item) {
|
|
250
|
+
return [item.code, {
|
|
251
|
+
label: item.name,
|
|
252
|
+
value: item.code
|
|
253
|
+
}];
|
|
254
|
+
}));
|
|
255
|
+
return Array.from(map.values());
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}, {
|
|
260
|
+
name: 'created_at_between',
|
|
261
|
+
type: 'rangePicker',
|
|
262
|
+
key: 'createdAtBetween',
|
|
263
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.orderDate.label'),
|
|
264
|
+
other: {
|
|
265
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.orderDate.placeholder'),
|
|
266
|
+
showTime: true
|
|
267
|
+
}
|
|
268
|
+
}, {
|
|
269
|
+
name: 'updated_at_between',
|
|
270
|
+
type: 'rangePicker',
|
|
271
|
+
key: 'updatedAtBetween',
|
|
272
|
+
label: locales.getText('pisell2.salesManagement.booking.filter.updatedDate.label'),
|
|
273
|
+
other: {
|
|
274
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.updatedDate.placeholder'),
|
|
275
|
+
showTime: true
|
|
276
|
+
}
|
|
277
|
+
}];
|
|
278
|
+
};
|
|
279
|
+
export var getSortList = function getSortList() {
|
|
280
|
+
return [{
|
|
281
|
+
type: 'time',
|
|
282
|
+
isCustom: true,
|
|
283
|
+
name: 'after_execution_time',
|
|
284
|
+
label: locales.getText('pisell2.salesManagement.booking.sort.afterExecutionTime'),
|
|
285
|
+
getSortItems: function getSortItems() {
|
|
286
|
+
return [{
|
|
287
|
+
key: 'after_execution_time:asc',
|
|
288
|
+
label: locales.getText('pisell2.salesManagement.sort.oldestFirst')
|
|
289
|
+
}];
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
292
|
+
type: 'time',
|
|
293
|
+
isCustom: true,
|
|
294
|
+
name: 'start_at',
|
|
295
|
+
label: locales.getText('pisell2.salesManagement.booking.sort.startAt'),
|
|
296
|
+
getSortItems: function getSortItems() {
|
|
297
|
+
return [{
|
|
298
|
+
key: 'start_at:asc',
|
|
299
|
+
label: locales.getText('pisell2.salesManagement.sort.oldestFirst')
|
|
300
|
+
}, {
|
|
301
|
+
key: 'start_at:desc',
|
|
302
|
+
label: locales.getText('pisell2.salesManagement.sort.latestFirst')
|
|
303
|
+
}];
|
|
304
|
+
}
|
|
305
|
+
}, {
|
|
306
|
+
type: 'time',
|
|
307
|
+
isCustom: true,
|
|
308
|
+
name: 'end_at',
|
|
309
|
+
label: locales.getText('pisell2.salesManagement.booking.sort.endAt'),
|
|
310
|
+
getSortItems: function getSortItems() {
|
|
311
|
+
return [{
|
|
312
|
+
key: 'end_at:asc',
|
|
313
|
+
label: locales.getText('pisell2.salesManagement.sort.oldestFirst')
|
|
314
|
+
}, {
|
|
315
|
+
key: 'end_at:desc',
|
|
316
|
+
label: locales.getText('pisell2.salesManagement.sort.latestFirst')
|
|
317
|
+
}];
|
|
318
|
+
}
|
|
319
|
+
}, {
|
|
320
|
+
type: 'time',
|
|
321
|
+
isCustom: true,
|
|
322
|
+
name: 'created_at',
|
|
323
|
+
label: locales.getText('pisell2.salesManagement.booking.sort.createdAt'),
|
|
324
|
+
getSortItems: function getSortItems() {
|
|
325
|
+
return [{
|
|
326
|
+
key: 'created_at:asc',
|
|
327
|
+
label: locales.getText('pisell2.salesManagement.sort.oldestFirst')
|
|
328
|
+
}, {
|
|
329
|
+
key: 'created_at:desc',
|
|
330
|
+
label: locales.getText('pisell2.salesManagement.sort.newestFirst')
|
|
331
|
+
}];
|
|
332
|
+
}
|
|
333
|
+
}, {
|
|
334
|
+
type: 'time',
|
|
335
|
+
isCustom: true,
|
|
336
|
+
name: 'updated_at',
|
|
337
|
+
label: locales.getText('pisell2.salesManagement.booking.sort.updatedAt'),
|
|
338
|
+
getSortItems: function getSortItems() {
|
|
339
|
+
return [{
|
|
340
|
+
key: 'updated_at:asc',
|
|
341
|
+
label: locales.getText('pisell2.salesManagement.sort.oldestFirst')
|
|
342
|
+
}, {
|
|
343
|
+
key: 'updated_at:desc',
|
|
344
|
+
label: locales.getText('pisell2.salesManagement.sort.newestFirst')
|
|
345
|
+
}];
|
|
346
|
+
},
|
|
347
|
+
other: {
|
|
348
|
+
style: {
|
|
349
|
+
width: '100%'
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
// {
|
|
354
|
+
// type: 'number',
|
|
355
|
+
// isCustom: false,
|
|
356
|
+
// name: 'total_amount',
|
|
357
|
+
// label: locales.getText('pisell2.salesManagement.booking.sort.totalAmount'),
|
|
358
|
+
// },
|
|
359
|
+
// {
|
|
360
|
+
// type: 'number',
|
|
361
|
+
// isCustom: false,
|
|
362
|
+
// name: 'amount_gap',
|
|
363
|
+
// label: locales.getText('pisell2.salesManagement.sort.balanceDue'),
|
|
364
|
+
// },
|
|
365
|
+
// {
|
|
366
|
+
// type: 'number',
|
|
367
|
+
// isCustom: false,
|
|
368
|
+
// name: 'total_refund_amount',
|
|
369
|
+
// label: locales.getText(
|
|
370
|
+
// 'pisell2.salesManagement.booking.sort.refundedAmount',
|
|
371
|
+
// ),
|
|
372
|
+
// },
|
|
373
|
+
// {
|
|
374
|
+
// type: 'string',
|
|
375
|
+
// isCustom: false,
|
|
376
|
+
// name: 'customer_name',
|
|
377
|
+
// label: locales.getText('pisell2.salesManagement.booking.sort.customerName'),
|
|
378
|
+
// },
|
|
379
|
+
];
|
|
380
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { locales } from '@pisell/utils';
|
|
2
|
+
export var getBusinessLabelMap = function getBusinessLabelMap() {
|
|
3
|
+
return {
|
|
4
|
+
ticket: locales.getText('pisell2.salesManagement.business.ticket_order'),
|
|
5
|
+
appointment_booking: locales.getText('pisell2.salesManagement.business.appointment_booking')
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export var BUSINESS_COLOR_MAP = {
|
|
9
|
+
ticket: '#CEEAB0',
|
|
10
|
+
appointment_booking: '#C7D7FE'
|
|
11
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取支付状态映射
|
|
3
|
+
*/
|
|
4
|
+
export declare const getPaymentStatusMap: () => Record<string, string>;
|
|
5
|
+
export declare const PAYMENT_STATUS_COLOR_MAP: Record<string, string>;
|
|
6
|
+
export declare const getPlatformMap: () => Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* 获取订单状态映射
|
|
9
|
+
* @param locales - 多语言对象
|
|
10
|
+
*/
|
|
11
|
+
export declare const getOrderStatusMap: () => Record<string, string>;
|
|
12
|
+
export declare const ORDER_STATUS_COLOR_MAP: Record<string, {
|
|
13
|
+
borderColor: string;
|
|
14
|
+
textColor: string;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* 获取处理状态映射
|
|
18
|
+
*/
|
|
19
|
+
export declare const getShippingStatusMap: () => Record<string, string>;
|
|
20
|
+
export declare const FULFILLMENT_STATUS_COLOR_MAP: Record<string, {
|
|
21
|
+
borderColor: string;
|
|
22
|
+
textColor: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* 获取配送方式映射
|
|
26
|
+
*/
|
|
27
|
+
export declare const getDeliveryTypeMap: () => Record<string, string>;
|
|
28
|
+
/**
|
|
29
|
+
* 获取到店服务类型映射
|
|
30
|
+
* @param locales - 多语言对象
|
|
31
|
+
*/
|
|
32
|
+
export declare const getShopServiceTypeMap: () => Record<string, string>;
|
|
33
|
+
export declare const DELIVERY_TYPE_COLOR_MAP: Record<string, string>;
|
|
34
|
+
export declare const SHOP_SERVICE_TYPE_COLOR_MAP: Record<string, string>;
|
|
35
|
+
export declare const getOrderHeaderLabels: () => Record<string, string>;
|
|
36
|
+
export declare const defaultPaymentStatusKeys: string[];
|
|
37
|
+
export declare const getFilterButtonList: () => ({
|
|
38
|
+
name: string;
|
|
39
|
+
type: string;
|
|
40
|
+
key: string;
|
|
41
|
+
label: any;
|
|
42
|
+
other: {
|
|
43
|
+
allowClear: boolean;
|
|
44
|
+
mode: string;
|
|
45
|
+
maxTagCount: string;
|
|
46
|
+
placeholder: any;
|
|
47
|
+
options: {
|
|
48
|
+
label: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}[];
|
|
51
|
+
isSearchServer?: undefined;
|
|
52
|
+
showSearch?: undefined;
|
|
53
|
+
minInputNumberProps?: undefined;
|
|
54
|
+
maxInputNumberProps?: undefined;
|
|
55
|
+
};
|
|
56
|
+
} | {
|
|
57
|
+
name: string;
|
|
58
|
+
type: string;
|
|
59
|
+
key: string;
|
|
60
|
+
label: any;
|
|
61
|
+
other: {
|
|
62
|
+
allowClear: boolean;
|
|
63
|
+
isSearchServer: boolean;
|
|
64
|
+
showSearch: boolean;
|
|
65
|
+
placeholder: any;
|
|
66
|
+
options: (params?: string) => Promise<any>;
|
|
67
|
+
mode?: undefined;
|
|
68
|
+
maxTagCount?: undefined;
|
|
69
|
+
minInputNumberProps?: undefined;
|
|
70
|
+
maxInputNumberProps?: undefined;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
name: string;
|
|
74
|
+
type: string;
|
|
75
|
+
key: string;
|
|
76
|
+
label: any;
|
|
77
|
+
other: {
|
|
78
|
+
allowClear: boolean;
|
|
79
|
+
mode: string;
|
|
80
|
+
maxTagCount: string;
|
|
81
|
+
placeholder: any;
|
|
82
|
+
options: () => Promise<any>;
|
|
83
|
+
isSearchServer?: undefined;
|
|
84
|
+
showSearch?: undefined;
|
|
85
|
+
minInputNumberProps?: undefined;
|
|
86
|
+
maxInputNumberProps?: undefined;
|
|
87
|
+
};
|
|
88
|
+
} | {
|
|
89
|
+
name: string;
|
|
90
|
+
type: string;
|
|
91
|
+
key: string;
|
|
92
|
+
label: any;
|
|
93
|
+
other: {
|
|
94
|
+
placeholder: any;
|
|
95
|
+
minInputNumberProps: {
|
|
96
|
+
min: number;
|
|
97
|
+
};
|
|
98
|
+
maxInputNumberProps: {
|
|
99
|
+
min: number;
|
|
100
|
+
};
|
|
101
|
+
allowClear?: undefined;
|
|
102
|
+
mode?: undefined;
|
|
103
|
+
maxTagCount?: undefined;
|
|
104
|
+
options?: undefined;
|
|
105
|
+
isSearchServer?: undefined;
|
|
106
|
+
showSearch?: undefined;
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
name: string;
|
|
110
|
+
type: string;
|
|
111
|
+
key: string;
|
|
112
|
+
label: any;
|
|
113
|
+
other: {
|
|
114
|
+
allowClear: boolean;
|
|
115
|
+
mode: string;
|
|
116
|
+
maxTagCount: string;
|
|
117
|
+
isSearchServer: boolean;
|
|
118
|
+
showSearch: boolean;
|
|
119
|
+
placeholder: any;
|
|
120
|
+
options: (params?: string) => Promise<any>;
|
|
121
|
+
minInputNumberProps?: undefined;
|
|
122
|
+
maxInputNumberProps?: undefined;
|
|
123
|
+
};
|
|
124
|
+
} | {
|
|
125
|
+
name: string;
|
|
126
|
+
type: string;
|
|
127
|
+
key: string;
|
|
128
|
+
label: any;
|
|
129
|
+
other: {
|
|
130
|
+
placeholder: any;
|
|
131
|
+
allowClear?: undefined;
|
|
132
|
+
mode?: undefined;
|
|
133
|
+
maxTagCount?: undefined;
|
|
134
|
+
options?: undefined;
|
|
135
|
+
isSearchServer?: undefined;
|
|
136
|
+
showSearch?: undefined;
|
|
137
|
+
minInputNumberProps?: undefined;
|
|
138
|
+
maxInputNumberProps?: undefined;
|
|
139
|
+
};
|
|
140
|
+
} | {
|
|
141
|
+
name: string;
|
|
142
|
+
type: string;
|
|
143
|
+
key: string;
|
|
144
|
+
label: any;
|
|
145
|
+
other: {
|
|
146
|
+
allowClear: boolean;
|
|
147
|
+
placeholder: any;
|
|
148
|
+
options: () => Promise<any>;
|
|
149
|
+
mode?: undefined;
|
|
150
|
+
maxTagCount?: undefined;
|
|
151
|
+
isSearchServer?: undefined;
|
|
152
|
+
showSearch?: undefined;
|
|
153
|
+
minInputNumberProps?: undefined;
|
|
154
|
+
maxInputNumberProps?: undefined;
|
|
155
|
+
};
|
|
156
|
+
})[];
|
|
157
|
+
export declare const getSortList: () => ({
|
|
158
|
+
type: string;
|
|
159
|
+
isCustom: boolean;
|
|
160
|
+
name: string;
|
|
161
|
+
label: any;
|
|
162
|
+
getSortItems: () => {
|
|
163
|
+
key: string;
|
|
164
|
+
label: any;
|
|
165
|
+
}[];
|
|
166
|
+
} | {
|
|
167
|
+
type: string;
|
|
168
|
+
isCustom: boolean;
|
|
169
|
+
name: string;
|
|
170
|
+
label: any;
|
|
171
|
+
getSortItems?: undefined;
|
|
172
|
+
})[];
|