@pisell/private-materials 3.0.151 → 3.0.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/es/components/booking/components/footer/index.js +48 -33
- package/es/components/booking/components/footer/utils.js +35 -4
- package/es/components/booking/index.js +1 -1
- package/es/components/booking/info/index.d.ts +4 -12
- package/es/components/booking/info/index.js +12 -122
- package/es/components/booking/info/main.d.ts +12 -0
- package/es/components/booking/info/main.js +124 -0
- package/es/components/booking/info/model.js +0 -1
- package/es/components/booking/info/service/addTimeModal/index.js +4 -4
- package/es/components/booking/info/utils.d.ts +1 -0
- package/es/components/booking/info/utils.js +7 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/index.js +216 -0
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/serve.js +79 -0
- package/es/components/booking/info2/service/actions/index.d.ts +6 -0
- package/es/components/booking/info2/service/actions/index.js +86 -0
- package/es/components/booking/info2/service/addService/index.d.ts +6 -0
- package/es/components/booking/info2/service/addService/index.js +404 -0
- package/es/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/es/components/booking/info2/service/addService/mock.js +332 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/es/components/booking/info2/service/addService/utils.js +510 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +681 -0
- package/es/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/es/components/booking/info2/service/addTimeModal/serve.js +73 -0
- package/es/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/es/components/booking/info2/service/addTimeModal/utils.js +176 -0
- package/es/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Capacity/index.js +121 -0
- package/es/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +28 -0
- package/es/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +233 -0
- package/es/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/es/components/booking/info2/service/editService/index.d.ts +7 -0
- package/es/components/booking/info2/service/editService/index.js +617 -0
- package/es/components/booking/info2/service/editService/index.less +99 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/es/components/booking/info2/service/editService/utils.js +37 -0
- package/es/components/booking/info2/service/index.d.ts +4 -0
- package/es/components/booking/info2/service/index.js +55 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/es/components/booking/info2/service/serviceItem/index.js +176 -0
- package/es/components/booking/info2/service/serviceItem/index.less +125 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/es/components/booking/info2/service/serviceList/index.js +106 -0
- package/es/components/booking/info2/service/serviceList/index.less +0 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/es/components/booking/info2/utilsByBooking.js +349 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +12 -3
- package/es/components/booking/materiels/resources/index.d.ts +2 -2
- package/es/components/booking/materiels/resources/index.js +11 -11
- package/es/components/booking/mock.d.ts +1 -0
- package/es/components/booking/mock.js +66 -0
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/index.d.ts +1 -1
- package/es/components/index.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +28 -5
- package/lib/components/booking/components/footer/utils.js +29 -4
- package/lib/components/booking/index.js +2 -2
- package/lib/components/booking/info/index.d.ts +4 -12
- package/lib/components/booking/info/index.js +14 -115
- package/lib/components/booking/info/main.d.ts +12 -0
- package/lib/components/booking/info/main.js +152 -0
- package/lib/components/booking/info/service/addTimeModal/index.js +1 -0
- package/lib/components/booking/info/utils.d.ts +1 -0
- package/lib/components/booking/info/utils.js +9 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/index.js +202 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/info2/serve.js +53 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +6 -0
- package/lib/components/booking/info2/service/actions/index.js +102 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/index.js +356 -0
- package/lib/components/booking/info2/service/addService/mock.d.ts +214 -0
- package/lib/components/booking/info2/service/addService/mock.js +398 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +71 -0
- package/lib/components/booking/info2/service/addService/utils.js +377 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +4 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +558 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.d.ts +9 -0
- package/lib/components/booking/info2/service/addTimeModal/serve.js +45 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.d.ts +31 -0
- package/lib/components/booking/info2/service/addTimeModal/utils.js +157 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.js +97 -0
- package/lib/components/booking/info2/service/editService/Capacity/index.less +1 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +54 -0
- package/lib/components/booking/info2/service/editService/Resources/index.d.ts +4 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +212 -0
- package/lib/components/booking/info2/service/editService/Resources/index.less +21 -0
- package/lib/components/booking/info2/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info2/service/editService/index.js +483 -0
- package/lib/components/booking/info2/service/editService/index.less +99 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +11 -0
- package/lib/components/booking/info2/service/editService/utils.js +0 -0
- package/lib/components/booking/info2/service/index.d.ts +4 -0
- package/lib/components/booking/info2/service/index.js +75 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +4 -0
- package/lib/components/booking/info2/service/serviceItem/index.js +184 -0
- package/lib/components/booking/info2/service/serviceItem/index.less +125 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +6 -0
- package/lib/components/booking/info2/service/serviceList/index.js +130 -0
- package/lib/components/booking/info2/service/serviceList/index.less +0 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +34 -0
- package/lib/components/booking/info2/utilsByBooking.js +257 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/materiels/resources/index.d.ts +2 -2
- package/lib/components/booking/mock.d.ts +1 -0
- package/lib/components/booking/mock.js +67 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/index.js +3 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
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."); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
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); } }
|
|
13
|
+
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); }); }; }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
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."); }
|
|
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 _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; }
|
|
18
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
import React, { useContext, useEffect, useMemo, useState, useRef } from 'react';
|
|
21
|
+
import SearchLg from '@pisell/icon/es/SearchLg';
|
|
22
|
+
import Drawer from "../../../components/drawer";
|
|
23
|
+
import TabProduct from "../../../components/TabProduct";
|
|
24
|
+
import { Context } from "../../../info/model";
|
|
25
|
+
import AddButton from "../../../components/addButton";
|
|
26
|
+
import { Input, Skeleton } from 'antd';
|
|
27
|
+
import "../../../info/service/addService/index.less";
|
|
28
|
+
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
29
|
+
import { getProductDetail } from "../../../info/service/serve";
|
|
30
|
+
import { getIsBundleOrCombination } from "../../../info/utils";
|
|
31
|
+
import { getProductExtend } from "./utils";
|
|
32
|
+
import { formatProductListByCategory, getProductTotalPrice, request } from "../../../utils";
|
|
33
|
+
import { locales, getUniqueId } from '@pisell/utils';
|
|
34
|
+
import { useUpdateEffect } from 'ahooks';
|
|
35
|
+
var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
|
|
36
|
+
var Info = function Info(_ref) {
|
|
37
|
+
var _state$service2, _state$service4, _state$service5, _state$service5$cache;
|
|
38
|
+
var onEdit = _ref.onEdit;
|
|
39
|
+
var _useState = useState(''),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
search = _useState2[0],
|
|
42
|
+
setSearch = _useState2[1];
|
|
43
|
+
var _useContext = useContext(Context),
|
|
44
|
+
state = _useContext.state,
|
|
45
|
+
dispatch = _useContext.dispatch;
|
|
46
|
+
var _useState3 = useState(false),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
loading = _useState4[0],
|
|
49
|
+
setLoading = _useState4[1];
|
|
50
|
+
var searchRef = useRef();
|
|
51
|
+
var context = useEngineContext();
|
|
52
|
+
request.setRequest(context.appHelper.utils.request);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @title: 如果商品只有一个, 则自动设置默认商品
|
|
56
|
+
* @description:
|
|
57
|
+
* @param {any} list
|
|
58
|
+
* @return {*}
|
|
59
|
+
* @Author: zhiwei.Wang
|
|
60
|
+
* @Date: 2024-05-14 13:55
|
|
61
|
+
*/
|
|
62
|
+
var setDefaultService = /*#__PURE__*/function () {
|
|
63
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(list) {
|
|
64
|
+
var _list, product, detail, isBundleOrCombination, _item;
|
|
65
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
66
|
+
while (1) switch (_context.prev = _context.next) {
|
|
67
|
+
case 0:
|
|
68
|
+
if (!(state.renderType !== 'eventBooking')) {
|
|
69
|
+
_context.next = 2;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
return _context.abrupt("return");
|
|
73
|
+
case 2:
|
|
74
|
+
if (!state.bookingId) {
|
|
75
|
+
_context.next = 4;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
return _context.abrupt("return");
|
|
79
|
+
case 4:
|
|
80
|
+
if (!(list.length !== 1)) {
|
|
81
|
+
_context.next = 6;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
return _context.abrupt("return");
|
|
85
|
+
case 6:
|
|
86
|
+
_list = _toConsumableArray(state.service.value);
|
|
87
|
+
if (!(_list.length !== 0)) {
|
|
88
|
+
_context.next = 9;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
return _context.abrupt("return");
|
|
92
|
+
case 9:
|
|
93
|
+
setLoading(true);
|
|
94
|
+
product = list[0];
|
|
95
|
+
_context.next = 13;
|
|
96
|
+
return getProductDetail(product.id, {
|
|
97
|
+
schedule_date: state.date.value.format('YYYY-MM-DD')
|
|
98
|
+
});
|
|
99
|
+
case 13:
|
|
100
|
+
detail = _context.sent;
|
|
101
|
+
// 商品是套餐或单规格多规格
|
|
102
|
+
isBundleOrCombination = getIsBundleOrCombination(detail.data);
|
|
103
|
+
setLoading(false);
|
|
104
|
+
|
|
105
|
+
// 套餐商品单规格多规格不设置默认
|
|
106
|
+
if (!isBundleOrCombination) {
|
|
107
|
+
_context.next = 18;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
return _context.abrupt("return");
|
|
111
|
+
case 18:
|
|
112
|
+
_item = _objectSpread(_objectSpread({}, product), {}, {
|
|
113
|
+
product_id: product.id,
|
|
114
|
+
_id: getUniqueId(),
|
|
115
|
+
_extend: {
|
|
116
|
+
start_date: state.date.value,
|
|
117
|
+
startDate: state.date.value,
|
|
118
|
+
endDate: state.date.value,
|
|
119
|
+
start_time: '00:00:00',
|
|
120
|
+
duration: 10,
|
|
121
|
+
quantity: 1,
|
|
122
|
+
price: product.price,
|
|
123
|
+
total: product.price,
|
|
124
|
+
origin_total: product.price,
|
|
125
|
+
product_name: product.title
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
_list.push(_item);
|
|
129
|
+
dispatch({
|
|
130
|
+
type: 'setService',
|
|
131
|
+
payload: {
|
|
132
|
+
value: _list,
|
|
133
|
+
edit: true
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
case 21:
|
|
137
|
+
case "end":
|
|
138
|
+
return _context.stop();
|
|
139
|
+
}
|
|
140
|
+
}, _callee);
|
|
141
|
+
}));
|
|
142
|
+
return function setDefaultService(_x2) {
|
|
143
|
+
return _ref2.apply(this, arguments);
|
|
144
|
+
};
|
|
145
|
+
}();
|
|
146
|
+
var getServices = /*#__PURE__*/function () {
|
|
147
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
148
|
+
var _state$eventOtherPara;
|
|
149
|
+
var data;
|
|
150
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
151
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
152
|
+
case 0:
|
|
153
|
+
setLoading(true);
|
|
154
|
+
_context2.next = 3;
|
|
155
|
+
return state.apis.getServices({
|
|
156
|
+
skip: 1,
|
|
157
|
+
num: 500,
|
|
158
|
+
extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product'],
|
|
159
|
+
with: ['category'],
|
|
160
|
+
ids: state.renderType === 'eventBooking' ? (_state$eventOtherPara = state.eventOtherParams) === null || _state$eventOtherPara === void 0 ? void 0 : _state$eventOtherPara.productIds : undefined,
|
|
161
|
+
open_quotation: 1,
|
|
162
|
+
with_schedule: 1,
|
|
163
|
+
with_count: ['bundleGroup', 'optionGroup'],
|
|
164
|
+
order_by_string: 'sort:desc',
|
|
165
|
+
status: 'published',
|
|
166
|
+
_config: {
|
|
167
|
+
useCache: true
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
case 3:
|
|
171
|
+
data = _context2.sent;
|
|
172
|
+
setLoading(false);
|
|
173
|
+
|
|
174
|
+
// 只有自动获取列表的时候才设置商品, 手动点击添加按钮的时候不设置
|
|
175
|
+
if (!state.service.addModal) {
|
|
176
|
+
setDefaultService(data === null || data === void 0 ? void 0 : data.list);
|
|
177
|
+
}
|
|
178
|
+
dispatch({
|
|
179
|
+
type: 'setService',
|
|
180
|
+
payload: {
|
|
181
|
+
services: (data === null || data === void 0 ? void 0 : data.list) || []
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
case 7:
|
|
185
|
+
case "end":
|
|
186
|
+
return _context2.stop();
|
|
187
|
+
}
|
|
188
|
+
}, _callee2);
|
|
189
|
+
}));
|
|
190
|
+
return function getServices() {
|
|
191
|
+
return _ref3.apply(this, arguments);
|
|
192
|
+
};
|
|
193
|
+
}();
|
|
194
|
+
var handleSelectService = function handleSelectService() {
|
|
195
|
+
dispatch({
|
|
196
|
+
type: 'setService',
|
|
197
|
+
payload: {
|
|
198
|
+
addModal: true
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
if (!state.isTerminal) {
|
|
202
|
+
setTimeout(function () {
|
|
203
|
+
var _searchRef$current, _searchRef$current$fo;
|
|
204
|
+
(_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 ? void 0 : (_searchRef$current$fo = _searchRef$current.focus) === null || _searchRef$current$fo === void 0 ? void 0 : _searchRef$current$fo.call(_searchRef$current);
|
|
205
|
+
}, 100);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
var handleSelectProduct = function handleSelectProduct(item, type) {
|
|
209
|
+
// 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
|
|
210
|
+
var isEject = type === 'detail' || item.bundle_group_count > 0;
|
|
211
|
+
var lock = false;
|
|
212
|
+
state.action({
|
|
213
|
+
type: 'pisell1.handleOpenProductModal',
|
|
214
|
+
data: {
|
|
215
|
+
id: item.id,
|
|
216
|
+
date: state.date.value.format('YYYY-MM-DD'),
|
|
217
|
+
showConfig: {
|
|
218
|
+
option: false,
|
|
219
|
+
session: false,
|
|
220
|
+
variant: false,
|
|
221
|
+
package: true
|
|
222
|
+
},
|
|
223
|
+
is_eject: isEject ? 1 : 0
|
|
224
|
+
},
|
|
225
|
+
callback: function callback(e) {
|
|
226
|
+
// 防止选择商品弹窗多次触发callback
|
|
227
|
+
if (lock) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
lock = true;
|
|
231
|
+
|
|
232
|
+
// 2秒后解除
|
|
233
|
+
setTimeout(function () {
|
|
234
|
+
lock = false;
|
|
235
|
+
}, 2000);
|
|
236
|
+
var cacheItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
237
|
+
product_id: item.id,
|
|
238
|
+
_id: getUniqueId(),
|
|
239
|
+
_key: e.key,
|
|
240
|
+
_extend: {
|
|
241
|
+
start_date: state.date.value,
|
|
242
|
+
quantity: 1,
|
|
243
|
+
price: item.price,
|
|
244
|
+
product_name: item.title,
|
|
245
|
+
other: JSON.parse(JSON.stringify(e))
|
|
246
|
+
},
|
|
247
|
+
new: 1
|
|
248
|
+
});
|
|
249
|
+
var _total = getProductTotalPrice(cacheItem);
|
|
250
|
+
// 用于折扣 可修改
|
|
251
|
+
cacheItem._extend.total = _total;
|
|
252
|
+
// 用于储存原价
|
|
253
|
+
cacheItem._extend.origin_total = _total;
|
|
254
|
+
var _isEdit = !!state.service.cacheItem;
|
|
255
|
+
if (_isEdit) {
|
|
256
|
+
var _state$service$cacheI;
|
|
257
|
+
cacheItem._id = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI._id;
|
|
258
|
+
cacheItem.new = 0;
|
|
259
|
+
}
|
|
260
|
+
cacheItem = getProductExtend({
|
|
261
|
+
cacheItem: cacheItem,
|
|
262
|
+
state: state
|
|
263
|
+
});
|
|
264
|
+
if (state.renderType === 'eventBooking') {
|
|
265
|
+
cacheItem.autoClose = false;
|
|
266
|
+
}
|
|
267
|
+
if (cacheItem.autoClose) {
|
|
268
|
+
cacheItem.autoClose = false;
|
|
269
|
+
var _list = [].concat(_toConsumableArray(state.service.value), [cacheItem]);
|
|
270
|
+
dispatch({
|
|
271
|
+
type: 'setService',
|
|
272
|
+
payload: {
|
|
273
|
+
addModal: false,
|
|
274
|
+
value: _list,
|
|
275
|
+
edit: true,
|
|
276
|
+
changeService: false
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
} else {
|
|
280
|
+
dispatch({
|
|
281
|
+
type: 'setService',
|
|
282
|
+
payload: {
|
|
283
|
+
editModal: true,
|
|
284
|
+
cacheItem: cacheItem,
|
|
285
|
+
addModal: !cacheItem.autoClose,
|
|
286
|
+
changeService: false
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
onEdit === null || onEdit === void 0 ? void 0 : onEdit(cacheItem);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
var renderList = useMemo(function () {
|
|
295
|
+
var _state$service;
|
|
296
|
+
var _list = ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.services) || [];
|
|
297
|
+
var isIncludes = function isIncludes(str) {
|
|
298
|
+
return str.toLowerCase().indexOf(search.toLowerCase()) !== -1;
|
|
299
|
+
};
|
|
300
|
+
return formatProductListByCategory(_list, search ? function (item) {
|
|
301
|
+
return isIncludes(item.title);
|
|
302
|
+
} : undefined);
|
|
303
|
+
}, [search, (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.services]);
|
|
304
|
+
console.log('state.service.renderList', renderList);
|
|
305
|
+
var isService = useMemo(function () {
|
|
306
|
+
return state.service.value.length > 0;
|
|
307
|
+
}, [state.service.value]);
|
|
308
|
+
useEffect(function () {
|
|
309
|
+
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _state$service3, _state$service3$value;
|
|
310
|
+
// Salonip 不要这个
|
|
311
|
+
|
|
312
|
+
if (shopList.includes((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.global) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id) || state.closeAutoOpenService) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// 如果弹窗打开,并且是创建, 则自动打开选择服务的弹窗
|
|
317
|
+
if (state.modalOpen && !state.bookingId && state.renderType !== 'eventBooking' && ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : (_state$service3$value = _state$service3.value) === null || _state$service3$value === void 0 ? void 0 : _state$service3$value.length) === 0) {
|
|
318
|
+
setTimeout(function () {
|
|
319
|
+
handleSelectService();
|
|
320
|
+
}, 10);
|
|
321
|
+
}
|
|
322
|
+
}, [state.modalOpen, state.bookingId, (_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.value]);
|
|
323
|
+
var showAddButton = useMemo(function () {
|
|
324
|
+
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
325
|
+
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
326
|
+
useUpdateEffect(function () {
|
|
327
|
+
if (state.service.addModal) {
|
|
328
|
+
getServices();
|
|
329
|
+
setSearch('');
|
|
330
|
+
}
|
|
331
|
+
}, [state.service.addModal]);
|
|
332
|
+
useEffect(function () {
|
|
333
|
+
if (state.renderType === 'eventBooking' && state.modalOpen) {
|
|
334
|
+
getServices();
|
|
335
|
+
}
|
|
336
|
+
}, [state.renderType, state.modalOpen]);
|
|
337
|
+
var addButton = useMemo(function () {
|
|
338
|
+
if (state.renderType === 'eventBooking') {
|
|
339
|
+
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
340
|
+
style: {
|
|
341
|
+
height: 20
|
|
342
|
+
}
|
|
343
|
+
}) : /*#__PURE__*/React.createElement(AddButton, {
|
|
344
|
+
loading: loading,
|
|
345
|
+
showSub: false,
|
|
346
|
+
title: locales.getText('pisell2.text.add-a-service'),
|
|
347
|
+
subTitle: locales.getText('pisell2.text.add-another-service'),
|
|
348
|
+
onClick: handleSelectService
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
return showAddButton ? /*#__PURE__*/React.createElement(AddButton, {
|
|
352
|
+
showSub: isService,
|
|
353
|
+
title: locales.getText('pisell2.text.add-a-service'),
|
|
354
|
+
subTitle: locales.getText('pisell2.text.add-another-service'),
|
|
355
|
+
onClick: handleSelectService
|
|
356
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
357
|
+
style: {
|
|
358
|
+
height: 20
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}, [state.renderType, showAddButton, isService, state.service.value, loading]);
|
|
362
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, ((_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : (_state$service5$cache = _state$service5.cacheItem) === null || _state$service5$cache === void 0 ? void 0 : _state$service5$cache.autoClose) && /*#__PURE__*/React.createElement(Skeleton, {
|
|
363
|
+
loading: true,
|
|
364
|
+
active: true,
|
|
365
|
+
round: true
|
|
366
|
+
}), addButton, /*#__PURE__*/React.createElement(Drawer, {
|
|
367
|
+
open: state.service.addModal,
|
|
368
|
+
title: locales.getText('pisell2.text.select-service'),
|
|
369
|
+
rootClassName: "booking-server-wrap",
|
|
370
|
+
onClose: function onClose() {
|
|
371
|
+
dispatch({
|
|
372
|
+
type: 'setService',
|
|
373
|
+
payload: {
|
|
374
|
+
addModal: false,
|
|
375
|
+
changeService: false
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
},
|
|
379
|
+
header: /*#__PURE__*/React.createElement("div", {
|
|
380
|
+
className: "pisell-lowcode__booking-service-header"
|
|
381
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
382
|
+
ref: searchRef,
|
|
383
|
+
prefix: /*#__PURE__*/React.createElement(SearchLg, null),
|
|
384
|
+
style: {
|
|
385
|
+
marginTop: 16,
|
|
386
|
+
height: 44
|
|
387
|
+
},
|
|
388
|
+
placeholder: locales.getText('pisell2.text.search'),
|
|
389
|
+
allowClear: true,
|
|
390
|
+
value: search,
|
|
391
|
+
onChange: function onChange(e) {
|
|
392
|
+
setSearch(e.target.value);
|
|
393
|
+
}
|
|
394
|
+
}))
|
|
395
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
396
|
+
className: "pisell-lowcode__booking-service-body"
|
|
397
|
+
}, /*#__PURE__*/React.createElement(TabProduct, {
|
|
398
|
+
list: renderList,
|
|
399
|
+
amountSymbol: state.amountSymbol,
|
|
400
|
+
onChange: handleSelectProduct,
|
|
401
|
+
scrollDom: ".booking-server-wrap .pisell-lowcode-drawer-body"
|
|
402
|
+
}))));
|
|
403
|
+
};
|
|
404
|
+
export default Info;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: number;
|
|
3
|
+
shop_id: number;
|
|
4
|
+
source_shop_id: number;
|
|
5
|
+
extension_id: number;
|
|
6
|
+
extension_type: string;
|
|
7
|
+
title: string;
|
|
8
|
+
slug: string;
|
|
9
|
+
title_letter: string;
|
|
10
|
+
category_letter: string;
|
|
11
|
+
vendor_letter: string;
|
|
12
|
+
tag_letter: string;
|
|
13
|
+
subtitle: string;
|
|
14
|
+
description: string;
|
|
15
|
+
cover: string;
|
|
16
|
+
price: string;
|
|
17
|
+
original_price: string;
|
|
18
|
+
cost_price: string;
|
|
19
|
+
sort_price: string;
|
|
20
|
+
is_gst: number;
|
|
21
|
+
is_delivery: number;
|
|
22
|
+
weight_unit: string;
|
|
23
|
+
weight_value: string;
|
|
24
|
+
code: string;
|
|
25
|
+
barcode: string;
|
|
26
|
+
unit: string;
|
|
27
|
+
is_track: number;
|
|
28
|
+
stock_quantity: number;
|
|
29
|
+
sum_stock: number;
|
|
30
|
+
sales_quantity: number;
|
|
31
|
+
order_sales_quantity: number;
|
|
32
|
+
over_sold: number;
|
|
33
|
+
status: string;
|
|
34
|
+
sell_status: number;
|
|
35
|
+
published_time: string;
|
|
36
|
+
shop_update_time: string;
|
|
37
|
+
audit_time: null;
|
|
38
|
+
is_recommend: number;
|
|
39
|
+
audit_status: string;
|
|
40
|
+
shop_status: string;
|
|
41
|
+
weight: number;
|
|
42
|
+
sort: number;
|
|
43
|
+
type: string;
|
|
44
|
+
channel_application: string[];
|
|
45
|
+
channel_id: number;
|
|
46
|
+
rebate_type: string;
|
|
47
|
+
rebate_value: string;
|
|
48
|
+
create_account_id: number;
|
|
49
|
+
update_account_id: number;
|
|
50
|
+
source_product_id: number;
|
|
51
|
+
start_at: null;
|
|
52
|
+
created_at: string;
|
|
53
|
+
updated_at: string;
|
|
54
|
+
deleted_at: null;
|
|
55
|
+
seo: {
|
|
56
|
+
title: string;
|
|
57
|
+
is_set_title: number;
|
|
58
|
+
description: string;
|
|
59
|
+
is_set_desc: number;
|
|
60
|
+
keywords: string;
|
|
61
|
+
is_set_keywords: number;
|
|
62
|
+
};
|
|
63
|
+
service_times: number;
|
|
64
|
+
product_resource: {
|
|
65
|
+
resources: ({
|
|
66
|
+
id: number;
|
|
67
|
+
title: string;
|
|
68
|
+
status: number;
|
|
69
|
+
code: string;
|
|
70
|
+
created_at: string;
|
|
71
|
+
updated_at: string;
|
|
72
|
+
type: string;
|
|
73
|
+
optional_resource: number[];
|
|
74
|
+
default_resource: number[];
|
|
75
|
+
select_type: {
|
|
76
|
+
type: string;
|
|
77
|
+
min: number;
|
|
78
|
+
max: number;
|
|
79
|
+
};
|
|
80
|
+
resource_type_id: number;
|
|
81
|
+
} | {
|
|
82
|
+
id: number;
|
|
83
|
+
title: string;
|
|
84
|
+
status: number;
|
|
85
|
+
code: string;
|
|
86
|
+
created_at: string;
|
|
87
|
+
updated_at: null;
|
|
88
|
+
type: string;
|
|
89
|
+
optional_resource: never[];
|
|
90
|
+
default_resource: never[];
|
|
91
|
+
select_type: {
|
|
92
|
+
type: string;
|
|
93
|
+
min: number;
|
|
94
|
+
max: number;
|
|
95
|
+
};
|
|
96
|
+
resource_type_id: number;
|
|
97
|
+
})[];
|
|
98
|
+
};
|
|
99
|
+
capacity: {
|
|
100
|
+
type: string;
|
|
101
|
+
custom: {
|
|
102
|
+
name: {
|
|
103
|
+
en: string;
|
|
104
|
+
"zh-CN": string;
|
|
105
|
+
"zh-HK": string;
|
|
106
|
+
original: string;
|
|
107
|
+
};
|
|
108
|
+
id: number;
|
|
109
|
+
min: number;
|
|
110
|
+
max: number;
|
|
111
|
+
}[];
|
|
112
|
+
package: {
|
|
113
|
+
product_ids: never[];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
is_grey: number;
|
|
117
|
+
is_eject: number;
|
|
118
|
+
share_url: string;
|
|
119
|
+
token_check_msg: string;
|
|
120
|
+
is_charge_tax: number;
|
|
121
|
+
media: never[];
|
|
122
|
+
tag: never[];
|
|
123
|
+
vendor: never[];
|
|
124
|
+
category: {
|
|
125
|
+
id: number;
|
|
126
|
+
shop_id: number;
|
|
127
|
+
parent_id: number;
|
|
128
|
+
name: string;
|
|
129
|
+
slug: string;
|
|
130
|
+
icon: string;
|
|
131
|
+
status: string;
|
|
132
|
+
last_applicable_time: number;
|
|
133
|
+
sort: number;
|
|
134
|
+
create_account_id: number;
|
|
135
|
+
update_account_id: number;
|
|
136
|
+
created_at: string;
|
|
137
|
+
updated_at: string;
|
|
138
|
+
}[];
|
|
139
|
+
collection: ({
|
|
140
|
+
id: number;
|
|
141
|
+
shop_id: number;
|
|
142
|
+
title: string;
|
|
143
|
+
title_letter: string;
|
|
144
|
+
description: null;
|
|
145
|
+
cover: string;
|
|
146
|
+
rule_type: string;
|
|
147
|
+
rule: {
|
|
148
|
+
class: string;
|
|
149
|
+
value: number;
|
|
150
|
+
operator: string;
|
|
151
|
+
}[];
|
|
152
|
+
product_quantity: number;
|
|
153
|
+
type: string;
|
|
154
|
+
order_type: string;
|
|
155
|
+
disabled: number;
|
|
156
|
+
create_account_id: number;
|
|
157
|
+
update_account_id: number;
|
|
158
|
+
created_at: string;
|
|
159
|
+
updated_at: string;
|
|
160
|
+
} | {
|
|
161
|
+
id: number;
|
|
162
|
+
shop_id: number;
|
|
163
|
+
title: string;
|
|
164
|
+
title_letter: string;
|
|
165
|
+
description: string;
|
|
166
|
+
cover: string;
|
|
167
|
+
rule_type: string;
|
|
168
|
+
rule: {
|
|
169
|
+
class: string;
|
|
170
|
+
value: string;
|
|
171
|
+
operator: string;
|
|
172
|
+
}[];
|
|
173
|
+
product_quantity: number;
|
|
174
|
+
type: string;
|
|
175
|
+
order_type: string;
|
|
176
|
+
disabled: number;
|
|
177
|
+
create_account_id: number;
|
|
178
|
+
update_account_id: number;
|
|
179
|
+
created_at: string;
|
|
180
|
+
updated_at: string;
|
|
181
|
+
} | {
|
|
182
|
+
id: number;
|
|
183
|
+
shop_id: number;
|
|
184
|
+
title: string;
|
|
185
|
+
title_letter: string;
|
|
186
|
+
description: null;
|
|
187
|
+
cover: string;
|
|
188
|
+
rule_type: string;
|
|
189
|
+
rule: {
|
|
190
|
+
class: string;
|
|
191
|
+
value: string;
|
|
192
|
+
operator: string;
|
|
193
|
+
}[];
|
|
194
|
+
product_quantity: number;
|
|
195
|
+
type: string;
|
|
196
|
+
order_type: string;
|
|
197
|
+
disabled: number;
|
|
198
|
+
create_account_id: number;
|
|
199
|
+
update_account_id: number;
|
|
200
|
+
created_at: string;
|
|
201
|
+
updated_at: string;
|
|
202
|
+
})[];
|
|
203
|
+
variant_group: never[];
|
|
204
|
+
option_group: never[];
|
|
205
|
+
variant: never[];
|
|
206
|
+
shop: {
|
|
207
|
+
id: number;
|
|
208
|
+
name: string;
|
|
209
|
+
default_domain: string;
|
|
210
|
+
default_url: string;
|
|
211
|
+
};
|
|
212
|
+
bundle_group: never[];
|
|
213
|
+
};
|
|
214
|
+
export default _default;
|