@kmkf-fe-packages/services-components 0.7.15-alpha.40 → 0.7.15-alpha.45
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/components/BS/BsExchange/index.d.ts +6 -8
- package/dist/esm/components/BS/BsExchange/index.js +75 -57
- package/dist/esm/components/BS/BsGoods/index.d.ts +5 -5
- package/dist/esm/components/BS/BsGoods/index.js +23 -15
- package/dist/esm/components/BS/BsReissue/index.d.ts +6 -6
- package/dist/esm/components/BS/BsReissue/index.js +29 -21
- package/dist/esm/components/BS/common/BsHeaderCode.d.ts +5 -4
- package/dist/esm/components/BS/common/BsHeaderCode.js +27 -11
- package/dist/esm/components/BS/common/BsHeaderMoney.d.ts +5 -4
- package/dist/esm/components/BS/common/BsHeaderMoney.js +27 -11
- package/dist/esm/components/BS/common/BsHeaderName.d.ts +5 -4
- package/dist/esm/components/BS/common/BsHeaderName.js +28 -11
- package/dist/esm/components/BS/common/BsHeaderNumber.d.ts +5 -4
- package/dist/esm/components/BS/common/BsHeaderNumber.js +27 -11
- package/dist/esm/components/BS/common/BsHeaderPic.d.ts +1 -0
- package/dist/esm/components/BS/common/BsHeaderPic.js +19 -3
- package/dist/esm/components/BS/common/BsHeaderShare.d.ts +5 -4
- package/dist/esm/components/BS/common/BsHeaderShare.js +27 -11
- package/dist/esm/components/BS/common/BsHeaderSku.d.ts +5 -4
- package/dist/esm/components/BS/common/BsHeaderSku.js +27 -11
- package/dist/esm/components/BS/common/BsHeaderType.d.ts +5 -4
- package/dist/esm/components/BS/common/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 -9
- package/dist/esm/components/LogisticsTrajectory/index.js +3 -3
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +13 -13
- 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,16 +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
|
-
|
|
46
|
-
var text = (
|
|
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) {
|
|
47
72
|
return item.value === type;
|
|
48
|
-
})) === null ||
|
|
73
|
+
})) === null || _find2 === void 0 ? void 0 : _find2.label;
|
|
49
74
|
return text;
|
|
50
75
|
});
|
|
51
76
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
@@ -83,7 +108,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
83
108
|
this.align = "left";
|
|
84
109
|
this.width = 200;
|
|
85
110
|
this.isCombinationComponent = false;
|
|
86
|
-
this.canSort =
|
|
111
|
+
this.canSort = false;
|
|
87
112
|
this.dataType = "string";
|
|
88
113
|
this.children = [];
|
|
89
114
|
});
|
|
@@ -77,15 +77,15 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
77
77
|
this.componentConfig = options.componentConfig;
|
|
78
78
|
this.expressDateInstance = ExpressData.getInstance();
|
|
79
79
|
this.express = new TrajectoryCompany(_objectSpread(_objectSpread({}, options), {}, {
|
|
80
|
-
name: "
|
|
80
|
+
name: "".concat(this.name, "-\u516C\u53F8"),
|
|
81
81
|
id: "".concat(this.id, "_trajectoryCompany")
|
|
82
82
|
}));
|
|
83
83
|
this.expressCode = new TrajectoryCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
84
|
-
name: "
|
|
84
|
+
name: "".concat(this.name, "-\u5355\u53F7"),
|
|
85
85
|
id: "".concat(this.id)
|
|
86
86
|
}));
|
|
87
87
|
this.expressSnapshot = new TrajectorySnapshot(_objectSpread(_objectSpread({}, options), {}, {
|
|
88
|
-
name: "
|
|
88
|
+
name: "".concat(this.name, "-\u5FEB\u7167"),
|
|
89
89
|
id: "".concat(this.id, "_trajectorySnapshot")
|
|
90
90
|
}));
|
|
91
91
|
this.isCombinationComponent = true;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, BsGoods, BsExchange, BsReissue } 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 | AliPay | BsExchange | BsGoods | BsReissue | BuyerNick | BasicCascader | BasicCheckbox | CommonDataTime | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowStatusSelect | BasicGrade | Handler | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsTrajectory | BasicMultSelect | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WorkOrderId;
|