@pisell/private-materials 6.6.70 → 6.6.73

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 (27) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/booking/components/footer/index.js +71 -59
  10. package/es/components/booking/components/footer/utils.js +2 -1
  11. package/es/components/booking/info/hooks/useAddHolder.js +1 -0
  12. package/es/components/booking/info/main.js +2 -1
  13. package/es/components/booking/info2/index.js +2 -1
  14. package/es/components/booking/utils/holderAssignmentConfirmModal.d.ts +7 -0
  15. package/es/components/booking/utils/holderAssignmentConfirmModal.js +403 -0
  16. package/es/components/eftposPay/hooks.d.ts +1 -1
  17. package/es/components/eftposPay/store/index.d.ts +2 -2
  18. package/lib/components/booking/components/footer/index.js +26 -20
  19. package/lib/components/booking/components/footer/utils.js +1 -1
  20. package/lib/components/booking/info/hooks/useAddHolder.js +1 -0
  21. package/lib/components/booking/info/main.js +2 -1
  22. package/lib/components/booking/info2/index.js +2 -1
  23. package/lib/components/booking/utils/holderAssignmentConfirmModal.d.ts +7 -0
  24. package/lib/components/booking/utils/holderAssignmentConfirmModal.js +374 -0
  25. package/lib/components/eftposPay/hooks.d.ts +1 -1
  26. package/lib/components/eftposPay/store/index.d.ts +2 -2
  27. package/package.json +1 -1
