@kmkf-fe-packages/services-components 0.8.13-alpha.1 → 0.8.14-alpha.0
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/BsSystemOrder/index.d.ts +25 -0
- package/dist/esm/components/{ReissueStatus → BS/BsSystemOrder}/index.js +65 -72
- package/dist/esm/components/BS/common/index.d.ts +5 -5
- package/dist/esm/components/BS/common/index.js +0 -7
- package/dist/esm/components/Common/index.d.ts +1 -0
- package/dist/esm/components/Common/index.js +37 -0
- package/dist/esm/components/JST/JstLogistics/index.js +0 -6
- package/dist/esm/components/PostIng/index.js +3 -4
- package/dist/esm/components/Radio/index.d.ts +1 -2
- package/dist/esm/components/Radio/index.js +11 -23
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +3 -7
- package/dist/esm/index.d.ts +1 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/type.d.ts +1 -2
- package/package.json +4 -4
- package/dist/esm/components/ReissueStatus/index.d.ts +0 -37
- package/dist/esm/components/ReissueTradeId/index.d.ts +0 -36
- package/dist/esm/components/ReissueTradeId/index.js +0 -132
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsSystemOrder implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: () => null;
|
|
19
|
+
renderLog: (r: Record) => null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: () => null;
|
|
22
|
+
editRender: (p: any) => React.JSX.Element;
|
|
23
|
+
filterConfig: (item: ColumnConfig) => never[];
|
|
24
|
+
}
|
|
25
|
+
export default BsSystemOrder;
|
|
@@ -1,107 +1,100 @@
|
|
|
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
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
4
|
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); } }
|
|
6
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
7
|
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; }
|
|
9
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
9
|
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); }
|
|
11
|
-
import React from
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var BasicReissueStatusSelect = /*#__PURE__*/_createClass(function BasicReissueStatusSelect(options) {
|
|
23
|
-
var _this = this;
|
|
24
|
-
_classCallCheck(this, BasicReissueStatusSelect);
|
|
10
|
+
import React from "react";
|
|
11
|
+
import GetFormItem from "../../GetFormItem";
|
|
12
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
13
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { BsSystemOrder as Goods } from "@kmkf-fe-packages/basic-components";
|
|
15
|
+
import { BsSystemOrderTable } from "../../Common";
|
|
16
|
+
import { BsHeaderChild } from "../common/index";
|
|
17
|
+
var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
18
|
+
var _this = this,
|
|
19
|
+
_this$componentConfig;
|
|
20
|
+
_classCallCheck(this, BsSystemOrder);
|
|
25
21
|
_defineProperty(this, "name", void 0);
|
|
26
22
|
_defineProperty(this, "id", void 0);
|
|
27
23
|
_defineProperty(this, "sortField", void 0);
|
|
28
24
|
_defineProperty(this, "type", void 0);
|
|
29
25
|
_defineProperty(this, "rules", void 0);
|
|
30
26
|
_defineProperty(this, "componentConfig", void 0);
|
|
27
|
+
_defineProperty(this, "effects", void 0);
|
|
31
28
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
32
29
|
_defineProperty(this, "formField", void 0);
|
|
33
30
|
_defineProperty(this, "canSort", void 0);
|
|
34
|
-
_defineProperty(this, "children", void 0);
|
|
35
31
|
_defineProperty(this, "dataType", void 0);
|
|
36
|
-
_defineProperty(this, "
|
|
37
|
-
_defineProperty(this, "editRender", function (p) {
|
|
38
|
-
var _this$componentConfig, _this$componentConfig2;
|
|
39
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
40
|
-
title: _this.name,
|
|
41
|
-
name: _this.id,
|
|
42
|
-
rules: _this.rules,
|
|
43
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
44
|
-
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
45
|
-
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
46
|
-
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
47
|
-
showSearch: true
|
|
48
|
-
}))
|
|
49
|
-
});
|
|
50
|
-
});
|
|
32
|
+
_defineProperty(this, "children", void 0);
|
|
51
33
|
_defineProperty(this, "renderClient", function (record) {
|
|
52
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
53
35
|
id: _this.id,
|
|
54
36
|
label: _this.name,
|
|
55
|
-
value: (
|
|
56
|
-
|
|
37
|
+
value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
|
|
38
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
39
|
+
})
|
|
40
|
+
})) : null;
|
|
57
41
|
});
|
|
58
|
-
_defineProperty(this, "renderPc", function (
|
|
59
|
-
|
|
60
|
-
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_status")]) !== null && _record !== void 0 ? _record : '--');
|
|
42
|
+
_defineProperty(this, "renderPc", function () {
|
|
43
|
+
return null;
|
|
61
44
|
});
|
|
62
45
|
_defineProperty(this, "renderLog", function (r) {
|
|
63
|
-
|
|
64
|
-
return _this.renderPc(undefined, r);
|
|
46
|
+
return null;
|
|
65
47
|
});
|
|
66
48
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id
|
|
49
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
68
50
|
});
|
|
69
|
-
_defineProperty(this, "renderExport", function (
|
|
70
|
-
|
|
71
|
-
|
|
51
|
+
_defineProperty(this, "renderExport", function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "editRender", function (p) {
|
|
55
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
56
|
+
title: _this.name,
|
|
57
|
+
name: _this.id,
|
|
58
|
+
rules: _this.rules,
|
|
59
|
+
required: false,
|
|
60
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
61
|
+
component: /*#__PURE__*/React.createElement(Goods, {
|
|
62
|
+
onChange: p === null || p === void 0 ? void 0 : p.onChange
|
|
63
|
+
})
|
|
64
|
+
});
|
|
72
65
|
});
|
|
73
66
|
_defineProperty(this, "filterConfig", function (item) {
|
|
74
|
-
return
|
|
75
|
-
searchDefaultConditions: SYMBOL.in,
|
|
76
|
-
type: item.type,
|
|
77
|
-
id: "".concat(item.id, "_reissue_status"),
|
|
78
|
-
// 过滤组件id
|
|
79
|
-
name: item.name,
|
|
80
|
-
// 过滤组件名称
|
|
81
|
-
filterComponentType: 'MultipleSelect',
|
|
82
|
-
props: {
|
|
83
|
-
options: statusOptions
|
|
84
|
-
},
|
|
85
|
-
filterFn: function filterFn(value) {
|
|
86
|
-
return function (i) {
|
|
87
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'select'));
|
|
88
|
-
};
|
|
89
|
-
} // 第一个为选中值,第二个参数为表格行记录值
|
|
90
|
-
};
|
|
67
|
+
return [];
|
|
91
68
|
});
|
|
92
69
|
this.name = options.name;
|
|
93
70
|
this.id = options.id;
|
|
94
|
-
this.sortField = "".concat(options.id
|
|
95
|
-
this.formField = "".concat(options.id
|
|
71
|
+
this.sortField = "".concat(options.id);
|
|
72
|
+
this.formField = "".concat(options.id);
|
|
96
73
|
this.type = options.type;
|
|
97
|
-
this.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
74
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
75
|
+
this.isCombinationComponent = true;
|
|
76
|
+
this.canSort = false;
|
|
77
|
+
this.children = [new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
78
|
+
name: "单据类型",
|
|
79
|
+
id: "".concat(options.id, "_billType")
|
|
80
|
+
})), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
81
|
+
name: "系统订单号",
|
|
82
|
+
id: "".concat(options.id, "_billNo")
|
|
83
|
+
})), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
84
|
+
name: "标签",
|
|
85
|
+
id: "".concat(options.id, "_billTag")
|
|
86
|
+
}))];
|
|
87
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
88
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
|
|
89
|
+
required: true,
|
|
90
|
+
validator: function validator(_, value) {
|
|
91
|
+
var _value$selectIds;
|
|
92
|
+
if (!value || !(value !== null && value !== void 0 && (_value$selectIds = value.selectIds) !== null && _value$selectIds !== void 0 && _value$selectIds.length)) {
|
|
93
|
+
return Promise.reject(new Error("请选择bs系统订单号"));
|
|
94
|
+
}
|
|
95
|
+
return Promise.resolve();
|
|
96
|
+
}
|
|
97
|
+
}] : [];
|
|
98
|
+
this.dataType = "object";
|
|
106
99
|
});
|
|
107
|
-
export default
|
|
100
|
+
export default BsSystemOrder;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as BsType } from
|
|
2
|
-
export { default as BsMemo } from
|
|
3
|
-
export { default as BsHeaderPic } from
|
|
4
|
-
export { default as BsHeaderChild } from
|
|
5
|
-
export { default as BsHeaderGood } from
|
|
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 BsHeaderChild } from "./BsHeaderChild";
|
|
5
|
+
export { default as BsHeaderGood } from "./BsHeaderGood";
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
export { default as BsType } from "./BsType";
|
|
2
2
|
export { default as BsMemo } from "./BsMemo";
|
|
3
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";
|
|
11
4
|
export { default as BsHeaderChild } from "./BsHeaderChild";
|
|
12
5
|
export { default as BsHeaderGood } from "./BsHeaderGood";
|
|
@@ -27,4 +27,5 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
|
27
27
|
text?: string | undefined;
|
|
28
28
|
}) => React.JSX.Element;
|
|
29
29
|
export declare const FileRender: ({ fileList }: any) => React.JSX.Element;
|
|
30
|
+
export declare const BsSystemOrderTable: ({ value }: any) => React.JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -467,4 +467,41 @@ export var FileRender = function FileRender(_ref10) {
|
|
|
467
467
|
controls: true,
|
|
468
468
|
src: fileUrl
|
|
469
469
|
})));
|
|
470
|
+
};
|
|
471
|
+
export var BsSystemOrderTable = function BsSystemOrderTable(_ref11) {
|
|
472
|
+
var value = _ref11.value;
|
|
473
|
+
var columns = [{
|
|
474
|
+
dataIndex: "billType",
|
|
475
|
+
title: "单据类型"
|
|
476
|
+
}, {
|
|
477
|
+
dataIndex: "billNo",
|
|
478
|
+
title: "系统订单号"
|
|
479
|
+
}, {
|
|
480
|
+
dataIndex: "billTag",
|
|
481
|
+
title: "标签"
|
|
482
|
+
}];
|
|
483
|
+
var rowSelection = {
|
|
484
|
+
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
485
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
486
|
+
return {
|
|
487
|
+
disabled: true,
|
|
488
|
+
// Column configuration not to be checked
|
|
489
|
+
name: record.name
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
494
|
+
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
495
|
+
columns: columns,
|
|
496
|
+
rowSelection: rowSelection,
|
|
497
|
+
rowKey: "billNo",
|
|
498
|
+
size: "small",
|
|
499
|
+
pagination: false,
|
|
500
|
+
scroll: {
|
|
501
|
+
x: "100%"
|
|
502
|
+
},
|
|
503
|
+
locale: {
|
|
504
|
+
emptyText: "暂无数据"
|
|
505
|
+
}
|
|
506
|
+
});
|
|
470
507
|
};
|
|
@@ -27,12 +27,6 @@ var typeMap = {
|
|
|
27
27
|
name: 'bs',
|
|
28
28
|
company: 'bsLogisticsCompany',
|
|
29
29
|
code: 'bsLogisticsCode'
|
|
30
|
-
},
|
|
31
|
-
REISSUE_LOGISTICS: {
|
|
32
|
-
key: 'reissueLogisticsList',
|
|
33
|
-
name: 'reissue',
|
|
34
|
-
company: 'reissueLogisticsCompany',
|
|
35
|
-
code: 'reissueLogisticsCode'
|
|
36
30
|
}
|
|
37
31
|
};
|
|
38
32
|
var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
|
|
@@ -32,8 +32,7 @@ var typeMap = {
|
|
|
32
32
|
};
|
|
33
33
|
var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
34
34
|
var _this = this,
|
|
35
|
-
_options$componentCon
|
|
36
|
-
_options$componentCon2;
|
|
35
|
+
_options$componentCon;
|
|
37
36
|
_classCallCheck(this, BasicPosting);
|
|
38
37
|
_defineProperty(this, "name", void 0);
|
|
39
38
|
_defineProperty(this, "id", void 0);
|
|
@@ -201,8 +200,8 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
201
200
|
this.canSort = false;
|
|
202
201
|
this.children = [];
|
|
203
202
|
this.dataType = "string";
|
|
204
|
-
this.addressDateInstance = options.type === "BS_POSTING"
|
|
205
|
-
this.rules = options !== null && options !== void 0 && (_options$
|
|
203
|
+
this.addressDateInstance = options.type === "BS_POSTING" ? BsAddressData.getInstance() : AddressData.getInstance();
|
|
204
|
+
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
206
205
|
validator: function validator(_, value) {
|
|
207
206
|
var _value$postingAddress;
|
|
208
207
|
if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
|
|
@@ -10,7 +10,7 @@ declare class BasicRadio implements ComponentInterface {
|
|
|
10
10
|
sortField: string;
|
|
11
11
|
type: string;
|
|
12
12
|
rules: any[];
|
|
13
|
-
componentConfig: ComponentInterface[
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
14
|
isCombinationComponent: boolean;
|
|
15
15
|
formField: string;
|
|
16
16
|
canSort: boolean;
|
|
@@ -26,7 +26,6 @@ declare class BasicRadio implements ComponentInterface {
|
|
|
26
26
|
other: any;
|
|
27
27
|
};
|
|
28
28
|
renderExport: (value: any, record: Record) => string;
|
|
29
|
-
getKeyByComponentType: (type: string) => any;
|
|
30
29
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
31
30
|
editRender: (p: any) => React.JSX.Element;
|
|
32
31
|
filterConfig: (item: ColumnConfig) => {
|
|
@@ -13,10 +13,6 @@ import ItemView from "../../commonComponents/ItemView";
|
|
|
13
13
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
import get from 'lodash/get';
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
|
-
var typeMap = {
|
|
17
|
-
BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
|
|
18
|
-
RADIO: 'radio'
|
|
19
|
-
};
|
|
20
16
|
var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
21
17
|
var _this = this,
|
|
22
18
|
_this$componentConfig3,
|
|
@@ -39,33 +35,26 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
39
35
|
return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
|
|
40
36
|
});
|
|
41
37
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
42
|
-
|
|
43
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type], "Other")]) === undefined) {
|
|
38
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radioOther")]) === undefined) {
|
|
44
39
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
45
40
|
}
|
|
46
|
-
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "
|
|
41
|
+
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")], record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radioOther")]);
|
|
47
42
|
});
|
|
48
43
|
_defineProperty(this, "renderLog", function (r) {
|
|
49
|
-
|
|
50
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type], "Other")])) return null;
|
|
44
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radio")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radioOther")])) return null;
|
|
51
45
|
return _this.renderPc(undefined, r);
|
|
52
46
|
});
|
|
53
47
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
54
|
-
var type = _this.type;
|
|
55
48
|
return {
|
|
56
|
-
value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
57
|
-
other: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
49
|
+
value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radio")],
|
|
50
|
+
other: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_radioOther")]
|
|
58
51
|
};
|
|
59
52
|
});
|
|
60
53
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
61
|
-
|
|
62
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) === undefined) {
|
|
54
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")]) === undefined) {
|
|
63
55
|
return '--';
|
|
64
56
|
}
|
|
65
|
-
return "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "
|
|
66
|
-
});
|
|
67
|
-
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
68
|
-
return typeMap[type] || '';
|
|
57
|
+
return "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_radio")], " ").concat(get(record, "".concat(_this.id, "_radioOther"), ''));
|
|
69
58
|
});
|
|
70
59
|
_defineProperty(this, "renderClient", function (record) {
|
|
71
60
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -89,11 +78,10 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
89
78
|
});
|
|
90
79
|
_defineProperty(this, "filterConfig", function (item) {
|
|
91
80
|
var _item$config, _item$config2, _item$config2$options, _item$config3;
|
|
92
|
-
var key = _this.getKeyByComponentType(item.type);
|
|
93
81
|
return {
|
|
94
82
|
searchDefaultConditions: SYMBOL.in,
|
|
95
83
|
type: item.type,
|
|
96
|
-
id: "".concat(item.id, "
|
|
84
|
+
id: "".concat(item.id, "_radio"),
|
|
97
85
|
// 过滤组件id
|
|
98
86
|
name: item.name,
|
|
99
87
|
// 过滤组件名称
|
|
@@ -106,7 +94,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
106
94
|
},
|
|
107
95
|
filterFn: function filterFn(value) {
|
|
108
96
|
return function (i) {
|
|
109
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
97
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'radio'));
|
|
110
98
|
};
|
|
111
99
|
} // 第一个为选中值,第二个参数为表格行记录值
|
|
112
100
|
};
|
|
@@ -119,8 +107,8 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
119
107
|
this.type = options.type;
|
|
120
108
|
this.isCombinationComponent = false;
|
|
121
109
|
this.canSort = true;
|
|
122
|
-
this.sortField = "".concat(options.id, "
|
|
123
|
-
this.formField = "".concat(options.id, "
|
|
110
|
+
this.sortField = "".concat(options.id, "_radio");
|
|
111
|
+
this.formField = "".concat(options.id, "_radio");
|
|
124
112
|
this.children = [];
|
|
125
113
|
this.componentConfig = options.componentConfig;
|
|
126
114
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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, FlowWorkOrderId, BsGoods, BsExchange, BsReissue,
|
|
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, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsSystemOrder } 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) => BsSystemOrder | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, FlowWorkOrderId, BsGoods, BsExchange, BsReissue,
|
|
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, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsSystemOrder } from "./index";
|
|
2
2
|
export var factory = function factory(type, options) {
|
|
3
3
|
var _options$componentCon;
|
|
4
4
|
switch (type) {
|
|
@@ -15,7 +15,6 @@ export var factory = function factory(type, options) {
|
|
|
15
15
|
case "INPUT":
|
|
16
16
|
return new BasicInput(options);
|
|
17
17
|
case "RADIO":
|
|
18
|
-
case "BUYER_MESSAGE_NOTICE":
|
|
19
18
|
return new BasicRadio(options);
|
|
20
19
|
case "TEXTAREA":
|
|
21
20
|
return new BasicTextArea(options);
|
|
@@ -106,12 +105,13 @@ export var factory = function factory(type, options) {
|
|
|
106
105
|
return new TemplateSelect(options);
|
|
107
106
|
case "JST_LOGISTICS":
|
|
108
107
|
case "BS_LOGISTICS":
|
|
109
|
-
case "REISSUE_LOGISTICS":
|
|
110
108
|
return new JstLogistics(options);
|
|
111
109
|
case "JST_ITEM_SELECT_THIRD":
|
|
112
110
|
return new JstItemSelect(options);
|
|
113
111
|
case "JST_SUPPLY":
|
|
114
112
|
return new JstSupply(options);
|
|
113
|
+
case "BS_SYSTEM_ORDER":
|
|
114
|
+
return new BsSystemOrder(options);
|
|
115
115
|
case "JST_SEND_GOOD":
|
|
116
116
|
case "BS_SEND_GOOD":
|
|
117
117
|
return new JstSendGood(options);
|
|
@@ -127,10 +127,6 @@ export var factory = function factory(type, options) {
|
|
|
127
127
|
return new FlowWorkOrderId(options);
|
|
128
128
|
case "OUTER_WORK_ORDER_ID_INPUT":
|
|
129
129
|
return new FlowWorkOrderId(options);
|
|
130
|
-
case "REISSUE_STATUS":
|
|
131
|
-
return new ReissueStatus(options);
|
|
132
|
-
case "REISSUE_TRADE_ID":
|
|
133
|
-
return new ReissueTradeId(options);
|
|
134
130
|
default:
|
|
135
131
|
return new BasicInput(options);
|
|
136
132
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { default as JstLogistics } from "./components/JST/JstLogistics";
|
|
|
37
37
|
export { default as JstItemSelect } from "./components/JST/JstItemSelect";
|
|
38
38
|
export { default as JstSendGood } from "./components/JST/JstSendGood";
|
|
39
39
|
export { default as JstSupply } from "./components/JST/JstSupply";
|
|
40
|
+
export { default as BsSystemOrder } from "./components/BS/BsSystemOrder";
|
|
40
41
|
export { default as BsGoods } from "./components/BS/BsGoods";
|
|
41
42
|
export { default as BsExchange } from "./components/BS/BsExchange";
|
|
42
43
|
export { default as BsReissue } from "./components/BS/BsReissue";
|
|
@@ -51,8 +52,6 @@ export { default as Submitter } from "./components/Submitter";
|
|
|
51
52
|
export { default as Handler } from "./components/Handler";
|
|
52
53
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
53
54
|
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
54
|
-
export { default as ReissueStatus } from "./components/ReissueStatus";
|
|
55
|
-
export { default as ReissueTradeId } from "./components/ReissueTradeId";
|
|
56
55
|
export { factory } from "./factory";
|
|
57
56
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
58
57
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export { default as JstLogistics } from "./components/JST/JstLogistics";
|
|
|
37
37
|
export { default as JstItemSelect } from "./components/JST/JstItemSelect";
|
|
38
38
|
export { default as JstSendGood } from "./components/JST/JstSendGood";
|
|
39
39
|
export { default as JstSupply } from "./components/JST/JstSupply";
|
|
40
|
+
export { default as BsSystemOrder } from "./components/BS/BsSystemOrder";
|
|
40
41
|
export { default as BsGoods } from "./components/BS/BsGoods";
|
|
41
42
|
export { default as BsExchange } from "./components/BS/BsExchange";
|
|
42
43
|
export { default as BsReissue } from "./components/BS/BsReissue";
|
|
@@ -51,8 +52,6 @@ export { default as Submitter } from "./components/Submitter";
|
|
|
51
52
|
export { default as Handler } from "./components/Handler";
|
|
52
53
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
53
54
|
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
54
|
-
export { default as ReissueStatus } from "./components/ReissueStatus";
|
|
55
|
-
export { default as ReissueTradeId } from "./components/ReissueTradeId";
|
|
56
55
|
export { factory } from "./factory";
|
|
57
56
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
58
57
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface ComponentInterface {
|
|
|
62
62
|
/**
|
|
63
63
|
* @description 显示字段名称
|
|
64
64
|
*/
|
|
65
|
-
showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all"
|
|
65
|
+
showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all";
|
|
66
66
|
/**
|
|
67
67
|
* @description 是否选择SKU
|
|
68
68
|
*/
|
|
@@ -143,7 +143,6 @@ export interface ComponentInterface {
|
|
|
143
143
|
* @description 针对ERP的订单组件需要特殊展示,此处增加一个特殊标识
|
|
144
144
|
*/
|
|
145
145
|
erpFlag?: boolean;
|
|
146
|
-
reissueFlag?: boolean;
|
|
147
146
|
showHeader?: string[];
|
|
148
147
|
reasonList?: any[];
|
|
149
148
|
disabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.14-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.14-alpha.0",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.14-alpha.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "39e89b9b763df52e814d9e6f2a58c63b39c4769a"
|
|
44
44
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare class BasicReissueStatusSelect implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
-
isCombinationComponent: boolean;
|
|
11
|
-
formField: string;
|
|
12
|
-
canSort: boolean;
|
|
13
|
-
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface['dataType'];
|
|
15
|
-
options: ComponentInterface['options'];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
editRender: (p: any) => React.JSX.Element;
|
|
18
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
-
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderExport: (value: any, record: Record) => any;
|
|
23
|
-
filterConfig: (item: ColumnConfig) => {
|
|
24
|
-
searchDefaultConditions: "in";
|
|
25
|
-
type: string;
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
filterComponentType: "MultipleSelect";
|
|
29
|
-
props: {
|
|
30
|
-
options: {
|
|
31
|
-
value: string;
|
|
32
|
-
}[];
|
|
33
|
-
};
|
|
34
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export default BasicReissueStatusSelect;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class ReissueTradeId implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
rules: any[];
|
|
9
|
-
showContains: boolean;
|
|
10
|
-
onlyContainsString: boolean;
|
|
11
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
-
effects: ComponentInterface["effects"];
|
|
13
|
-
isCombinationComponent: boolean;
|
|
14
|
-
formField: string;
|
|
15
|
-
canSort: boolean;
|
|
16
|
-
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface["dataType"];
|
|
18
|
-
constructor(options: PickOption);
|
|
19
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
-
copyHandle: (text: string) => void;
|
|
21
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
22
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
23
|
-
getComponentValue: (r: Record) => any;
|
|
24
|
-
renderExport: (value: unknown, record: Record) => any;
|
|
25
|
-
editRender: (p: any) => React.JSX.Element;
|
|
26
|
-
filterConfig: (item: ColumnConfig) => {
|
|
27
|
-
searchDefaultConditions: "in";
|
|
28
|
-
type: string;
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
filterComponentType: "Input";
|
|
32
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
33
|
-
formatFilterValue: (input: string) => string[];
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export default ReissueTradeId;
|
|
@@ -1,132 +0,0 @@
|
|
|
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
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); } }
|
|
4
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
-
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; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
-
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); }
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { message } from "antd";
|
|
11
|
-
import { TradeId } from "@kmkf-fe-packages/basic-components";
|
|
12
|
-
import { CopyOutlined } from "@ant-design/icons";
|
|
13
|
-
import GetFormItem from "../GetFormItem";
|
|
14
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
-
import copy from "copy-to-clipboard";
|
|
17
|
-
import { SYMBOL } from "../../constant";
|
|
18
|
-
var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options) {
|
|
19
|
-
var _this = this;
|
|
20
|
-
_classCallCheck(this, ReissueTradeId);
|
|
21
|
-
_defineProperty(this, "name", void 0);
|
|
22
|
-
_defineProperty(this, "id", void 0);
|
|
23
|
-
_defineProperty(this, "sortField", void 0);
|
|
24
|
-
_defineProperty(this, "type", void 0);
|
|
25
|
-
_defineProperty(this, "rules", void 0);
|
|
26
|
-
_defineProperty(this, "showContains", void 0);
|
|
27
|
-
_defineProperty(this, "onlyContainsString", void 0);
|
|
28
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
-
_defineProperty(this, "effects", void 0);
|
|
30
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
31
|
-
_defineProperty(this, "formField", void 0);
|
|
32
|
-
_defineProperty(this, "canSort", void 0);
|
|
33
|
-
_defineProperty(this, "children", void 0);
|
|
34
|
-
_defineProperty(this, "dataType", void 0);
|
|
35
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
36
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
37
|
-
id: _this.id,
|
|
38
|
-
label: _this.name,
|
|
39
|
-
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
40
|
-
}) : null;
|
|
41
|
-
});
|
|
42
|
-
_defineProperty(this, "copyHandle", function (text) {
|
|
43
|
-
copy(text);
|
|
44
|
-
message.success("复制成功");
|
|
45
|
-
});
|
|
46
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
47
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")]) === undefined) {
|
|
48
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
51
|
-
onClick: function onClick(e) {
|
|
52
|
-
return e.stopPropagation();
|
|
53
|
-
}
|
|
54
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")], /*#__PURE__*/React.createElement("span", {
|
|
55
|
-
onClick: function onClick(e) {
|
|
56
|
-
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")]);
|
|
57
|
-
e.stopPropagation();
|
|
58
|
-
}
|
|
59
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
60
|
-
style: {
|
|
61
|
-
paddingLeft: "4px",
|
|
62
|
-
cursor: "pointer"
|
|
63
|
-
}
|
|
64
|
-
}, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
|
|
65
|
-
});
|
|
66
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
67
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_reissue_tradeId")])) return null;
|
|
68
|
-
return _this.renderPc(undefined, r);
|
|
69
|
-
});
|
|
70
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
71
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_reissue_tradeId")];
|
|
72
|
-
});
|
|
73
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
74
|
-
var _record;
|
|
75
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")]) !== null && _record !== void 0 ? _record : "--";
|
|
76
|
-
});
|
|
77
|
-
_defineProperty(this, "editRender", function (p) {
|
|
78
|
-
var _this$componentConfig, _this$componentConfig2, _this$effects, _this$effects2;
|
|
79
|
-
var onTradeIdBlur = function onTradeIdBlur(e) {
|
|
80
|
-
var _p$onBlur;
|
|
81
|
-
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, e.target.value, "tradeId");
|
|
82
|
-
};
|
|
83
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
84
|
-
title: _this.name,
|
|
85
|
-
name: _this.id,
|
|
86
|
-
rules: _this.rules,
|
|
87
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
88
|
-
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
89
|
-
component: /*#__PURE__*/React.createElement(TradeId, _extends({}, _this.componentConfig, {
|
|
90
|
-
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
91
|
-
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
92
|
-
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
93
|
-
disabled: true,
|
|
94
|
-
onBlur: onTradeIdBlur
|
|
95
|
-
}))
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
99
|
-
return {
|
|
100
|
-
searchDefaultConditions: SYMBOL.in,
|
|
101
|
-
type: item.type,
|
|
102
|
-
id: "".concat(item.id, "_reissue_tradeId"),
|
|
103
|
-
// 过滤组件id
|
|
104
|
-
name: item.name,
|
|
105
|
-
// 过滤组件名称
|
|
106
|
-
filterComponentType: "Input",
|
|
107
|
-
filterFn: function filterFn(value) {
|
|
108
|
-
return function (i) {
|
|
109
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "tradeId"), value);
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
formatFilterValue: function formatFilterValue(input) {
|
|
113
|
-
return input.split(/[,|,]/);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
});
|
|
117
|
-
this.name = options.name;
|
|
118
|
-
this.id = options.id;
|
|
119
|
-
this.sortField = "".concat(options.id, "_reissue_tradeId");
|
|
120
|
-
this.formField = "".concat(options.id, "_reissue_tradeId");
|
|
121
|
-
this.type = options.type;
|
|
122
|
-
this.showContains = false;
|
|
123
|
-
this.onlyContainsString = true;
|
|
124
|
-
this.componentConfig = options.componentConfig;
|
|
125
|
-
this.effects = options.effects;
|
|
126
|
-
this.rules = [];
|
|
127
|
-
this.isCombinationComponent = false;
|
|
128
|
-
this.canSort = true;
|
|
129
|
-
this.children = [];
|
|
130
|
-
this.dataType = "string";
|
|
131
|
-
});
|
|
132
|
-
export default ReissueTradeId;
|