@kmkf-fe-packages/services-components 1.27.0 → 1.28.2
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/dist/esm/commonComponents/CopyText/index.d.ts +1 -1
- package/dist/esm/components/PostIng/index.js +1 -1
- package/dist/esm/components/ReceiverAddress/index.js +74 -8
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +47 -38
- package/package.json +4 -4
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -169,7 +169,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
169
169
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
170
170
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
171
171
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
172
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
172
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
173
173
|
component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
|
|
174
174
|
type: _this.type === "BS_POSTING" ? "bs" : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField
|
|
175
175
|
}))
|
|
@@ -1,4 +1,7 @@
|
|
|
1
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 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); } }
|
|
4
|
+
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); }); }; }
|
|
2
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -12,6 +15,10 @@ import GetFormItem from "../GetFormItem";
|
|
|
12
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
17
|
import every from "lodash/every";
|
|
18
|
+
import { queryWorkOrderDetail } from "../../service/api";
|
|
19
|
+
import copy from "copy-to-clipboard";
|
|
20
|
+
import { message } from "antd";
|
|
21
|
+
import { CopyOutlined } from "@ant-design/icons";
|
|
15
22
|
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
16
23
|
var _this = this,
|
|
17
24
|
_this$componentConfig5;
|
|
@@ -41,7 +48,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
41
48
|
return value ? +value : value;
|
|
42
49
|
});
|
|
43
50
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
44
|
-
var
|
|
51
|
+
var _address2;
|
|
45
52
|
if (record["".concat(_this.id, "_province")] === undefined) {
|
|
46
53
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
47
54
|
}
|
|
@@ -50,6 +57,58 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
50
57
|
return !item;
|
|
51
58
|
}) ? [] : address;
|
|
52
59
|
var detail = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_address")];
|
|
60
|
+
var copyHandler = /*#__PURE__*/function () {
|
|
61
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, record) {
|
|
62
|
+
var _address, addressText, _yield$queryWorkOrder, data, success, _data$jsonMap;
|
|
63
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
64
|
+
while (1) switch (_context.prev = _context.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
e.stopPropagation();
|
|
67
|
+
_context.prev = 1;
|
|
68
|
+
addressText = (_address = address) === null || _address === void 0 ? void 0 : _address.map(function () {
|
|
69
|
+
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
70
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
71
|
+
}).join("");
|
|
72
|
+
if (!(detail.indexOf("*") > -1)) {
|
|
73
|
+
_context.next = 12;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
_context.next = 6;
|
|
77
|
+
return queryWorkOrderDetail({
|
|
78
|
+
checkIsAllowedExport: false,
|
|
79
|
+
shopId: record.shopId,
|
|
80
|
+
workOrderId: record.id
|
|
81
|
+
});
|
|
82
|
+
case 6:
|
|
83
|
+
_yield$queryWorkOrder = _context.sent;
|
|
84
|
+
data = _yield$queryWorkOrder.data;
|
|
85
|
+
success = _yield$queryWorkOrder.success;
|
|
86
|
+
if (success) {
|
|
87
|
+
copy("".concat(addressText).concat(data === null || data === void 0 ? void 0 : (_data$jsonMap = data.jsonMap) === null || _data$jsonMap === void 0 ? void 0 : _data$jsonMap["".concat(_this.id, "_address")]));
|
|
88
|
+
message.success("复制成功");
|
|
89
|
+
}
|
|
90
|
+
_context.next = 14;
|
|
91
|
+
break;
|
|
92
|
+
case 12:
|
|
93
|
+
copy("".concat(addressText).concat(detail));
|
|
94
|
+
message.success("复制成功");
|
|
95
|
+
case 14:
|
|
96
|
+
_context.next = 19;
|
|
97
|
+
break;
|
|
98
|
+
case 16:
|
|
99
|
+
_context.prev = 16;
|
|
100
|
+
_context.t0 = _context["catch"](1);
|
|
101
|
+
console.log(_context.t0);
|
|
102
|
+
case 19:
|
|
103
|
+
case "end":
|
|
104
|
+
return _context.stop();
|
|
105
|
+
}
|
|
106
|
+
}, _callee, null, [[1, 16]]);
|
|
107
|
+
}));
|
|
108
|
+
return function copyHandler(_x, _x2) {
|
|
109
|
+
return _ref.apply(this, arguments);
|
|
110
|
+
};
|
|
111
|
+
}();
|
|
53
112
|
return /*#__PURE__*/React.createElement("span", {
|
|
54
113
|
className: "pointer",
|
|
55
114
|
onClick: function onClick(e) {
|
|
@@ -57,19 +116,26 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
57
116
|
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
|
|
58
117
|
e.stopPropagation();
|
|
59
118
|
}
|
|
60
|
-
}, (
|
|
119
|
+
}, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
|
|
61
120
|
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
62
121
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
63
|
-
}).join(""), detail
|
|
122
|
+
}).join(""), detail, " ", /*#__PURE__*/React.createElement(CopyOutlined, {
|
|
123
|
+
style: {
|
|
124
|
+
color: "#1B5BF3"
|
|
125
|
+
},
|
|
126
|
+
onClick: function onClick(e) {
|
|
127
|
+
return copyHandler(e, record);
|
|
128
|
+
}
|
|
129
|
+
}));
|
|
64
130
|
});
|
|
65
131
|
_defineProperty(this, "renderLog", function (r) {
|
|
66
|
-
var
|
|
132
|
+
var _address3;
|
|
67
133
|
var address = [_this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_province")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_city")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_district")])];
|
|
68
134
|
address = every(address, function (item) {
|
|
69
135
|
return !item;
|
|
70
136
|
}) ? [] : address;
|
|
71
137
|
var detail = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_address")];
|
|
72
|
-
return "".concat((
|
|
138
|
+
return "".concat((_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.map(function () {
|
|
73
139
|
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
74
140
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
75
141
|
}).join(""), " ").concat(detail || "");
|
|
@@ -81,7 +147,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
81
147
|
};
|
|
82
148
|
});
|
|
83
149
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
84
|
-
var
|
|
150
|
+
var _address4;
|
|
85
151
|
if (record["".concat(_this.id, "_province")] === undefined) {
|
|
86
152
|
return "--";
|
|
87
153
|
}
|
|
@@ -90,7 +156,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
90
156
|
return !item;
|
|
91
157
|
}) ? [] : address;
|
|
92
158
|
var detail = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_address")];
|
|
93
|
-
return "".concat((
|
|
159
|
+
return "".concat((_address4 = address) === null || _address4 === void 0 ? void 0 : _address4.map(function () {
|
|
94
160
|
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
95
161
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
96
162
|
}).join(""), " ").concat(detail || "");
|
|
@@ -111,7 +177,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
111
177
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
112
178
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
113
179
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
114
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
180
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
115
181
|
component: /*#__PURE__*/React.createElement(Address, _this.componentConfig)
|
|
116
182
|
});
|
|
117
183
|
});
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, GyGoods, BsE3Reissue, MemberLevel } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BsE3Goods | BsE3Reissue | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonInput | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | MemberLevel | GyGoods | GyReissue;
|
|
@@ -13,3 +13,4 @@ export declare const queryWLNLogisticsCompany: () => Promise<void>;
|
|
|
13
13
|
export declare const querySendData: () => Promise<void>;
|
|
14
14
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
15
15
|
export declare const queryLabel: () => Promise<any>;
|
|
16
|
+
export declare const queryWorkOrderDetail: (data: any) => Promise<any>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -13,40 +13,40 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
13
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
14
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
15
|
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; }
|
|
16
|
-
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, LabelData, SendDataCenter, servers } from
|
|
17
|
-
import get from
|
|
16
|
+
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, LabelData, SendDataCenter, servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
+
import get from 'lodash/get';
|
|
18
18
|
import request from "./request";
|
|
19
19
|
// 重复校验
|
|
20
20
|
export var replaceCheck = function replaceCheck(data) {
|
|
21
21
|
return request({
|
|
22
|
-
url:
|
|
23
|
-
method:
|
|
22
|
+
url: '/qy/gdfw/workOrder/repeatCheck',
|
|
23
|
+
method: 'post',
|
|
24
24
|
data: data
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
export var queryAddressData = function queryAddressData() {
|
|
28
28
|
return request({
|
|
29
|
-
url:
|
|
30
|
-
method:
|
|
29
|
+
url: '/qy/gdfw/template/queryAreas/noLogin',
|
|
30
|
+
method: 'get',
|
|
31
31
|
data: {}
|
|
32
32
|
}).then(function (resp) {
|
|
33
33
|
var map = {};
|
|
34
34
|
var res = {};
|
|
35
35
|
var list = resp.data;
|
|
36
36
|
for (var i = 0; i < list.length; i++) {
|
|
37
|
-
res[list[i][
|
|
38
|
-
map[list[i][
|
|
37
|
+
res[list[i]['id']] = [list[i]['name'], list[i]['parentId']];
|
|
38
|
+
map[list[i]['name']] = list[i]['id'];
|
|
39
39
|
}
|
|
40
40
|
var instance = AddressData.getInstance();
|
|
41
41
|
instance.addrData = res;
|
|
42
42
|
instance.addrNameMap = map;
|
|
43
|
-
instance.addressOptions = get(toTree(list, 0),
|
|
43
|
+
instance.addressOptions = get(toTree(list, 0), '0.children', []);
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
46
|
export var queryBsAddressData = function queryBsAddressData() {
|
|
47
47
|
return request({
|
|
48
|
-
url:
|
|
49
|
-
method:
|
|
48
|
+
url: '/qy/gdfw/template/queryBsAreas/noLogin',
|
|
49
|
+
method: 'get',
|
|
50
50
|
data: {}
|
|
51
51
|
}).then(function (resp) {
|
|
52
52
|
var map = {};
|
|
@@ -54,8 +54,8 @@ export var queryBsAddressData = function queryBsAddressData() {
|
|
|
54
54
|
var _resp$data = resp.data,
|
|
55
55
|
list = _resp$data === void 0 ? [] : _resp$data;
|
|
56
56
|
for (var i = 0; i < list.length; i++) {
|
|
57
|
-
res[list[i][
|
|
58
|
-
map[list[i][
|
|
57
|
+
res[list[i]['id']] = [list[i]['name'], list[i]['parentId']];
|
|
58
|
+
map[list[i]['name']] = list[i]['id'];
|
|
59
59
|
}
|
|
60
60
|
var instance = BsAddressData.getInstance();
|
|
61
61
|
instance.addrData = res;
|
|
@@ -65,8 +65,8 @@ export var queryBsAddressData = function queryBsAddressData() {
|
|
|
65
65
|
};
|
|
66
66
|
export var queryWdtAddressData = function queryWdtAddressData() {
|
|
67
67
|
return request({
|
|
68
|
-
url:
|
|
69
|
-
method:
|
|
68
|
+
url: '/qy/gdfw/template/queryWdtAreas/noLogin',
|
|
69
|
+
method: 'get',
|
|
70
70
|
data: {}
|
|
71
71
|
}).then(function (resp) {
|
|
72
72
|
var map = {};
|
|
@@ -74,8 +74,8 @@ export var queryWdtAddressData = function queryWdtAddressData() {
|
|
|
74
74
|
var _resp$data2 = resp.data,
|
|
75
75
|
list = _resp$data2 === void 0 ? [] : _resp$data2;
|
|
76
76
|
for (var i = 0; i < list.length; i++) {
|
|
77
|
-
res[list[i][
|
|
78
|
-
map[list[i][
|
|
77
|
+
res[list[i]['id']] = [list[i]['name'], list[i]['parentId']];
|
|
78
|
+
map[list[i]['name']] = list[i]['id'];
|
|
79
79
|
}
|
|
80
80
|
var instance = WdtAddressData.getInstance();
|
|
81
81
|
instance.addrData = res;
|
|
@@ -85,8 +85,8 @@ export var queryWdtAddressData = function queryWdtAddressData() {
|
|
|
85
85
|
};
|
|
86
86
|
export var queryPlatData = function queryPlatData() {
|
|
87
87
|
return request({
|
|
88
|
-
url:
|
|
89
|
-
method:
|
|
88
|
+
url: '/qy/platform/listPlatform/noLogin',
|
|
89
|
+
method: 'get',
|
|
90
90
|
data: {}
|
|
91
91
|
}).then(function (res) {
|
|
92
92
|
if (res.success) {
|
|
@@ -113,8 +113,8 @@ export var queryPlatData = function queryPlatData() {
|
|
|
113
113
|
};
|
|
114
114
|
export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
115
115
|
return request({
|
|
116
|
-
url:
|
|
117
|
-
method:
|
|
116
|
+
url: '/qy/logistics/listLogisticsWithInterceptInfo/noLogin',
|
|
117
|
+
method: 'get',
|
|
118
118
|
data: {
|
|
119
119
|
platformType: 118
|
|
120
120
|
}
|
|
@@ -122,10 +122,10 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
|
122
122
|
var data = res.data;
|
|
123
123
|
var instance = ExpressInterceptData.getInstance();
|
|
124
124
|
var companyTypeMap = {
|
|
125
|
-
SF:
|
|
126
|
-
ZTO:
|
|
127
|
-
JT:
|
|
128
|
-
DEFAULT:
|
|
125
|
+
SF: '顺丰',
|
|
126
|
+
ZTO: '中通',
|
|
127
|
+
JT: '极兔',
|
|
128
|
+
DEFAULT: ''
|
|
129
129
|
};
|
|
130
130
|
var expressList = data.map(function (item) {
|
|
131
131
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -190,26 +190,26 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
|
190
190
|
instance.typeOptions = Object.keys(typeObj).map(function (key) {
|
|
191
191
|
return {
|
|
192
192
|
label: key,
|
|
193
|
-
value: _toConsumableArray(typeObj[key]).join(
|
|
193
|
+
value: _toConsumableArray(typeObj[key]).join(',')
|
|
194
194
|
};
|
|
195
195
|
});
|
|
196
196
|
instance.typeConditionOptions = Object.keys(instance.typeNameMap).map(function (key) {
|
|
197
|
-
var type = key.split(
|
|
197
|
+
var type = key.split('|')[0];
|
|
198
198
|
return {
|
|
199
|
-
label: "".concat(companyTypeMap[type] ||
|
|
199
|
+
label: "".concat(companyTypeMap[type] || '').concat(instance.typeNameMap[key]),
|
|
200
200
|
value: key
|
|
201
201
|
};
|
|
202
202
|
});
|
|
203
203
|
instance.statusOptions = Object.keys(statusObj).map(function (key) {
|
|
204
204
|
return {
|
|
205
205
|
label: key,
|
|
206
|
-
value: _toConsumableArray(statusObj[key]).join(
|
|
206
|
+
value: _toConsumableArray(statusObj[key]).join(',')
|
|
207
207
|
};
|
|
208
208
|
});
|
|
209
209
|
var tempList = [];
|
|
210
210
|
var tempObj = {};
|
|
211
211
|
Object.keys(instance.statusNameMap).forEach(function (key) {
|
|
212
|
-
var type = key.split(
|
|
212
|
+
var type = key.split('|')[1];
|
|
213
213
|
if (!tempObj[type]) {
|
|
214
214
|
tempList.push({
|
|
215
215
|
label: instance.statusNameMap[key],
|
|
@@ -226,8 +226,8 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
|
|
|
226
226
|
};
|
|
227
227
|
export var queryLogisticsAddressData = function queryLogisticsAddressData() {
|
|
228
228
|
return request({
|
|
229
|
-
url:
|
|
230
|
-
method:
|
|
229
|
+
url: '/qy/userConfig/listLogisticsAddress',
|
|
230
|
+
method: 'get',
|
|
231
231
|
data: {}
|
|
232
232
|
}).then(function (res) {
|
|
233
233
|
var data = res.data;
|
|
@@ -239,8 +239,8 @@ export var queryLogisticsAddressData = function queryLogisticsAddressData() {
|
|
|
239
239
|
};
|
|
240
240
|
export var queryAllLogisticsCompany = function queryAllLogisticsCompany() {
|
|
241
241
|
return request({
|
|
242
|
-
url:
|
|
243
|
-
method:
|
|
242
|
+
url: '/qy/logistics/company/getAllLogisticsCompany/noLogin',
|
|
243
|
+
method: 'get',
|
|
244
244
|
data: {}
|
|
245
245
|
}).then(function (res) {
|
|
246
246
|
var data = res.data;
|
|
@@ -298,15 +298,15 @@ export var querySendData = /*#__PURE__*/function () {
|
|
|
298
298
|
// 获取支付宝电子回单
|
|
299
299
|
export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
300
300
|
return request({
|
|
301
|
-
url:
|
|
302
|
-
method:
|
|
301
|
+
url: '/qy/payment/paymentOrder/getAlipayBillReceipt',
|
|
302
|
+
method: 'post',
|
|
303
303
|
data: data
|
|
304
304
|
});
|
|
305
305
|
};
|
|
306
306
|
export var queryLabel = function queryLabel() {
|
|
307
307
|
return request({
|
|
308
|
-
url:
|
|
309
|
-
method:
|
|
308
|
+
url: '/qy/diamond/getConfigInfo',
|
|
309
|
+
method: 'get',
|
|
310
310
|
data: {
|
|
311
311
|
key: 'RISK_WARING_LABEL_LIST'
|
|
312
312
|
}
|
|
@@ -321,4 +321,13 @@ export var queryLabel = function queryLabel() {
|
|
|
321
321
|
instance.labelData = [];
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
//查询工单
|
|
327
|
+
export var queryWorkOrderDetail = function queryWorkOrderDetail(data) {
|
|
328
|
+
return request({
|
|
329
|
+
url: '/qy/gdfw/workOrder/queryWorkOrderDetail',
|
|
330
|
+
method: 'post',
|
|
331
|
+
data: data
|
|
332
|
+
});
|
|
324
333
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "1.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.28.2",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.28.2",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "ea1cf0c452d2e3be353daedc214b3061acfc73ed",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __assign = this && this.__assign || function () {
|
|
4
|
-
__assign = Object.assign || function (t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
exports.__esModule = true;
|
|
14
|
-
var react_1 = require("react");
|
|
15
|
-
var GetFormItem_1 = require("../../GetFormItem");
|
|
16
|
-
var Common_1 = require("../../Common");
|
|
17
|
-
var index_1 = require("../common/index");
|
|
18
|
-
var ItemView_1 = require("../../../commonComponents/ItemView");
|
|
19
|
-
var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
|
|
20
|
-
var basic_components_1 = require("@kmkf-fe-packages/basic-components");
|
|
21
|
-
var constant_1 = require("../../../constant");
|
|
22
|
-
var BsGoods = /** @class */function () {
|
|
23
|
-
function BsGoods(options) {
|
|
24
|
-
var _this = this;
|
|
25
|
-
var _a;
|
|
26
|
-
this.renderClient = function (record) {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
console.log("in renderclient");
|
|
29
|
-
return !kmkf_utils_1.isNull(record === null || record === void 0 ? void 0 : record["" + _this.id]) ? react_1["default"].createElement(react_1["default"].Fragment, null, react_1["default"].createElement(ItemView_1["default"], {
|
|
30
|
-
id: _this.id,
|
|
31
|
-
label: _this.name,
|
|
32
|
-
value: react_1["default"].createElement(Common_1.BsGoodsTable, {
|
|
33
|
-
list: ((_a = record === null || record === void 0 ? void 0 : record["" + _this.id]) === null || _a === void 0 ? void 0 : _a.bsGoods) || [],
|
|
34
|
-
showHeader: ((_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.showHeader) || []
|
|
35
|
-
})
|
|
36
|
-
})) : null;
|
|
37
|
-
};
|
|
38
|
-
this.renderPc = function () {
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
|
-
this.renderLog = function (r) {
|
|
42
|
-
var _a;
|
|
43
|
-
console.log("in renderclient");
|
|
44
|
-
if (kmkf_utils_1.isNull(r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"])) return null;
|
|
45
|
-
return react_1["default"].createElement(Common_1.BsGoodsTable, {
|
|
46
|
-
list: (r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"]) || [],
|
|
47
|
-
showHeader: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showHeader) || []
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
this.getComponentValue = function (r) {
|
|
51
|
-
return r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"];
|
|
52
|
-
};
|
|
53
|
-
this.renderExport = function () {
|
|
54
|
-
return null;
|
|
55
|
-
};
|
|
56
|
-
this.editRender = function (p) {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f;
|
|
58
|
-
console.log("in renderclient");
|
|
59
|
-
return react_1["default"].createElement(GetFormItem_1["default"], {
|
|
60
|
-
title: _this.name,
|
|
61
|
-
name: _this.id,
|
|
62
|
-
rules: _this.rules,
|
|
63
|
-
required: false,
|
|
64
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
65
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
66
|
-
tooltip: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showTooltip) ? (_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.tooltip : "",
|
|
67
|
-
component: react_1["default"].createElement(basic_components_1.BsGoods, __assign({}, _this.componentConfig, {
|
|
68
|
-
maxLength: ((_c = _this.componentConfig) === null || _c === void 0 ? void 0 : _c.maxLength) || 20,
|
|
69
|
-
shopId: (_d = _this.effects) === null || _d === void 0 ? void 0 : _d.shopId,
|
|
70
|
-
shopList: ((_e = _this.effects) === null || _e === void 0 ? void 0 : _e.shopList) || [],
|
|
71
|
-
companyKey: (_f = _this.effects) === null || _f === void 0 ? void 0 : _f.companyKey,
|
|
72
|
-
width: "90%"
|
|
73
|
-
}))
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
this.filterConfig = function (item) {
|
|
77
|
-
return [{
|
|
78
|
-
searchDefaultConditions: constant_1.SYMBOL.like,
|
|
79
|
-
type: item.type,
|
|
80
|
-
id: item.id + "_bsGoods",
|
|
81
|
-
name: item.name,
|
|
82
|
-
filterComponentType: "Input"
|
|
83
|
-
}];
|
|
84
|
-
};
|
|
85
|
-
this.name = options.name;
|
|
86
|
-
this.id = options.id;
|
|
87
|
-
this.sortField = options.id + "_bsGoods";
|
|
88
|
-
this.formField = options.id + "_bsGoods";
|
|
89
|
-
this.type = options.type;
|
|
90
|
-
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
91
|
-
this.isCombinationComponent = true;
|
|
92
|
-
this.canSort = false;
|
|
93
|
-
this.bsGoods = new index_1.BsHeaderGood(__assign(__assign({}, options), {
|
|
94
|
-
id: options.id + "_bsGoods",
|
|
95
|
-
name: "商品信息"
|
|
96
|
-
}));
|
|
97
|
-
this.children = [this.bsGoods];
|
|
98
|
-
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
99
|
-
this.rules = ((_a = this === null || this === void 0 ? void 0 : this.componentConfig) === null || _a === void 0 ? void 0 : _a.required) ? [{
|
|
100
|
-
required: true,
|
|
101
|
-
validator: function validator(_, value) {
|
|
102
|
-
var _a;
|
|
103
|
-
if (!value || !((_a = value === null || value === void 0 ? void 0 : value.bsGoods) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
104
|
-
return Promise.reject(new Error("请选择bs商品"));
|
|
105
|
-
}
|
|
106
|
-
return Promise.resolve();
|
|
107
|
-
}
|
|
108
|
-
}] : [];
|
|
109
|
-
this.dataType = "object";
|
|
110
|
-
}
|
|
111
|
-
return BsGoods;
|
|
112
|
-
}();
|
|
113
|
-
exports["default"] = BsGoods;
|