@@ -0,0 +1,403 @@
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ 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."); }
4
+ 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; } }
5
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
6
+ 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; }
7
+ 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); } }
8
+ 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); }); }; }
9
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
13
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
+ 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); }
17
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
+ 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; }
20
+ import React, { useContext, useLayoutEffect, useRef, useState } from 'react';
21
+ import { Button, Modal } from 'antd';
22
+ import { useDebounceFn } from 'ahooks';
23
+ import { locales, getUniqueId } from '@pisell/utils';
24
+ import { PisellContainer } from '@pisell/materials';
25
+ import Lists from "../info/service/Lists";
26
+ import { Context } from "../info/model";
27
+ import { isNormalProductByDurationSchedule } from "../info/service2/utils";
28
+ import { selectHolderModal, SelectHolderModal } from "./selectHolderModal";
29
+ import { genHolderKey } from "../../ticketBooking/utils";
30
+ import "./confirmHolderModal.less";
31
+ var activeHolderAssignmentConfirm = null;
32
+ var holderAssignmentConfirmSubscribers = new Set();
33
+ function notifyHolderAssignmentConfirmHost(request) {
34
+ var handledCount = 0;
35
+ holderAssignmentConfirmSubscribers.forEach(function (subscriber) {
36
+ if (subscriber(request)) {
37
+ handledCount += 1;
38
+ }
39
+ });
40
+ return handledCount;
41
+ }
42
+ function settleHolderAssignmentConfirmRequest(request, shouldContinue) {
43
+ if (request.settled) {
44
+ return;
45
+ }
46
+ request.settled = true;
47
+ if (activeHolderAssignmentConfirm === request) {
48
+ activeHolderAssignmentConfirm = null;
49
+ }
50
+ request.resolve(shouldContinue);
51
+ notifyHolderAssignmentConfirmHost(null);
52
+ }
53
+
54
+ /**
55
+ * 计算保存前仍未分配 holder 的商品数量。
56
+ */
57
+ function calculateUnassignedHolderCount(state) {
58
+ var _state$service;
59
+ var unassignedProducts = ((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || []).filter(function (item) {
60
+ var _item$_extend, _item$_extend2;
61
+ return (!((_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.holder_id) || ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.holder_id) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.length) === 0) && !isNormalProductByDurationSchedule(item);
62
+ });
63
+ var arr = [];
64
+ unassignedProducts.forEach(function (item) {
65
+ var _item$_extend3;
66
+ if (item !== null && item !== void 0 && (_item$_extend3 = item._extend) !== null && _item$_extend3 !== void 0 && _item$_extend3.groupId) {
67
+ if (!arr.some(function (sub) {
68
+ var _sub$_extend, _item$_extend4;
69
+ return (sub === null || sub === void 0 || (_sub$_extend = sub._extend) === null || _sub$_extend === void 0 ? void 0 : _sub$_extend.groupId) === (item === null || item === void 0 || (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.groupId);
70
+ })) {
71
+ arr.push(item);
72
+ }
73
+ } else {
74
+ arr.push(item);
75
+ }
76
+ });
77
+ return arr.reduce(function (sum, item) {
78
+ var _item$_extend5;
79
+ return sum + (((_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.quantity) || 1);
80
+ }, 0);
81
+ }
82
+ function hasHolderId(item) {
83
+ var _item$_extend6;
84
+ var holderId = item === null || item === void 0 || (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.holder_id;
85
+ return Array.isArray(holderId) ? holderId.length > 0 : Boolean(holderId);
86
+ }
87
+ function updateProductHolder(state, currentItem, holderIds) {
88
+ var _state$service2, _cacheItem$_extend, _cacheItem$_extend2, _cacheItem$_extend3, _cacheItem$_extend4;
89
+ var list = _toConsumableArray((state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value) || []);
90
+ var cacheItem = _objectSpread(_objectSpread({}, currentItem), {}, {
91
+ _extend: _objectSpread(_objectSpread({}, (currentItem === null || currentItem === void 0 ? void 0 : currentItem._extend) || {}), {}, {
92
+ holder_id: holderIds
93
+ })
94
+ });
95
+ if (cacheItem !== null && cacheItem !== void 0 && (_cacheItem$_extend = cacheItem._extend) !== null && _cacheItem$_extend !== void 0 && _cacheItem$_extend.groupId) {
96
+ var groupId = cacheItem._extend.groupId;
97
+ list.forEach(function (item, index) {
98
+ var _item$_extend7;
99
+ if ((item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.groupId) === groupId) {
100
+ list[index] = _objectSpread(_objectSpread({}, item), {}, {
101
+ _extend: _objectSpread(_objectSpread({}, item._extend || {}), {}, {
102
+ holder_id: holderIds
103
+ })
104
+ });
105
+ }
106
+ });
107
+ } else {
108
+ var index = list.findIndex(function (item) {
109
+ return item._id === cacheItem._id;
110
+ });
111
+ if (index !== -1) {
112
+ list[index] = cacheItem;
113
+ }
114
+ }
115
+ if (((_cacheItem$_extend2 = cacheItem._extend) === null || _cacheItem$_extend2 === void 0 || (_cacheItem$_extend2 = _cacheItem$_extend2.holder_id) === null || _cacheItem$_extend2 === void 0 ? void 0 : _cacheItem$_extend2.length) > 1 || ((_cacheItem$_extend3 = cacheItem._extend) === null || _cacheItem$_extend3 === void 0 ? void 0 : _cacheItem$_extend3.quantity) > 1 && ((_cacheItem$_extend4 = cacheItem._extend) === null || _cacheItem$_extend4 === void 0 || (_cacheItem$_extend4 = _cacheItem$_extend4.holder_id) === null || _cacheItem$_extend4 === void 0 ? void 0 : _cacheItem$_extend4.length) >= 1) {
116
+ var remainingHolderIds = cacheItem._extend.holder_id;
117
+ cacheItem._extend.holder_id = [remainingHolderIds[0]];
118
+ remainingHolderIds = remainingHolderIds.slice(1);
119
+ cacheItem._holderKey = genHolderKey(cacheItem);
120
+ remainingHolderIds.forEach(function (holderId) {
121
+ var newItem = _objectSpread(_objectSpread({}, cacheItem), {}, {
122
+ _id: getUniqueId(),
123
+ _extend: _objectSpread(_objectSpread({}, cacheItem._extend), {}, {
124
+ holder_id: [holderId],
125
+ quantity: 1
126
+ })
127
+ });
128
+ newItem._holderKey = genHolderKey(newItem);
129
+ list.unshift(newItem);
130
+ cacheItem._extend.quantity -= 1;
131
+ });
132
+ if (cacheItem._extend.quantity > 1) {
133
+ var newItem = _objectSpread(_objectSpread({}, cacheItem), {}, {
134
+ _id: getUniqueId(),
135
+ _extend: _objectSpread(_objectSpread({}, cacheItem._extend), {}, {
136
+ holder_id: undefined,
137
+ quantity: cacheItem._extend.quantity - 1
138
+ })
139
+ });
140
+ newItem._holderKey = genHolderKey(newItem);
141
+ list.unshift(newItem);
142
+ cacheItem._extend.quantity = 1;
143
+ }
144
+ }
145
+ return list.sort(function (a, b) {
146
+ if (!hasHolderId(a) && hasHolderId(b)) return -1;
147
+ if (hasHolderId(a) && !hasHolderId(b)) return 1;
148
+ return 0;
149
+ });
150
+ }
151
+
152
+ /**
153
+ * 保存前 holder 分配确认弹窗,只处理未分配 holder 的确认流程。
154
+ */
155
+ var HolderAssignmentConfirmContent = function HolderAssignmentConfirmContent(_ref) {
156
+ var _state$bookingConfig2;
157
+ var state = _ref.state,
158
+ dispatch = _ref.dispatch,
159
+ open = _ref.open,
160
+ onResolve = _ref.onResolve,
161
+ onStateChange = _ref.onStateChange;
162
+ var handleClose = function handleClose() {
163
+ if (!open) {
164
+ return;
165
+ }
166
+ Modal.confirm({
167
+ title: locales.getText('pisell2.text.deposit-delete-message-title'),
168
+ content: locales.getText('pisell2.text.close-confirm-message'),
169
+ okText: locales.getText('pisell2.text.confirm'),
170
+ cancelText: locales.getText('pisell2.text.cancel'),
171
+ centered: true,
172
+ onOk: onResolve
173
+ });
174
+ };
175
+ var _useDebounceFn = useDebounceFn(handleClose, {
176
+ wait: 500,
177
+ leading: true,
178
+ trailing: false
179
+ }),
180
+ debouncedHandleClose = _useDebounceFn.run;
181
+ var syncServiceValueChange = function syncServiceValueChange(nextServiceState) {
182
+ var nextValue = nextServiceState === null || nextServiceState === void 0 ? void 0 : nextServiceState.value;
183
+ if (!Array.isArray(nextValue)) {
184
+ return false;
185
+ }
186
+ var nextService = _objectSpread(_objectSpread(_objectSpread({}, state.service), nextServiceState), {}, {
187
+ value: nextValue,
188
+ edit: true
189
+ });
190
+ var nextState = _objectSpread(_objectSpread({}, state), {}, {
191
+ service: nextService
192
+ });
193
+ dispatch({
194
+ type: 'setService',
195
+ payload: nextService
196
+ });
197
+ onStateChange(nextState);
198
+ return true;
199
+ };
200
+ var handleListChange = /*#__PURE__*/function () {
201
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(nextServiceState) {
202
+ var _state$bookingConfig, _currentItem$_extend, _currentItem$_extend2;
203
+ var hasSyncedServiceValue, currentItem, holderConfig, currentMaxSelectedCount, currentHolderId, initialValue, result, nextValue, nextState;
204
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
205
+ while (1) switch (_context.prev = _context.next) {
206
+ case 0:
207
+ hasSyncedServiceValue = syncServiceValueChange(nextServiceState);
208
+ if (!hasSyncedServiceValue) {
209
+ _context.next = 3;
210
+ break;
211
+ }
212
+ return _context.abrupt("return");
213
+ case 3:
214
+ if (state !== null && state !== void 0 && state.isBookingTicket2) {
215
+ _context.next = 5;
216
+ break;
217
+ }
218
+ return _context.abrupt("return");
219
+ case 5:
220
+ currentItem = nextServiceState === null || nextServiceState === void 0 ? void 0 : nextServiceState.cacheItem;
221
+ if (currentItem) {
222
+ _context.next = 8;
223
+ break;
224
+ }
225
+ return _context.abrupt("return");
226
+ case 8:
227
+ holderConfig = (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.holder) || {};
228
+ currentMaxSelectedCount = (holderConfig === null || holderConfig === void 0 ? void 0 : holderConfig.maxSelectedCount) || (currentItem === null || currentItem === void 0 || (_currentItem$_extend = currentItem._extend) === null || _currentItem$_extend === void 0 ? void 0 : _currentItem$_extend.quantity) || 1;
229
+ currentHolderId = currentItem === null || currentItem === void 0 || (_currentItem$_extend2 = currentItem._extend) === null || _currentItem$_extend2 === void 0 ? void 0 : _currentItem$_extend2.holder_id;
230
+ initialValue = currentHolderId ? Array.isArray(currentHolderId) ? currentHolderId : [currentHolderId] : undefined;
231
+ _context.next = 14;
232
+ return selectHolderModal({
233
+ state: state,
234
+ dispatch: dispatch,
235
+ initialValue: initialValue,
236
+ maxSelectedCount: currentMaxSelectedCount
237
+ });
238
+ case 14:
239
+ result = _context.sent;
240
+ if (result !== null && result !== void 0 && result.length) {
241
+ _context.next = 17;
242
+ break;
243
+ }
244
+ return _context.abrupt("return");
245
+ case 17:
246
+ nextValue = updateProductHolder(state, currentItem, result);
247
+ nextState = _objectSpread(_objectSpread({}, state), {}, {
248
+ service: _objectSpread(_objectSpread({}, state.service), {}, {
249
+ value: nextValue,
250
+ edit: true
251
+ })
252
+ });
253
+ dispatch({
254
+ type: 'setService',
255
+ payload: nextState.service
256
+ });
257
+ onStateChange(nextState);
258
+ case 21:
259
+ case "end":
260
+ return _context.stop();
261
+ }
262
+ }, _callee);
263
+ }));
264
+ return function handleListChange(_x) {
265
+ return _ref2.apply(this, arguments);
266
+ };
267
+ }();
268
+ if (!open) {
269
+ return null;
270
+ }
271
+ var unassignedCount = calculateUnassignedHolderCount(state);
272
+ var title = locales.getText('pisell2.text.holder-unassigned')(unassignedCount);
273
+ var hintText = locales.getText('pisell2.text.press-card-assign-holder');
274
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PisellContainer, {
275
+ renderType: "modal",
276
+ props: {
277
+ open: open,
278
+ onCancel: debouncedHandleClose,
279
+ title: title,
280
+ footer: null,
281
+ platform: 'pc',
282
+ width: 800,
283
+ destroyOnClose: true,
284
+ maskClosable: false,
285
+ closable: true
286
+ }
287
+ }, /*#__PURE__*/React.createElement("div", {
288
+ className: "confirm-holder-modal-content"
289
+ }, /*#__PURE__*/React.createElement("div", {
290
+ className: "confirm-holder-modal-hint"
291
+ }, hintText), /*#__PURE__*/React.createElement("div", {
292
+ className: "confirm-holder-modal-service"
293
+ }, /*#__PURE__*/React.createElement(Lists, {
294
+ isParallelResource: true,
295
+ isShowDelete: false,
296
+ isShowAmountFooter: false,
297
+ onChange: handleListChange
298
+ })), /*#__PURE__*/React.createElement("div", {
299
+ className: "confirm-holder-modal-footer"
300
+ }, (state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.subject_require) !== 'require' ? /*#__PURE__*/React.createElement(Button, {
301
+ onClick: onResolve,
302
+ className: "skip-button",
303
+ size: "large"
304
+ }, locales.getText('pisell2.text.skip-for-now')) : null, /*#__PURE__*/React.createElement(Button, {
305
+ type: "primary",
306
+ onClick: onResolve,
307
+ className: "confirm-button"
308
+ }, locales.getText('pisell2.text.confirm'))))), !(state !== null && state !== void 0 && state.isBookingTicket2) ? /*#__PURE__*/React.createElement(SelectHolderModal, null) : null);
309
+ };
310
+ export var HolderAssignmentConfirmModal = function HolderAssignmentConfirmModal() {
311
+ var bookingContext = useContext(Context);
312
+ var _useState = useState(false),
313
+ _useState2 = _slicedToArray(_useState, 2),
314
+ open = _useState2[0],
315
+ setOpen = _useState2[1];
316
+ var _useState3 = useState(null),
317
+ _useState4 = _slicedToArray(_useState3, 2),
318
+ request = _useState4[0],
319
+ setRequest = _useState4[1];
320
+ var _useState5 = useState(null),
321
+ _useState6 = _slicedToArray(_useState5, 2),
322
+ modalState = _useState6[0],
323
+ setModalState = _useState6[1];
324
+ var requestRef = useRef(null);
325
+ var bookingContextRef = useRef(bookingContext);
326
+ requestRef.current = request;
327
+ bookingContextRef.current = bookingContext;
328
+ var handleResolve = function handleResolve() {
329
+ setOpen(false);
330
+ var currentRequest = requestRef.current;
331
+ if (currentRequest) {
332
+ settleHolderAssignmentConfirmRequest(currentRequest, true);
333
+ }
334
+ setTimeout(function () {
335
+ setRequest(null);
336
+ }, 300);
337
+ };
338
+ useLayoutEffect(function () {
339
+ var subscriber = function subscriber(nextRequest) {
340
+ var _bookingContextRef$cu;
341
+ if (!nextRequest) {
342
+ setOpen(false);
343
+ setTimeout(function () {
344
+ setRequest(null);
345
+ }, 300);
346
+ return false;
347
+ }
348
+ if (nextRequest.state !== ((_bookingContextRef$cu = bookingContextRef.current) === null || _bookingContextRef$cu === void 0 ? void 0 : _bookingContextRef$cu.state)) {
349
+ return false;
350
+ }
351
+ setRequest(nextRequest);
352
+ setModalState(nextRequest.state);
353
+ setOpen(true);
354
+ return true;
355
+ };
356
+ holderAssignmentConfirmSubscribers.add(subscriber);
357
+ return function () {
358
+ holderAssignmentConfirmSubscribers.delete(subscriber);
359
+ var currentRequest = requestRef.current;
360
+ if (currentRequest) {
361
+ settleHolderAssignmentConfirmRequest(currentRequest, false);
362
+ }
363
+ };
364
+ }, []);
365
+ if (!request || !modalState) {
366
+ return null;
367
+ }
368
+ return /*#__PURE__*/React.createElement(Context.Provider, {
369
+ value: {
370
+ state: modalState,
371
+ dispatch: bookingContext === null || bookingContext === void 0 ? void 0 : bookingContext.dispatch
372
+ }
373
+ }, /*#__PURE__*/React.createElement(HolderAssignmentConfirmContent, {
374
+ state: modalState,
375
+ dispatch: bookingContext === null || bookingContext === void 0 ? void 0 : bookingContext.dispatch,
376
+ open: open,
377
+ onResolve: handleResolve,
378
+ onStateChange: setModalState
379
+ }));
380
+ };
381
+
382
+ /**
383
+ * 通过 await 调起保存前 holder 分配确认弹窗。
384
+ */
385
+ export function showHolderAssignmentConfirmModal(state) {
386
+ if (activeHolderAssignmentConfirm) {
387
+ settleHolderAssignmentConfirmRequest(activeHolderAssignmentConfirm, false);
388
+ }
389
+ return new Promise(function (resolve) {
390
+ var request = {
391
+ id: Symbol('HolderAssignmentConfirmRequest'),
392
+ state: state,
393
+ resolve: resolve,
394
+ settled: false
395
+ };
396
+ activeHolderAssignmentConfirm = request;
397
+ var handledCount = notifyHolderAssignmentConfirmHost(request);
398
+ if (handledCount === 0) {
399
+ console.warn('HolderAssignmentConfirmModal host is not mounted. Please render <HolderAssignmentConfirmModal /> in your booking component tree.');
400
+ settleHolderAssignmentConfirmRequest(request, false);
401
+ }
402
+ });
403
+ }
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
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<"stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "mx51" | "payo" | "linkly" | "huifu">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -299,8 +299,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
299
299
  amount?: string | number | undefined;
