@pisell/private-materials 6.11.28 → 6.11.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +1 -1
- package/es/components/eftpos/hooks.d.ts +1 -0
- 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 +4 -4
- 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/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/plus/pisellSalesGrid/PisellSalesGrid.js +2 -2
- package/es/plus/pisellSalesGrid/PisellSalesGrid.less +6 -0
- package/es/plus/pisellSalesGrid/serve.d.ts +1 -1
- package/es/plus/pisellSalesGrid/serve.js +7 -7
- package/es/plus/pisellSalesGrid/types.d.ts +2 -0
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.js +3 -2
- package/es/plus/pisellSalesManagement/config/booking.d.ts +26 -0
- package/es/plus/pisellSalesManagement/config/booking.js +9 -5
- package/es/plus/pisellSalesManagement/hooks/useBookingPerspective.js +68 -27
- package/es/plus/pisellSalesManagement/hooks/useOrderPerspective.js +38 -22
- package/es/plus/pisellSalesManagement/index.js +3 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +1 -1
- package/lib/components/eftpos/hooks.d.ts +1 -0
- 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 +4 -4
- 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/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.js +5 -2
- package/lib/plus/pisellSalesGrid/PisellSalesGrid.less +6 -0
- package/lib/plus/pisellSalesGrid/serve.d.ts +1 -1
- package/lib/plus/pisellSalesGrid/serve.js +6 -6
- package/lib/plus/pisellSalesGrid/types.d.ts +2 -0
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.js +3 -2
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +26 -0
- package/lib/plus/pisellSalesManagement/config/booking.js +9 -5
- package/lib/plus/pisellSalesManagement/hooks/useBookingPerspective.js +65 -29
- package/lib/plus/pisellSalesManagement/hooks/useOrderPerspective.js +39 -21
- package/lib/plus/pisellSalesManagement/index.js +1 -1
- package/package.json +4 -4
|
@@ -173,10 +173,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
173
173
|
export declare const getDuration: (duration: number | {
|
|
174
174
|
type: string;
|
|
175
175
|
value: number;
|
|
176
|
-
}) => number | {
|
|
176
|
+
}) => number | "flexible" | {
|
|
177
177
|
type: string;
|
|
178
178
|
value: number;
|
|
179
|
-
}
|
|
179
|
+
};
|
|
180
180
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
181
181
|
export declare const getIsEdit: (state: any) => boolean;
|
|
182
182
|
export {};
|
|
@@ -8,7 +8,7 @@ export declare const useCupAction: () => {
|
|
|
8
8
|
* @return {*}
|
|
9
9
|
*/
|
|
10
10
|
export declare const useBatchCupAction: () => {
|
|
11
|
-
run: (this: unknown, eco_cup_ids:
|
|
11
|
+
run: (this: unknown, eco_cup_ids: string[] | number[]) => Promise<boolean>;
|
|
12
12
|
loading: boolean;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -178,7 +178,7 @@ export declare const updateCustom: (payload: {
|
|
|
178
178
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
179
179
|
type: EActionTypes;
|
|
180
180
|
payload: {
|
|
181
|
-
status: "
|
|
181
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
184
|
/**
|
|
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
302
|
mode?: "refund" | "fullPay" | "pay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
|
|
305
|
+
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
|
@@ -312,7 +312,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
312
312
|
net?: boolean | undefined;
|
|
313
313
|
component?: string | undefined;
|
|
314
314
|
form?: string | undefined;
|
|
315
|
-
status?: "
|
|
315
|
+
status?: "loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
316
316
|
warn?: string | undefined;
|
|
317
317
|
steps?: {
|
|
318
318
|
/** 用于重置当前步骤 */
|
|
@@ -47,7 +47,7 @@ declare type ScanData = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
-
searchType: "
|
|
50
|
+
searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
|
|
51
51
|
data: any;
|
|
52
52
|
scanCode: string;
|
|
53
53
|
} | null;
|
|
@@ -39,7 +39,7 @@ function getDefaultSearchParams(currentPerspective) {
|
|
|
39
39
|
filter: {
|
|
40
40
|
values: {
|
|
41
41
|
order_payment_status: defaultPaymentStatusKeys,
|
|
42
|
-
|
|
42
|
+
booking_time_start_between: [dayjs().startOf('day'), dayjs().endOf('day')]
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
};
|
|
@@ -129,7 +129,7 @@ var PisellSalesGrid = function PisellSalesGrid(props) {
|
|
|
129
129
|
setSelectedRows = _useState4[1];
|
|
130
130
|
var _useState5 = useState({
|
|
131
131
|
pageNumber: 1,
|
|
132
|
-
pageSize:
|
|
132
|
+
pageSize: 50
|
|
133
133
|
}),
|
|
134
134
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
135
135
|
pagination = _useState6[0],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["orderDate", "total_amount", "sort"],
|
|
3
|
-
_excluded2 = ["
|
|
3
|
+
_excluded2 = ["booking_time_start_between", "created_at_between", "updated_at_between", "number_between", "total_amount_between", "sort"];
|
|
4
4
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
5
5
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
6
6
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -76,25 +76,25 @@ export var getOrderList = /*#__PURE__*/function () {
|
|
|
76
76
|
};
|
|
77
77
|
}();
|
|
78
78
|
var formatBookingParams = function formatBookingParams(params) {
|
|
79
|
-
var
|
|
79
|
+
var booking_time_start_between = params.booking_time_start_between,
|
|
80
80
|
created_at_between = params.created_at_between,
|
|
81
81
|
updated_at_between = params.updated_at_between,
|
|
82
82
|
number_between = params.number_between,
|
|
83
83
|
total_amount_between = params.total_amount_between,
|
|
84
84
|
sort = params.sort,
|
|
85
85
|
rest = _objectWithoutProperties(params, _excluded2);
|
|
86
|
-
var bookingTimeRange = Array.isArray(
|
|
87
|
-
return value ? dayjs(value).format('YYYY-MM-DD') : undefined;
|
|
86
|
+
var bookingTimeRange = Array.isArray(booking_time_start_between) ? booking_time_start_between.map(function (value) {
|
|
87
|
+
return value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : undefined;
|
|
88
88
|
}).filter(function (value) {
|
|
89
89
|
return value;
|
|
90
90
|
}) : undefined;
|
|
91
91
|
var createdRange = Array.isArray(created_at_between) ? created_at_between.map(function (value) {
|
|
92
|
-
return value ? dayjs(value).format('YYYY-MM-DD') : undefined;
|
|
92
|
+
return value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : undefined;
|
|
93
93
|
}).filter(function (value) {
|
|
94
94
|
return value;
|
|
95
95
|
}) : undefined;
|
|
96
96
|
var updatedRange = Array.isArray(updated_at_between) ? updated_at_between.map(function (value) {
|
|
97
|
-
return value ? dayjs(value).format('YYYY-MM-DD') : undefined;
|
|
97
|
+
return value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : undefined;
|
|
98
98
|
}).filter(function (value) {
|
|
99
99
|
return value;
|
|
100
100
|
}) : undefined;
|
|
@@ -106,7 +106,7 @@ var formatBookingParams = function formatBookingParams(params) {
|
|
|
106
106
|
order_by: sort
|
|
107
107
|
};
|
|
108
108
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, rest), ext), (bookingTimeRange === null || bookingTimeRange === void 0 ? void 0 : bookingTimeRange.length) && {
|
|
109
|
-
|
|
109
|
+
booking_time_start_between: bookingTimeRange
|
|
110
110
|
}), (createdRange === null || createdRange === void 0 ? void 0 : createdRange.length) && {
|
|
111
111
|
created_at_between: createdRange
|
|
112
112
|
}), (updatedRange === null || updatedRange === void 0 ? void 0 : updatedRange.length) && {
|
|
@@ -81,6 +81,8 @@ export interface RecordBoardGridPropsCompat {
|
|
|
81
81
|
columns?: any[];
|
|
82
82
|
/** 默认隐藏的列 key 列表(对应 columns 的 key 或 dataIndex),与列上 hidden: true 合并后由 RecordBoard 初始化列显隐 */
|
|
83
83
|
defaultHiddenColumnKeys?: string[];
|
|
84
|
+
/** 当前页某列全同值/全空时隐藏该列并在表格上方展示总结区;默认 true,传 false 可关闭 */
|
|
85
|
+
collapseUniformColumns?: boolean;
|
|
84
86
|
/** 表格滚动,与 RecordBoard grid.scroll 对齐(含 autoCalc、scrollToFirstRowOnChange) */
|
|
85
87
|
scroll?: {
|
|
86
88
|
x?: number | string;
|
|
@@ -108,7 +108,8 @@ var BookingFormsPreview = function BookingFormsPreview(props) {
|
|
|
108
108
|
var tooltipContent = /*#__PURE__*/React.createElement("div", {
|
|
109
109
|
style: {
|
|
110
110
|
display: 'flex',
|
|
111
|
-
flexDirection: 'column'
|
|
111
|
+
flexDirection: 'column',
|
|
112
|
+
gap: 10
|
|
112
113
|
}
|
|
113
114
|
}, tableItems.map(function (item, idx) {
|
|
114
115
|
var clickable = item.count > 0;
|
|
@@ -119,7 +120,7 @@ var BookingFormsPreview = function BookingFormsPreview(props) {
|
|
|
119
120
|
color: clickable ? '#7f56d9' : '#98A2B3',
|
|
120
121
|
textDecoration: clickable ? 'underline' : 'none',
|
|
121
122
|
whiteSpace: 'nowrap',
|
|
122
|
-
lineHeight: '
|
|
123
|
+
lineHeight: '18px',
|
|
123
124
|
cursor: clickable ? 'pointer' : 'default'
|
|
124
125
|
},
|
|
125
126
|
onClick: function onClick(event) {
|
|
@@ -22,6 +22,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
22
22
|
component?: undefined;
|
|
23
23
|
isSearchServer?: undefined;
|
|
24
24
|
showSearch?: undefined;
|
|
25
|
+
showTime?: undefined;
|
|
25
26
|
};
|
|
26
27
|
sort?: undefined;
|
|
27
28
|
localFilter?: undefined;
|
|
@@ -47,6 +48,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
47
48
|
component?: undefined;
|
|
48
49
|
isSearchServer?: undefined;
|
|
49
50
|
showSearch?: undefined;
|
|
51
|
+
showTime?: undefined;
|
|
50
52
|
};
|
|
51
53
|
sort?: undefined;
|
|
52
54
|
localFilter?: undefined;
|
|
@@ -73,6 +75,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
73
75
|
maxInputNumberProps?: undefined;
|
|
74
76
|
isSearchServer?: undefined;
|
|
75
77
|
showSearch?: undefined;
|
|
78
|
+
showTime?: undefined;
|
|
76
79
|
};
|
|
77
80
|
} | {
|
|
78
81
|
name: string;
|
|
@@ -90,6 +93,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
90
93
|
component?: undefined;
|
|
91
94
|
isSearchServer?: undefined;
|
|
92
95
|
showSearch?: undefined;
|
|
96
|
+
showTime?: undefined;
|
|
93
97
|
};
|
|
94
98
|
sort?: undefined;
|
|
95
99
|
localFilter?: undefined;
|
|
@@ -109,6 +113,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
109
113
|
component?: undefined;
|
|
110
114
|
isSearchServer?: undefined;
|
|
111
115
|
showSearch?: undefined;
|
|
116
|
+
showTime?: undefined;
|
|
112
117
|
};
|
|
113
118
|
sort?: undefined;
|
|
114
119
|
localFilter?: undefined;
|
|
@@ -128,6 +133,27 @@ export declare const getFilterButtonList: () => ({
|
|
|
128
133
|
minInputNumberProps?: undefined;
|
|
129
134
|
maxInputNumberProps?: undefined;
|
|
130
135
|
component?: undefined;
|
|
136
|
+
showTime?: undefined;
|
|
137
|
+
};
|
|
138
|
+
sort?: undefined;
|
|
139
|
+
localFilter?: undefined;
|
|
140
|
+
} | {
|
|
141
|
+
name: string;
|
|
142
|
+
type: string;
|
|
143
|
+
key: string;
|
|
144
|
+
label: any;
|
|
145
|
+
other: {
|
|
146
|
+
placeholder: any;
|
|
147
|
+
showTime: boolean;
|
|
148
|
+
allowClear?: undefined;
|
|
149
|
+
mode?: undefined;
|
|
150
|
+
maxTagCount?: undefined;
|
|
151
|
+
options?: undefined;
|
|
152
|
+
minInputNumberProps?: undefined;
|
|
153
|
+
maxInputNumberProps?: undefined;
|
|
154
|
+
component?: undefined;
|
|
155
|
+
isSearchServer?: undefined;
|
|
156
|
+
showSearch?: undefined;
|
|
131
157
|
};
|
|
132
158
|
sort?: undefined;
|
|
133
159
|
localFilter?: undefined;
|
|
@@ -56,7 +56,9 @@ export var getBookingHeaderLabels = function getBookingHeaderLabels() {
|
|
|
56
56
|
orderNote: locales.getText('pisell2.salesManagement.booking.common.orderNote'),
|
|
57
57
|
internalNote: locales.getText('pisell2.salesManagement.booking.common.internalNote'),
|
|
58
58
|
more: locales.getText('pisell2.salesManagement.booking.common.more'),
|
|
59
|
-
createdBy: locales.getText('pisell2.salesManagement.booking.common.createdBy')
|
|
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')
|
|
60
62
|
};
|
|
61
63
|
};
|
|
62
64
|
export var defaultPaymentStatusKeys = ['payment_pending', 'partially_paid', 'paid', 'partially_refunded', 'refunded'];
|
|
@@ -256,19 +258,21 @@ export var getFilterButtonList = function getFilterButtonList() {
|
|
|
256
258
|
}
|
|
257
259
|
}, {
|
|
258
260
|
name: 'created_at_between',
|
|
259
|
-
type: '
|
|
261
|
+
type: 'rangePicker',
|
|
260
262
|
key: 'createdAtBetween',
|
|
261
263
|
label: locales.getText('pisell2.salesManagement.booking.filter.orderDate.label'),
|
|
262
264
|
other: {
|
|
263
|
-
placeholder: locales.getText('pisell2.salesManagement.booking.filter.orderDate.placeholder')
|
|
265
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.orderDate.placeholder'),
|
|
266
|
+
showTime: true
|
|
264
267
|
}
|
|
265
268
|
}, {
|
|
266
269
|
name: 'updated_at_between',
|
|
267
|
-
type: '
|
|
270
|
+
type: 'rangePicker',
|
|
268
271
|
key: 'updatedAtBetween',
|
|
269
272
|
label: locales.getText('pisell2.salesManagement.booking.filter.updatedDate.label'),
|
|
270
273
|
other: {
|
|
271
|
-
placeholder: locales.getText('pisell2.salesManagement.booking.filter.updatedDate.placeholder')
|
|
274
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.updatedDate.placeholder'),
|
|
275
|
+
showTime: true
|
|
272
276
|
}
|
|
273
277
|
}];
|
|
274
278
|
};
|
|
@@ -75,7 +75,6 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
75
75
|
title: bookingLabels.bookingBrief,
|
|
76
76
|
key: 'booking_brief',
|
|
77
77
|
width: 225,
|
|
78
|
-
// fixed: 'left',
|
|
79
78
|
render: function render(_, record) {
|
|
80
79
|
var _record$order, _record$order2, _record$order3;
|
|
81
80
|
var startAt = buildDateTime(record === null || record === void 0 ? void 0 : record.start_date, record === null || record === void 0 ? void 0 : record.start_time) || (record === null || record === void 0 ? void 0 : record.start_at);
|
|
@@ -156,15 +155,50 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
156
155
|
startAt: startAt,
|
|
157
156
|
endAt: endAt
|
|
158
157
|
}));
|
|
158
|
+
},
|
|
159
|
+
uniformCompare: function uniformCompare(_, record) {
|
|
160
|
+
var _record$start_date = record.start_date,
|
|
161
|
+
start_date = _record$start_date === void 0 ? '' : _record$start_date,
|
|
162
|
+
_record$start_time = record.start_time,
|
|
163
|
+
start_time = _record$start_time === void 0 ? '' : _record$start_time,
|
|
164
|
+
_record$end_date = record.end_date,
|
|
165
|
+
end_date = _record$end_date === void 0 ? '' : _record$end_date,
|
|
166
|
+
_record$end_time = record.end_time,
|
|
167
|
+
end_time = _record$end_time === void 0 ? '' : _record$end_time;
|
|
168
|
+
return "".concat(start_date).concat(start_time).concat(end_date).concat(end_time);
|
|
159
169
|
}
|
|
160
170
|
}, {
|
|
161
171
|
title: bookingLabels.customer,
|
|
162
|
-
dataIndex: 'order',
|
|
163
172
|
key: 'customer',
|
|
164
173
|
align: 'center',
|
|
165
174
|
width: 150,
|
|
166
|
-
|
|
175
|
+
uniformCompare: function uniformCompare(_, record) {
|
|
176
|
+
var value = record.order;
|
|
177
|
+
var customer = value === null || value === void 0 ? void 0 : value.customer;
|
|
178
|
+
if (!customer) return '-';
|
|
179
|
+
var guestCode = customer === null || customer === void 0 ? void 0 : customer.guest_code;
|
|
180
|
+
if (guestCode) return "".concat(guestCode);
|
|
181
|
+
if (customer.user_id === 1) return 'walk-in'; // 返回任意固定值即可
|
|
182
|
+
return customer;
|
|
183
|
+
},
|
|
184
|
+
render: function render(_, record) {
|
|
185
|
+
var value = record.order;
|
|
167
186
|
var customer = value === null || value === void 0 ? void 0 : value.customer;
|
|
187
|
+
var guestCode = customer === null || customer === void 0 ? void 0 : customer.guest_code;
|
|
188
|
+
if (guestCode) {
|
|
189
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
style: {
|
|
191
|
+
display: 'flex',
|
|
192
|
+
flexDirection: 'column',
|
|
193
|
+
alignItems: 'center',
|
|
194
|
+
textAlign: 'center'
|
|
195
|
+
}
|
|
196
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
197
|
+
style: {
|
|
198
|
+
fontWeight: 'bold'
|
|
199
|
+
}
|
|
200
|
+
}, bookingLabels.guest));
|
|
201
|
+
}
|
|
168
202
|
var phone = formatPhone((customer === null || customer === void 0 ? void 0 : customer.phone) || (record === null || record === void 0 ? void 0 : record.phone), (customer === null || customer === void 0 ? void 0 : customer.country_calling_code) || (record === null || record === void 0 ? void 0 : record.country_calling_code));
|
|
169
203
|
var email = customer === null || customer === void 0 ? void 0 : customer.email;
|
|
170
204
|
var lines = getDisplayLines([phone, email]);
|
|
@@ -189,12 +223,19 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
189
223
|
}
|
|
190
224
|
}, {
|
|
191
225
|
title: bookingLabels.contact,
|
|
192
|
-
dataIndex: 'order',
|
|
193
226
|
key: 'contact',
|
|
194
227
|
align: 'center',
|
|
195
228
|
width: 150,
|
|
196
|
-
|
|
197
|
-
var
|
|
229
|
+
uniformCompare: function uniformCompare(_, record) {
|
|
230
|
+
var value = record.order;
|
|
231
|
+
var contactValue = value === null || value === void 0 ? void 0 : value.contacts_info;
|
|
232
|
+
if (!contactValue) return '-';
|
|
233
|
+
return contactValue;
|
|
234
|
+
},
|
|
235
|
+
render: function render(_, record) {
|
|
236
|
+
var value = record.order;
|
|
237
|
+
var contactValue = value === null || value === void 0 ? void 0 : value.contacts_info;
|
|
238
|
+
if (!contactValue) return '-';
|
|
198
239
|
var phone = formatPhone(contactValue === null || contactValue === void 0 ? void 0 : contactValue.phone);
|
|
199
240
|
var lines = getDisplayLines([phone, contactValue === null || contactValue === void 0 ? void 0 : contactValue.email]);
|
|
200
241
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -222,6 +263,10 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
222
263
|
key: 'holder_data',
|
|
223
264
|
align: 'center',
|
|
224
265
|
width: 110,
|
|
266
|
+
uniformCompare: function uniformCompare(value, record) {
|
|
267
|
+
if (!value) return '-';
|
|
268
|
+
return value;
|
|
269
|
+
},
|
|
225
270
|
render: function render(value, record) {
|
|
226
271
|
var _holderValue$data;
|
|
227
272
|
if (!value) return '-';
|
|
@@ -288,16 +333,18 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
288
333
|
style: textStyles.text
|
|
289
334
|
}, line);
|
|
290
335
|
}));
|
|
336
|
+
},
|
|
337
|
+
uniformCompare: function uniformCompare(_value, record) {
|
|
338
|
+
return (record === null || record === void 0 ? void 0 : record.order_detail) || '';
|
|
291
339
|
}
|
|
292
340
|
}, {
|
|
293
341
|
title: bookingLabels.pax,
|
|
294
342
|
dataIndex: 'number',
|
|
295
|
-
key: '
|
|
343
|
+
key: 'number',
|
|
296
344
|
align: 'center',
|
|
297
345
|
width: 110,
|
|
298
|
-
render: function render(
|
|
299
|
-
var
|
|
300
|
-
var count = (_ref2 = value !== null && value !== void 0 ? value : record === null || record === void 0 ? void 0 : record.pax) !== null && _ref2 !== void 0 ? _ref2 : record === null || record === void 0 ? void 0 : record.people_count;
|
|
346
|
+
render: function render(_, record) {
|
|
347
|
+
var count = record === null || record === void 0 ? void 0 : record.number;
|
|
301
348
|
return /*#__PURE__*/React.createElement("span", {
|
|
302
349
|
style: _objectSpread(_objectSpread({}, textStyles.text), {}, {
|
|
303
350
|
textAlign: 'center'
|
|
@@ -310,29 +357,21 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
310
357
|
key: 'relation_form_name',
|
|
311
358
|
align: 'center',
|
|
312
359
|
width: 100,
|
|
313
|
-
render: function render(value
|
|
360
|
+
render: function render(value) {
|
|
314
361
|
if (!value) return '-';
|
|
315
362
|
return /*#__PURE__*/React.createElement("div", {
|
|
316
|
-
style: {
|
|
317
|
-
display: 'flex',
|
|
318
|
-
flexDirection: 'column',
|
|
319
|
-
alignItems: 'center',
|
|
320
|
-
textAlign: 'center'
|
|
321
|
-
}
|
|
322
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
323
363
|
style: textStyles.text
|
|
324
|
-
}, value)
|
|
364
|
+
}, value);
|
|
325
365
|
}
|
|
326
366
|
}, {
|
|
327
367
|
title: bookingLabels.forms,
|
|
328
|
-
dataIndex: 'appointment_form',
|
|
329
368
|
key: 'appointment_form',
|
|
330
369
|
// width: 128,
|
|
331
370
|
align: 'center',
|
|
332
|
-
render: function render(
|
|
371
|
+
render: function render(_, record) {
|
|
333
372
|
var _record$order4;
|
|
334
373
|
return /*#__PURE__*/React.createElement(BookingFormsPreview, {
|
|
335
|
-
value:
|
|
374
|
+
value: record === null || record === void 0 ? void 0 : record.appointment_form,
|
|
336
375
|
uniqueTables: uniqueTables,
|
|
337
376
|
bookingLabels: bookingLabels,
|
|
338
377
|
textStyles: textStyles,
|
|
@@ -517,6 +556,7 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
517
556
|
return {
|
|
518
557
|
grid: {
|
|
519
558
|
bordered: true,
|
|
559
|
+
collapseUniformColumns: true,
|
|
520
560
|
columns: buildColumns(ctx),
|
|
521
561
|
defaultHiddenColumnKeys: ['order_origin', 'updated'],
|
|
522
562
|
scroll: {
|
|
@@ -555,8 +595,8 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
555
595
|
}
|
|
556
596
|
},
|
|
557
597
|
callback: function callback(cbParams) {
|
|
558
|
-
var
|
|
559
|
-
type =
|
|
598
|
+
var _ref2 = cbParams || {},
|
|
599
|
+
type = _ref2.type;
|
|
560
600
|
// 打开弹窗前会先调用关闭,打开前调用的关闭不需要响应
|
|
561
601
|
if (Date.now() - time.getTime() < 500) {
|
|
562
602
|
return;
|
|
@@ -589,10 +629,11 @@ export var useBookingPerspective = function useBookingPerspective(params) {
|
|
|
589
629
|
quickFilter: {
|
|
590
630
|
filterList: [{
|
|
591
631
|
type: 'rangePicker',
|
|
592
|
-
name: '
|
|
593
|
-
key: '
|
|
632
|
+
name: 'booking_time_start_between',
|
|
633
|
+
key: 'bookingTimeStartBetween',
|
|
594
634
|
props: {
|
|
595
|
-
placeholder: locales.getText('pisell2.
|
|
635
|
+
placeholder: locales.getText('pisell2.salesManagement.booking.filter.bookingDate.label'),
|
|
636
|
+
showTime: true
|
|
596
637
|
}
|
|
597
638
|
}]
|
|
598
639
|
}
|