@kmkf-fe-packages/services-components 0.7.15-alpha.5 → 0.7.15-alpha.51
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/QueryLogisticsTrack/index.js +23 -21
- package/dist/esm/components/BS/BsExchange/index.d.ts +6 -8
- package/dist/esm/components/BS/BsExchange/index.js +207 -116
- package/dist/esm/components/BS/BsGoods/index.d.ts +9 -9
- package/dist/esm/components/BS/BsGoods/index.js +82 -60
- package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -7
- package/dist/esm/components/BS/BsLogistics/index.js +14 -14
- package/dist/esm/components/BS/BsReissue/index.d.ts +8 -5
- package/dist/esm/components/BS/BsReissue/index.js +89 -50
- package/dist/esm/components/BS/common/{BsChildCode.d.ts → BsHeaderCode.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildCode.js → BsHeaderCode.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildMoney.d.ts → BsHeaderMoney.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildMoney.js → BsHeaderMoney.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildName.d.ts → BsHeaderName.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildName.js → BsHeaderName.js} +28 -11
- package/dist/esm/components/BS/common/{BsChildNumber.d.ts → BsHeaderNumber.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildNumber.js → BsHeaderNumber.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildPic.d.ts → BsHeaderPic.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildPic.js → BsHeaderPic.js} +26 -10
- package/dist/esm/components/BS/common/{BsChildShare.d.ts → BsHeaderShare.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildShare.js → BsHeaderShare.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildSku.d.ts → BsHeaderSku.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildSku.js → BsHeaderSku.js} +27 -11
- package/dist/esm/components/BS/common/{BsChildType.d.ts → BsHeaderType.d.ts} +5 -4
- package/dist/esm/components/BS/common/{BsChildType.js → BsHeaderType.js} +27 -11
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -3
- package/dist/esm/components/BS/common/BsMemo.js +43 -13
- package/dist/esm/components/BS/common/BsType.d.ts +1 -0
- package/dist/esm/components/BS/common/BsType.js +34 -8
- package/dist/esm/components/BS/common/index.d.ts +10 -10
- package/dist/esm/components/BS/common/index.js +8 -8
- package/dist/esm/components/Cascader/index.d.ts +1 -0
- package/dist/esm/components/Cascader/index.js +3 -1
- package/dist/esm/components/Common/index.d.ts +5 -0
- package/dist/esm/components/Common/index.js +102 -2
- package/dist/esm/components/File/index.d.ts +4 -4
- package/dist/esm/components/File/index.js +29 -9
- package/dist/esm/components/FlowStatusSelect/index.d.ts +0 -1
- package/dist/esm/components/FlowStatusSelect/index.js +30 -24
- package/dist/esm/components/FlowWorkOrderId/index.d.ts +33 -0
- package/dist/esm/components/FlowWorkOrderId/index.js +107 -0
- package/dist/esm/components/JST/JstLogistics/index.js +25 -8
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +8 -9
- package/dist/esm/components/LogisticsTrajectory/index.js +12 -10
- package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +6 -5
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +6 -6
- package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +8 -8
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
- package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +4 -10
- package/dist/esm/components/Payment/BuyerNick.js +1 -2
- package/dist/esm/components/Payment/index.d.ts +1 -0
- package/dist/esm/components/Payment/index.js +9 -6
- package/dist/esm/components/PostIng/index.d.ts +6 -29
- package/dist/esm/components/PostIng/index.js +73 -77
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +6 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +15 -14
- package/package.json +4 -4
- package/dist/esm/components/BS/common/BsExchangeImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsExchangeImage.js +0 -126
- package/dist/esm/components/BS/common/BsGoodImage.d.ts +0 -31
- package/dist/esm/components/BS/common/BsGoodImage.js +0 -88
|
@@ -1,13 +1,19 @@
|
|
|
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 _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 _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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
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
9
|
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
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
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; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
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
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildShare = /*#__PURE__*/_createClass(function BsChildShare(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildShare);
|
|
@@ -23,6 +29,14 @@ var BsChildShare = /*#__PURE__*/_createClass(function BsChildShare(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,24 @@ var BsChildShare = /*#__PURE__*/_createClass(function BsChildShare(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['share'] && prv.push(next['share']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
66
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "editRender", function () {
|
|
53
69
|
return null;
|
|
@@ -61,11 +77,11 @@ var BsChildShare = /*#__PURE__*/_createClass(function BsChildShare(options) {
|
|
|
61
77
|
this.formField = options.id;
|
|
62
78
|
this.type = options.type;
|
|
63
79
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
80
|
+
this.align = 'left';
|
|
65
81
|
this.width = 200;
|
|
66
82
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
83
|
+
this.canSort = false;
|
|
84
|
+
this.dataType = 'string';
|
|
69
85
|
this.children = [];
|
|
70
86
|
});
|
|
71
87
|
export default BsChildShare;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildSku implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,13 +1,19 @@
|
|
|
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 _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 _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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
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
9
|
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
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
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; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
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
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildSku = /*#__PURE__*/_createClass(function BsChildSku(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildSku);
|
|
@@ -23,6 +29,14 @@ var BsChildSku = /*#__PURE__*/_createClass(function BsChildSku(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,24 @@ var BsChildSku = /*#__PURE__*/_createClass(function BsChildSku(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['sku'] && prv.push(next['sku']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
66
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "editRender", function () {
|
|
53
69
|
return null;
|
|
@@ -61,11 +77,11 @@ var BsChildSku = /*#__PURE__*/_createClass(function BsChildSku(options) {
|
|
|
61
77
|
this.formField = options.id;
|
|
62
78
|
this.type = options.type;
|
|
63
79
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
80
|
+
this.align = 'left';
|
|
65
81
|
this.width = 200;
|
|
66
82
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
83
|
+
this.canSort = false;
|
|
84
|
+
this.dataType = 'string';
|
|
69
85
|
this.children = [];
|
|
70
86
|
});
|
|
71
87
|
export default BsChildSku;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsChildType implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,13 +1,19 @@
|
|
|
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 _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 _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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
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
9
|
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
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
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; }
|
|
6
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
13
|
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
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
17
|
var BsChildType = /*#__PURE__*/_createClass(function BsChildType(options) {
|
|
12
18
|
var _this = this;
|
|
13
19
|
_classCallCheck(this, BsChildType);
|
|
@@ -23,6 +29,14 @@ var BsChildType = /*#__PURE__*/_createClass(function BsChildType(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
26
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
27
41
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
42
|
id: _this.id,
|
|
@@ -32,22 +46,24 @@ var BsChildType = /*#__PURE__*/_createClass(function BsChildType(options) {
|
|
|
32
46
|
});
|
|
33
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
34
48
|
var _this$getComponentVal;
|
|
35
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
36
50
|
});
|
|
37
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
54
|
return _this.renderPc(undefined, r);
|
|
40
55
|
});
|
|
41
56
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
|
|
57
|
+
var id = _this.getParentId();
|
|
58
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
59
|
+
next['type'] && prv.push(next['type']);
|
|
44
60
|
return prv;
|
|
45
61
|
}, []);
|
|
46
|
-
return list.join(
|
|
62
|
+
return list.join(',');
|
|
47
63
|
});
|
|
48
64
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
65
|
var _this$getComponentVal2;
|
|
50
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
66
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "editRender", function () {
|
|
53
69
|
return null;
|
|
@@ -61,11 +77,11 @@ var BsChildType = /*#__PURE__*/_createClass(function BsChildType(options) {
|
|
|
61
77
|
this.formField = options.id;
|
|
62
78
|
this.type = options.type;
|
|
63
79
|
this.componentConfig = options.componentConfig;
|
|
64
|
-
this.align =
|
|
80
|
+
this.align = 'left';
|
|
65
81
|
this.width = 200;
|
|
66
82
|
this.isCombinationComponent = false;
|
|
67
|
-
this.canSort =
|
|
68
|
-
this.dataType =
|
|
83
|
+
this.canSort = false;
|
|
84
|
+
this.dataType = 'string';
|
|
69
85
|
this.children = [];
|
|
70
86
|
});
|
|
71
87
|
export default BsChildType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare class
|
|
3
|
+
declare class BsMemo implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
@@ -14,7 +14,8 @@ declare class BsType implements ComponentInterface {
|
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
-
|
|
17
|
+
getParentId: () => string;
|
|
18
|
+
renderClient: (r: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
21
|
getComponentValue: (r: Record) => any;
|
|
@@ -22,4 +23,4 @@ declare class BsType implements ComponentInterface {
|
|
|
22
23
|
editRender: () => null;
|
|
23
24
|
filterConfig: () => never[];
|
|
24
25
|
}
|
|
25
|
-
export default
|
|
26
|
+
export default BsMemo;
|
|
@@ -1,4 +1,10 @@
|
|
|
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 _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 _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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
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
9
|
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
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -8,9 +14,9 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
8
14
|
import React from "react";
|
|
9
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
10
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
-
var
|
|
17
|
+
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
12
18
|
var _this = this;
|
|
13
|
-
_classCallCheck(this,
|
|
19
|
+
_classCallCheck(this, BsMemo);
|
|
14
20
|
_defineProperty(this, "name", void 0);
|
|
15
21
|
_defineProperty(this, "id", void 0);
|
|
16
22
|
_defineProperty(this, "sortField", void 0);
|
|
@@ -23,11 +29,33 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
23
29
|
_defineProperty(this, "canSort", void 0);
|
|
24
30
|
_defineProperty(this, "children", void 0);
|
|
25
31
|
_defineProperty(this, "dataType", void 0);
|
|
26
|
-
_defineProperty(this, "
|
|
27
|
-
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split("_"),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1];
|
|
37
|
+
return "".concat(key, "_").concat(name);
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "renderClient", function (r) {
|
|
40
|
+
var _ref, _r$key, _r$key2, _ref2, _r$key3, _r$key4, _find, _this$componentConfig;
|
|
41
|
+
var _this$getParentId$spl = _this.getParentId().split("_"),
|
|
42
|
+
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
43
|
+
key = _this$getParentId$spl2[0];
|
|
44
|
+
if (!isNull(r === null || r === void 0 ? void 0 : r[key])) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
var type = r !== null && r !== void 0 && r[key] ? (_ref = (r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : _r$key.bsReissueType) || (r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : _r$key2.bsExchangeType)) === null || _ref === void 0 ? void 0 : _ref[0] : "";
|
|
48
|
+
var memo = r !== null && r !== void 0 && r[key] ? (_ref2 = (r === null || r === void 0 ? void 0 : (_r$key3 = r[key]) === null || _r$key3 === void 0 ? void 0 : _r$key3.bsReissueType) || (r === null || r === void 0 ? void 0 : (_r$key4 = r[key]) === null || _r$key4 === void 0 ? void 0 : _r$key4.bsExchangeType)) === null || _ref2 === void 0 ? void 0 : _ref2[1] : "";
|
|
49
|
+
var children = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
|
|
50
|
+
return item.value === type;
|
|
51
|
+
})) === null || _find === void 0 ? void 0 : _find.children;
|
|
52
|
+
var text = (children || []).find(function (item) {
|
|
53
|
+
return item.value === memo;
|
|
54
|
+
});
|
|
55
|
+
return !isNull(r === null || r === void 0 ? void 0 : r[key]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
28
56
|
id: _this.id,
|
|
29
57
|
label: _this.name,
|
|
30
|
-
value:
|
|
58
|
+
value: text
|
|
31
59
|
}) : null;
|
|
32
60
|
});
|
|
33
61
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -35,16 +63,18 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
35
63
|
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
36
64
|
});
|
|
37
65
|
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
-
|
|
66
|
+
var id = _this.getParentId();
|
|
67
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
39
68
|
return _this.renderPc(undefined, r);
|
|
40
69
|
});
|
|
41
70
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
71
|
+
var _ref3, _r$id, _r$id2, _ref4, _r$id3, _r$id4, _find2, _this$componentConfig2;
|
|
72
|
+
var id = _this.getParentId();
|
|
73
|
+
var type = r !== null && r !== void 0 && r[id] ? (_ref3 = (r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id.bsReissueType) || (r === null || r === void 0 ? void 0 : (_r$id2 = r[id]) === null || _r$id2 === void 0 ? void 0 : _r$id2.bsExchangeType)) === null || _ref3 === void 0 ? void 0 : _ref3[0] : "";
|
|
74
|
+
var memo = r !== null && r !== void 0 && r[_this.id] ? (_ref4 = (r === null || r === void 0 ? void 0 : (_r$id3 = r[id]) === null || _r$id3 === void 0 ? void 0 : _r$id3.bsReissueType) || (r === null || r === void 0 ? void 0 : (_r$id4 = r[id]) === null || _r$id4 === void 0 ? void 0 : _r$id4.bsExchangeType)) === null || _ref4 === void 0 ? void 0 : _ref4[1] : "";
|
|
75
|
+
var children = (_find2 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
46
76
|
return item.value === type;
|
|
47
|
-
})) === null ||
|
|
77
|
+
})) === null || _find2 === void 0 ? void 0 : _find2.children;
|
|
48
78
|
var text = (children || []).find(function (item) {
|
|
49
79
|
return item.value === memo;
|
|
50
80
|
});
|
|
@@ -69,8 +99,8 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
69
99
|
this.align = "left";
|
|
70
100
|
this.width = 200;
|
|
71
101
|
this.isCombinationComponent = false;
|
|
72
|
-
this.canSort =
|
|
102
|
+
this.canSort = false;
|
|
73
103
|
this.dataType = "string";
|
|
74
104
|
this.children = [];
|
|
75
105
|
});
|
|
76
|
-
export default
|
|
106
|
+
export default BsMemo;
|
|
@@ -14,6 +14,7 @@ declare class BsType implements ComponentInterface {
|
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
17
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
19
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
19
20
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,4 +1,10 @@
|
|
|
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 _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 _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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
8
|
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
9
|
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
10
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -24,11 +30,29 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
24
30
|
_defineProperty(this, "canSort", void 0);
|
|
25
31
|
_defineProperty(this, "children", void 0);
|
|
26
32
|
_defineProperty(this, "dataType", void 0);
|
|
33
|
+
_defineProperty(this, "getParentId", function () {
|
|
34
|
+
var _this$id$split = _this.id.split("_"),
|
|
35
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
36
|
+
key = _this$id$split2[0],
|
|
37
|
+
name = _this$id$split2[1];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
27
40
|
_defineProperty(this, "renderClient", function (record) {
|
|
28
|
-
|
|
41
|
+
var _find, _this$componentConfig;
|
|
42
|
+
var _this$getParentId$spl = _this.getParentId().split("_"),
|
|
43
|
+
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
44
|
+
key = _this$getParentId$spl2[0];
|
|
45
|
+
if (!isNull(record === null || record === void 0 ? void 0 : record[key])) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
var text = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
|
|
49
|
+
var _record$key, _record$key$bsReissue, _record$key2, _record$key2$bsExchan;
|
|
50
|
+
return item.value === ((_record$key = record[key]) === null || _record$key === void 0 ? void 0 : (_record$key$bsReissue = _record$key.bsReissueType) === null || _record$key$bsReissue === void 0 ? void 0 : _record$key$bsReissue[0]) || item.value === ((_record$key2 = record[key]) === null || _record$key2 === void 0 ? void 0 : (_record$key2$bsExchan = _record$key2.bsExchangeType) === null || _record$key2$bsExchan === void 0 ? void 0 : _record$key2$bsExchan[0]);
|
|
51
|
+
})) === null || _find === void 0 ? void 0 : _find.label;
|
|
52
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[key]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
29
53
|
id: _this.id,
|
|
30
54
|
label: _this.name,
|
|
31
|
-
value:
|
|
55
|
+
value: text
|
|
32
56
|
}) : null;
|
|
33
57
|
});
|
|
34
58
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -36,15 +60,17 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
36
60
|
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
37
61
|
});
|
|
38
62
|
_defineProperty(this, "renderLog", function (r) {
|
|
39
|
-
|
|
63
|
+
var id = _this.getParentId();
|
|
64
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
40
65
|
return _this.renderPc(undefined, r);
|
|
41
66
|
});
|
|
42
67
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
68
|
+
var _r$id, _find2, _this$componentConfig2;
|
|
69
|
+
var id = _this.getParentId();
|
|
70
|
+
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] : "";
|
|
71
|
+
var text = (_find2 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
46
72
|
return item.value === type;
|
|
47
|
-
})) === null ||
|
|
73
|
+
})) === null || _find2 === void 0 ? void 0 : _find2.label;
|
|
48
74
|
return text;
|
|
49
75
|
});
|
|
50
76
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
@@ -82,7 +108,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
82
108
|
this.align = "left";
|
|
83
109
|
this.width = 200;
|
|
84
110
|
this.isCombinationComponent = false;
|
|
85
|
-
this.canSort =
|
|
111
|
+
this.canSort = false;
|
|
86
112
|
this.dataType = "string";
|
|
87
113
|
this.children = [];
|
|
88
114
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { default as BsType } from
|
|
2
|
-
export { default as BsMemo } from
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
1
|
+
export { default as BsType } from './BsType';
|
|
2
|
+
export { default as BsMemo } from './BsMemo';
|
|
3
|
+
export { default as BsHeaderPic } from './BsHeaderPic';
|
|
4
|
+
export { default as BsHeaderName } from './BsHeaderName';
|
|
5
|
+
export { default as BsHeaderCode } from './BsHeaderCode';
|
|
6
|
+
export { default as BsHeaderSku } from './BsHeaderSku';
|
|
7
|
+
export { default as BsHeaderMoney } from './BsHeaderMoney';
|
|
8
|
+
export { default as BsHeaderNumber } from './BsHeaderNumber';
|
|
9
|
+
export { default as BsHeaderShare } from './BsHeaderShare';
|
|
10
|
+
export { default as BsHeaderType } from './BsHeaderType';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { default as BsType } from "./BsType";
|
|
2
2
|
export { default as BsMemo } from "./BsMemo";
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
3
|
+
export { default as BsHeaderPic } from "./BsHeaderPic";
|
|
4
|
+
export { default as BsHeaderName } from "./BsHeaderName";
|
|
5
|
+
export { default as BsHeaderCode } from "./BsHeaderCode";
|
|
6
|
+
export { default as BsHeaderSku } from "./BsHeaderSku";
|
|
7
|
+
export { default as BsHeaderMoney } from "./BsHeaderMoney";
|
|
8
|
+
export { default as BsHeaderNumber } from "./BsHeaderNumber";
|
|
9
|
+
export { default as BsHeaderShare } from "./BsHeaderShare";
|
|
10
|
+
export { default as BsHeaderType } from "./BsHeaderType";
|
|
@@ -28,6 +28,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
28
28
|
_defineProperty(this, "canSort", void 0);
|
|
29
29
|
_defineProperty(this, "children", void 0);
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
|
+
_defineProperty(this, "format", void 0);
|
|
31
32
|
_defineProperty(this, "getValue", function (value) {
|
|
32
33
|
var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
|
|
33
34
|
return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
|
|
@@ -139,7 +140,8 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
139
140
|
this.children = [];
|
|
140
141
|
this.isCombinationComponent = false;
|
|
141
142
|
this.canSort = true;
|
|
142
|
-
this.dataType = '
|
|
143
|
+
this.dataType = 'array';
|
|
144
|
+
this.format = 'cascader';
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
/**
|
|
@@ -21,4 +21,9 @@ export declare const BsGoodImage: ({ item, index }: {
|
|
|
21
21
|
}) => React.JSX.Element;
|
|
22
22
|
export declare const BsExchangeList: ({ list }: any) => React.JSX.Element;
|
|
23
23
|
export declare const BsGoodPic: (list: string[]) => React.JSX.Element[];
|
|
24
|
+
export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
25
|
+
list: any[];
|
|
26
|
+
showHeader: string[];
|
|
27
|
+
text?: string | undefined;
|
|
28
|
+
}) => React.JSX.Element;
|
|
24
29
|
export {};
|