300
300
  mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
301
301
  order_id?: string | number | undefined;
302
- eftpos?: "stripe" | "tyro" | "mx51" | "payo" | "windcave" | "linkly" | "huifu" | undefined;
303
- action?: "pay" | "amount" | "deviceList" | undefined;
302
+ eftpos?: "stripe" | "tyro" | "windcave" | "mx51" | "payo" | "linkly" | "huifu" | undefined;
303
+ action?: "amount" | "pay" | "deviceList" | undefined;
304
304
  key?: number | undefined;
305
305
  step?: number | undefined;
306
306
  title?: string | undefined;
@@ -51,7 +51,7 @@ var import_index = require("./index.less");
51
51
  var import_serve2 = require("./serve");
52
52
  var import_utils3 = require("./utils");
53
53
  var import_noteModal = __toESM(require("../../../../plus/noteModal"));
54
- var import_confirmHolderModal = require("../../utils/confirmHolderModal");
54
+ var import_holderAssignmentConfirmModal = require("../../utils/holderAssignmentConfirmModal");
55
55
  var import__ = require("../../../../index");
56
56
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
57
57
  var import_dayjs = __toESM(require("dayjs"));
@@ -72,6 +72,8 @@ var Footer = (props) => {
72
72
  const [isPaymentModalOpen, setIsPaymentModalOpen] = (0, import_react.useState)(false);
73
73
  const [paymentModalData, setPaymentModalData] = (0, import_react.useState)(null);
74
74
  const [paymentCallback, setPaymentCallback] = (0, import_react.useState)(null);
75
+ const stateRef = (0, import_react.useRef)(state);
76
+ stateRef.current = state;
75
77
  const [editOrderId, setEditOrderId] = (0, import_react.useState)(0);
76
78
  const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
77
79
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
@@ -618,23 +620,26 @@ var Footer = (props) => {
618
620
  messageShow = true,
619
621
  noSubmit = false
620
622
  }) => {
621
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
622
- const isToastMode = ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
623
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2;
624
+ let submitState = stateRef.current;
625
+ const isToastMode = ((_c2 = (_b2 = (_a2 = submitState == null ? void 0 : submitState.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.payment_setting) == null ? void 0 : _c2.payment_result_display_mode) !== "modal";
623
626
  if (isToastMode) {
624
627
  (0, import_PaymentResultToast.closeAllPaymentResultToasts)();
625
628
  }
626
- if ((0, import_utils2.isDayBooking)(state)) {
629
+ if ((0, import_utils2.isDayBooking)(submitState)) {
627
630
  const isHasDayProducts = handleDaySubmit();
628
631
  if (isHasDayProducts) return;
629
632
  }
630
- const hasUnspecifiedHolderProduct = (_d2 = state.service.value) == null ? void 0 : _d2.some((item) => {
633
+ const hasUnspecifiedHolderProduct = (_e2 = (_d2 = submitState.service) == null ? void 0 : _d2.value) == null ? void 0 : _e2.some((item) => {
631
634
  var _a3, _b3, _c3;
632
635
  return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
633
636
  });
634
- if (!(0, import_utils4.isWalkIn)((_f2 = (_e2 = state.client) == null ? void 0 : _e2.value) == null ? void 0 : _f2.id) && (0, import_utils2.getIsSubjectRequire)(state) && hasUnspecifiedHolderProduct) {
635
- await (0, import_confirmHolderModal.showConfirmHolderModal)(state, dispatch);
637
+ if (!(0, import_utils4.isWalkIn)((_g2 = (_f2 = submitState.client) == null ? void 0 : _f2.value) == null ? void 0 : _g2.id) && (0, import_utils2.getIsSubjectRequire)(submitState) && hasUnspecifiedHolderProduct) {
638
+ const shouldContinue = await (0, import_holderAssignmentConfirmModal.showHolderAssignmentConfirmModal)(submitState);
639
+ if (!shouldContinue) return;
640
+ submitState = stateRef.current;
636
641
  }
637
- if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
642
+ if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(submitState) && (0, import_utils3.checkHolderIsError)(submitState)) {
638
643
  return;
639
644
  }
640
645
  let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
@@ -643,15 +648,16 @@ var Footer = (props) => {
643
648
  _setLoading(false);
644
649
  }, 2e4);
645
650
  const { createBooking, editBooking } = getApis();
646
- const editApi = state.renderType === "eventBooking" ? import_serve2.editEventBooking : editBooking;
647
- const createApi = state.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
651
+ const editApi = submitState.renderType === "eventBooking" ? import_serve2.editEventBooking : editBooking;
652
+ const createApi = submitState.renderType === "eventBooking" ? import_serve2.createEventBooking : createBooking;
648
653
  let saveOtherValue = {};
649
654
  if (type === "save") {
650
- saveOtherValue = await ((_g2 = state == null ? void 0 : state.onSave) == null ? void 0 : _g2.call(state, state.client)) || {};
655
+ saveOtherValue = await ((_h2 = submitState == null ? void 0 : submitState.onSave) == null ? void 0 : _h2.call(submitState, submitState.client)) || {};
656
+ submitState = stateRef.current;
651
657
  }
652
658
  try {
653
659
  let callbackData = null;
654
- let values = (0, import_utils3.formatValues)({ ...state, ...saveOtherValue });
660
+ let values = (0, import_utils3.formatValues)({ ...submitState, ...saveOtherValue });
655
661
  values.product_tax_fee = total.tax || 0;
656
662
  if (noSubmit) {
657
663
  return values;
@@ -673,19 +679,19 @@ var Footer = (props) => {
673
679
  });
674
680
  const res = await checkout.manualSyncOrderAsync();
675
681
  if (res.success) {
676
- state == null ? void 0 : state.callback(res, type);
682
+ submitState == null ? void 0 : submitState.callback(res, type);
677
683
  _setLoading(false);
678
684
  }
679
685
  return;
680
686
  }
681
- if (type === "save" && !state.bookingId) {
687
+ if (type === "save" && !submitState.bookingId) {
682
688
  const isNeedDeposit = checkout.checkIsNeedDepositAsync(values.bookings, values.relation_products);
683
689
  if (isNeedDeposit == null ? void 0 : isNeedDeposit.hasDeposit) {
684
690
  values.is_deposit = 1;
685
691
  values.deposit_amount = isNeedDeposit == null ? void 0 : isNeedDeposit.total;
686
692
  }
687
693
  }
688
- let api = state.bookingId ? editApi : createApi;
694
+ let api = submitState.bookingId ? editApi : createApi;
689
695
  (0, import_utils.sendWarningLog)({
690
696
  title: "saveBooking",
691
697
  content: [
@@ -693,7 +699,7 @@ var Footer = (props) => {
693
699
  { key: "日期", value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm") },
694
700
  {
695
701
  key: "店铺id",
696
- value: (_k2 = (_j2 = (_i2 = (_h2 = store == null ? void 0 : store.getState) == null ? void 0 : _h2.call(store)) == null ? void 0 : _i2.global) == null ? void 0 : _j2.globalConfig) == null ? void 0 : _k2.id
702
+ value: (_l2 = (_k2 = (_j2 = (_i2 = store == null ? void 0 : store.getState) == null ? void 0 : _i2.call(store)) == null ? void 0 : _j2.global) == null ? void 0 : _k2.globalConfig) == null ? void 0 : _l2.id
697
703
  },
698
704
  {
699
705
  key: "shopApi",
@@ -710,16 +716,16 @@ var Footer = (props) => {
710
716
  await handleSaveAddons();
711
717
  }
712
718
  if (infoEdit) {
713
- callbackData = await api(values, state.bookingId || editOrderId);
719
+ callbackData = await api(values, submitState.bookingId || editOrderId);
714
720
  if (messageShow) {
715
721
  import_antd.message.success(
716
722
  import_utils.locales.getText(
717
- state.bookingId ? "pisell2.text.appointment-updated" : "pisell2.text.created-successfully"
723
+ submitState.bookingId ? "pisell2.text.appointment-updated" : "pisell2.text.created-successfully"
718
724
  )
719
725
  );
720
726
  }
721
727
  }
722
- state == null ? void 0 : state.callback(callbackData, type);
728
+ submitState == null ? void 0 : submitState.callback(callbackData, type);
723
729
  clearTimeout(loadingTimer);
724
730
  _setLoading(false);
725
731
  return callbackData || values;
@@ -1482,6 +1488,6 @@ var Footer = (props) => {
1482
1488
  }
1483
1489
  }
1484
1490
  }
1485
- ), /* @__PURE__ */ import_react.default.createElement(import_confirmHolderModal.ConfirmHolderModal, null));
1491
+ ));
1486
1492
  };
1487
1493
  var footer_default = Footer;
@@ -132,7 +132,7 @@ var formatProductBundle = (bundle) => {
132
132
  "price": Number(d == null ? void 0 : d.product_price),
133
133
  "price_type": d == null ? void 0 : d.price_type,
134
134
  "price_type_ext": d == null ? void 0 : d.price_type_ext,
135
- "custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
135
+ "custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default((d == null ? void 0 : d.original_price) ?? (d == null ? void 0 : d.product_price)).sub(option_price).toNumber()).toFixed(2),
136
136
  "custom_price_type": d == null ? void 0 : d.price_type,
137
137
  "option": option,
138
138
  "bundle_selling_price": Math.abs(d == null ? void 0 : d.price),
@@ -92,6 +92,7 @@ var useAddHolder = (state, dispatch) => {
92
92
  const handleAddHolder = (products, currentItem) => {
93
93
  var _a, _b, _c, _d, _e;
94
94
  let _data = {
95
+ zIndex: 1300,
95
96
  formDataConfig: isMinorAndWaiver ? { ...waiverForm, customer_id: (_b = (_a = state.client) == null ? void 0 : _a.value) == null ? void 0 : _b.id, is_franchisor: formDataConfig.is_franchisor } : { ...formDataConfig }
96
97
  };
97
98
  const isWalkInBol = (0, import_utils.isWalkIn)((_d = (_c = state.client) == null ? void 0 : _c.value) == null ? void 0 : _d.id);
@@ -55,6 +55,7 @@ var import_notes = __toESM(require("./notes"));
55
55
  var import_service2 = require("./service2");
56
56
  var import_utils3 = require("./service2/utils");
57
57
  var import_contactInfoMode = __toESM(require("../info2/service/contactInfoMode"));
58
+ var import_holderAssignmentConfirmModal = require("../utils/holderAssignmentConfirmModal");
58
59
  var defaultModules = {
59
60
  client: 1,
60
61
  date: 1,
@@ -148,7 +149,7 @@ var Info = (0, import_model.Provider)((props) => {
148
149
  globalState.render,
149
150
  (_f = (_e = modal.state) == null ? void 0 : _e.notes) == null ? void 0 : _f.orderNote
150
151
  ]);
151
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
152
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_holderAssignmentConfirmModal.HolderAssignmentConfirmModal, null), !!modal.state.setGlobalState ? /* @__PURE__ */ import_react.default.createElement(
152
153
  import_tabPane.default,
153
154
  {
154
155
  style: {
@@ -61,6 +61,7 @@ var import_ahooks = require("ahooks");
61
61
  var import_cartClientCard = __toESM(require("./cartClientCard"));
62
62
  var import_materials = require("@pisell/materials");
63
63
  var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
64
+ var import_holderAssignmentConfirmModal = require("../utils/holderAssignmentConfirmModal");
64
65
  var defaultModules = {
65
66
  client: 1,
66
67
  date: 1,
@@ -261,7 +262,7 @@ var Info = (0, import_model.Provider)((props) => {
261
262
  wait: 300
262
263
  }
263
264
  );
264
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
265
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_holderAssignmentConfirmModal.HolderAssignmentConfirmModal, null), /* @__PURE__ */ import_react.default.createElement(
265
266
  import_reloadResourceModal.default,
266
267
  {
267
268
  modal,
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './confirmHolderModal.less';
3
+ export declare const HolderAssignmentConfirmModal: React.FC;
4
+ /**
5
+ * 通过 await 调起保存前 holder 分配确认弹窗。
6
+ */
7
+ export declare function showHolderAssignmentConfirmModal(state: any): Promise<boolean>;