@kmkf-fe-packages/services-components 0.6.3 → 0.7.1-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/README.md +2 -0
- package/dist/esm/commonComponents/ItemView/index.d.ts +1 -1
- package/dist/esm/commonComponents/OperationLog/index.d.ts +8 -0
- package/dist/esm/commonComponents/OperationLog/index.js +127 -0
- package/dist/esm/commonComponents/PlatformAvatar/index.d.ts +7 -0
- package/dist/esm/commonComponents/PlatformAvatar/index.js +28 -0
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +9 -0
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +92 -0
- package/dist/esm/commonComponents/ShopList/index.d.ts +13 -0
- package/dist/esm/commonComponents/ShopList/index.js +34 -0
- package/dist/esm/components/ActualPayment/index.d.ts +12 -13
- package/dist/esm/components/ActualPayment/index.js +28 -26
- package/dist/esm/components/Address/index.d.ts +9 -16
- package/dist/esm/components/Address/index.js +17 -26
- package/dist/esm/components/Alipay/index.d.ts +15 -19
- package/dist/esm/components/Alipay/index.js +15 -20
- package/dist/esm/components/AlipayAccount/index.d.ts +13 -15
- package/dist/esm/components/AlipayAccount/index.js +29 -28
- package/dist/esm/components/AlipayName/index.d.ts +13 -15
- package/dist/esm/components/AlipayName/index.js +29 -28
- package/dist/esm/components/BuyerNick/index.d.ts +14 -15
- package/dist/esm/components/BuyerNick/index.js +41 -28
- package/dist/esm/components/Cascader/index.d.ts +13 -25
- package/dist/esm/components/Cascader/index.js +38 -31
- package/dist/esm/components/Checkbox/index.d.ts +15 -11
- package/dist/esm/components/Checkbox/index.js +45 -26
- package/dist/esm/components/CommonDataTime/index.d.ts +11 -11
- package/dist/esm/components/CommonDataTime/index.js +27 -24
- package/dist/esm/components/CompletedUser/index.d.ts +30 -0
- package/dist/esm/components/CompletedUser/index.js +64 -0
- package/dist/esm/components/DataTime/index.d.ts +12 -11
- package/dist/esm/components/DataTime/index.js +30 -26
- package/dist/esm/components/EItemEnCode/index.d.ts +11 -11
- package/dist/esm/components/EItemEnCode/index.js +34 -27
- package/dist/esm/components/EItemId/index.d.ts +11 -11
- package/dist/esm/components/EItemId/index.js +34 -27
- package/dist/esm/components/EItemSelect/index.d.ts +6 -12
- package/dist/esm/components/EItemSelect/index.js +16 -24
- package/dist/esm/components/ErpTradeId/index.d.ts +12 -13
- package/dist/esm/components/ErpTradeId/index.js +28 -26
- package/dist/esm/components/Express/index.d.ts +15 -17
- package/dist/esm/components/Express/index.js +30 -36
- package/dist/esm/components/ExpressCode/index.d.ts +16 -18
- package/dist/esm/components/ExpressCode/index.js +34 -32
- package/dist/esm/components/FlowStatusSelect/index.d.ts +16 -34
- package/dist/esm/components/FlowStatusSelect/index.js +38 -25
- package/dist/esm/components/GetFormItem/index.d.ts +3 -3
- package/dist/esm/components/GetFormItem/index.js +3 -3
- package/dist/esm/components/Grade/index.d.ts +6 -12
- package/dist/esm/components/Grade/index.js +14 -23
- package/dist/esm/components/Handler/index.d.ts +32 -0
- package/dist/esm/components/Handler/index.js +74 -0
- package/dist/esm/components/Input/index.d.ts +11 -12
- package/dist/esm/components/Input/index.js +29 -28
- package/dist/esm/components/JstItemSelect/index.d.ts +13 -13
- package/dist/esm/components/JstItemSelect/index.js +48 -28
- package/dist/esm/components/JstLogistics/index.d.ts +21 -13
- package/dist/esm/components/JstLogistics/index.js +50 -29
- package/dist/esm/components/JstSendGood/index.d.ts +12 -12
- package/dist/esm/components/JstSendGood/index.js +54 -29
- package/dist/esm/components/JstSupply/index.d.ts +12 -12
- package/dist/esm/components/JstSupply/index.js +54 -29
- package/dist/esm/components/Logistics/index.d.ts +23 -27
- package/dist/esm/components/Logistics/index.js +19 -20
- package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +33 -0
- package/dist/esm/components/LogisticsInterception/InterceptAddress.js +134 -0
- package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +38 -0
- package/dist/esm/components/LogisticsInterception/InterceptStatus.js +102 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +36 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.js +84 -0
- package/dist/esm/components/LogisticsInterception/columnHeader.d.ts +5 -0
- package/dist/esm/components/LogisticsInterception/columnHeader.js +55 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +75 -0
- package/dist/esm/components/LogisticsInterception/index.js +136 -0
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.d.ts +30 -0
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +74 -0
- package/dist/esm/components/MultSelect/index.d.ts +12 -12
- package/dist/esm/components/MultSelect/index.js +31 -24
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +11 -22
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +26 -32
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +11 -22
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +25 -31
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +11 -17
- package/dist/esm/components/Ordinary/OrdinarySerial.js +26 -22
- package/dist/esm/components/Ordinary/index.d.ts +17 -24
- package/dist/esm/components/Ordinary/index.js +20 -12
- package/dist/esm/components/Payment/AlipayNick.d.ts +11 -22
- package/dist/esm/components/Payment/AlipayNick.js +29 -34
- package/dist/esm/components/Payment/AlipayNo.d.ts +11 -21
- package/dist/esm/components/Payment/AlipayNo.js +29 -34
- package/dist/esm/components/Payment/AlipayTime.d.ts +11 -23
- package/dist/esm/components/Payment/AlipayTime.js +26 -35
- package/dist/esm/components/Payment/BuyerNick.d.ts +11 -22
- package/dist/esm/components/Payment/BuyerNick.js +26 -32
- package/dist/esm/components/Payment/PaymentAmount.d.ts +11 -22
- package/dist/esm/components/Payment/PaymentAmount.js +24 -30
- package/dist/esm/components/Payment/PaymentStatus.d.ts +17 -29
- package/dist/esm/components/Payment/PaymentStatus.js +48 -41
- package/dist/esm/components/Payment/PaymentTid.d.ts +11 -22
- package/dist/esm/components/Payment/PaymentTid.js +24 -30
- package/dist/esm/components/Payment/index.d.ts +36 -97
- package/dist/esm/components/Payment/index.js +22 -20
- package/dist/esm/components/Picture/index.d.ts +11 -11
- package/dist/esm/components/Picture/index.js +14 -19
- package/dist/esm/components/PlatForm/index.d.ts +31 -0
- package/dist/esm/components/PlatForm/index.js +67 -0
- package/dist/esm/components/Radio/index.d.ts +15 -10
- package/dist/esm/components/Radio/index.js +34 -20
- package/dist/esm/components/Rate/index.d.ts +6 -11
- package/dist/esm/components/Rate/index.js +17 -30
- package/dist/esm/components/ReceiverAddress/index.d.ts +11 -14
- package/dist/esm/components/ReceiverAddress/index.js +22 -29
- package/dist/esm/components/ReceiverMobile/index.d.ts +11 -12
- package/dist/esm/components/ReceiverMobile/index.js +29 -27
- package/dist/esm/components/ReceiverName/index.d.ts +11 -12
- package/dist/esm/components/ReceiverName/index.js +29 -27
- package/dist/esm/components/Remark/index.d.ts +14 -11
- package/dist/esm/components/Remark/index.js +31 -23
- package/dist/esm/components/ReturnLogistics/index.d.ts +26 -25
- package/dist/esm/components/ReturnLogistics/index.js +19 -10
- package/dist/esm/components/Select/index.d.ts +12 -11
- package/dist/esm/components/Select/index.js +28 -23
- package/dist/esm/components/ShopInput/index.d.ts +28 -0
- package/dist/esm/components/ShopInput/index.js +76 -0
- package/dist/esm/components/ShopName/index.d.ts +12 -13
- package/dist/esm/components/ShopName/index.js +28 -25
- package/dist/esm/components/Submitter/index.d.ts +30 -0
- package/dist/esm/components/Submitter/index.js +64 -0
- package/dist/esm/components/SystemOrderNo/index.d.ts +13 -14
- package/dist/esm/components/SystemOrderNo/index.js +27 -25
- package/dist/esm/components/TemplateSelect/index.d.ts +13 -13
- package/dist/esm/components/TemplateSelect/index.js +29 -24
- package/dist/esm/components/TextArea/index.d.ts +11 -11
- package/dist/esm/components/TextArea/index.js +27 -24
- package/dist/esm/components/ThirdItemSelect/index.d.ts +11 -11
- package/dist/esm/components/ThirdItemSelect/index.js +36 -28
- package/dist/esm/components/TradeDateTime/index.d.ts +13 -5
- package/dist/esm/components/TradeDateTime/index.js +52 -17
- package/dist/esm/components/TradeId/index.d.ts +11 -6
- package/dist/esm/components/TradeId/index.js +27 -14
- package/dist/esm/components/WorkOrderId/index.d.ts +11 -12
- package/dist/esm/components/WorkOrderId/index.js +36 -29
- package/dist/esm/factory.d.ts +3 -0
- package/dist/esm/factory.js +105 -0
- package/dist/esm/index.d.ts +52 -40
- package/dist/esm/index.js +13 -1
- package/dist/esm/type.d.ts +53 -45
- package/package.json +10 -5
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare class ErpTradeId implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
-
canFilter: boolean;
|
|
9
|
-
canGroup: boolean;
|
|
10
|
-
canHidden: boolean;
|
|
11
|
-
dataType: DataType;
|
|
12
|
-
showContains: boolean;
|
|
13
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
isCombinationComponent: boolean;
|
|
10
|
+
children: ComponentInterface[];
|
|
14
11
|
constructor(options: PickOption);
|
|
15
|
-
render: (value: string) => JSX.Element;
|
|
16
12
|
renderClient: (record: any) => JSX.Element | null;
|
|
17
13
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
14
|
+
renderLog: (r: Record) => JSX.Element | null;
|
|
15
|
+
getComponentValue: (r: Record) => any;
|
|
18
16
|
renderExport: (value: any, record: Record) => any;
|
|
19
|
-
editRender: (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
editRender: () => JSX.Element;
|
|
18
|
+
filterConfig: (item: ColumnConfig) => {
|
|
19
|
+
type: string;
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
filterComponentType: "Input";
|
|
23
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
25
24
|
};
|
|
26
25
|
}
|
|
27
26
|
export default ErpTradeId;
|
|
@@ -1,6 +1,4 @@
|
|
|
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 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
|
-
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
2
|
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); } }
|
|
5
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -11,7 +9,7 @@ import React from 'react';
|
|
|
11
9
|
import { TradeId } from '@kmkf-fe-packages/basic-components';
|
|
12
10
|
import GetFormItem from "../GetFormItem";
|
|
13
11
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
13
|
var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
|
|
16
14
|
var _this = this;
|
|
17
15
|
_classCallCheck(this, ErpTradeId);
|
|
@@ -19,31 +17,32 @@ var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
|
|
|
19
17
|
_defineProperty(this, "id", void 0);
|
|
20
18
|
_defineProperty(this, "type", void 0);
|
|
21
19
|
_defineProperty(this, "rules", void 0);
|
|
22
|
-
_defineProperty(this, "canFilter", void 0);
|
|
23
|
-
_defineProperty(this, "canGroup", void 0);
|
|
24
|
-
_defineProperty(this, "canHidden", void 0);
|
|
25
|
-
_defineProperty(this, "dataType", void 0);
|
|
26
|
-
_defineProperty(this, "showContains", void 0);
|
|
27
20
|
_defineProperty(this, "componentConfig", void 0);
|
|
28
|
-
_defineProperty(this, "
|
|
29
|
-
|
|
30
|
-
});
|
|
21
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
22
|
+
_defineProperty(this, "children", void 0);
|
|
31
23
|
_defineProperty(this, "renderClient", function (record) {
|
|
32
24
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
33
25
|
id: _this.id,
|
|
34
26
|
label: _this.name,
|
|
35
|
-
value:
|
|
27
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
36
28
|
}) : null;
|
|
37
29
|
});
|
|
38
30
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
39
31
|
var _record;
|
|
40
32
|
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record : '--');
|
|
41
33
|
});
|
|
34
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
35
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_tradeId")])) return null;
|
|
36
|
+
return _this.renderPc(undefined, r);
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
39
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_tradeId")];
|
|
40
|
+
});
|
|
42
41
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
43
42
|
var _record2;
|
|
44
43
|
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
45
44
|
});
|
|
46
|
-
_defineProperty(this, "editRender", function (
|
|
45
|
+
_defineProperty(this, "editRender", function () {
|
|
47
46
|
var _this$componentConfig, _this$componentConfig2;
|
|
48
47
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
49
48
|
title: _this.name,
|
|
@@ -53,24 +52,27 @@ var ErpTradeId = /*#__PURE__*/_createClass(function ErpTradeId(options) {
|
|
|
53
52
|
component: /*#__PURE__*/React.createElement(TradeId, null)
|
|
54
53
|
});
|
|
55
54
|
});
|
|
56
|
-
_defineProperty(this, "
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
56
|
+
return {
|
|
57
|
+
type: item.type,
|
|
58
|
+
id: item.id,
|
|
59
|
+
// 过滤组件id
|
|
60
|
+
name: item.name,
|
|
61
|
+
// 过滤组件名称
|
|
62
|
+
filterComponentType: 'Input',
|
|
63
|
+
filterFn: function filterFn(value) {
|
|
64
|
+
return function (i) {
|
|
65
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'tradeId'), value);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
64
69
|
});
|
|
65
70
|
this.name = options.name;
|
|
66
71
|
this.id = options.id;
|
|
67
72
|
this.type = options.type;
|
|
68
|
-
this.canFilter = true;
|
|
69
|
-
this.canGroup = true;
|
|
70
|
-
this.canHidden = true;
|
|
71
|
-
this.dataType = 'tradeId';
|
|
72
|
-
this.showContains = true;
|
|
73
73
|
this.componentConfig = options.componentConfig;
|
|
74
74
|
this.rules = [];
|
|
75
|
+
this.isCombinationComponent = false;
|
|
76
|
+
this.children = [];
|
|
75
77
|
});
|
|
76
78
|
export default ErpTradeId;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
|
|
3
3
|
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
4
|
declare class Express implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
canFilter: boolean;
|
|
10
|
-
canGroup: boolean;
|
|
11
|
-
canHidden: boolean;
|
|
12
|
-
dataType: DataType;
|
|
13
|
-
showContains: boolean;
|
|
14
9
|
componentConfig: ComponentInterface["componentConfig"];
|
|
15
10
|
align: ALignType;
|
|
16
|
-
expressDateInstance: ExpressData
|
|
11
|
+
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
17
12
|
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
18
15
|
constructor(options: PickOption);
|
|
19
|
-
render: (value: string) => JSX.Element;
|
|
20
16
|
renderClient: (record: any) => JSX.Element | null;
|
|
21
|
-
renderPc: (value:
|
|
22
|
-
|
|
17
|
+
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
18
|
+
renderLog: (r: Record) => JSX.Element | null;
|
|
19
|
+
getComponentValue: (r: Record) => any;
|
|
20
|
+
renderExport: (value: string, record: Record) => any;
|
|
23
21
|
editRender: () => JSX.Element;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
type: string;
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
filterComponentType: "MultipleSelect";
|
|
27
|
+
options: any[];
|
|
28
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
31
29
|
};
|
|
32
30
|
}
|
|
33
31
|
export default Express;
|
|
@@ -1,6 +1,4 @@
|
|
|
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 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
|
-
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
2
|
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); } }
|
|
5
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -12,7 +10,7 @@ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
12
10
|
import GetFormItem from "../GetFormItem";
|
|
13
11
|
import ExpressCompany from "../ExpressCompany";
|
|
14
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
14
|
var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
17
15
|
var _this = this;
|
|
18
16
|
_classCallCheck(this, Express);
|
|
@@ -20,33 +18,34 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
20
18
|
_defineProperty(this, "id", void 0);
|
|
21
19
|
_defineProperty(this, "type", void 0);
|
|
22
20
|
_defineProperty(this, "rules", void 0);
|
|
23
|
-
_defineProperty(this, "canFilter", void 0);
|
|
24
|
-
_defineProperty(this, "canGroup", void 0);
|
|
25
|
-
_defineProperty(this, "canHidden", void 0);
|
|
26
|
-
_defineProperty(this, "dataType", void 0);
|
|
27
|
-
_defineProperty(this, "showContains", void 0);
|
|
28
21
|
_defineProperty(this, "componentConfig", void 0);
|
|
29
22
|
_defineProperty(this, "align", void 0);
|
|
30
23
|
_defineProperty(this, "expressDateInstance", void 0);
|
|
31
24
|
_defineProperty(this, "width", void 0);
|
|
32
|
-
_defineProperty(this, "
|
|
33
|
-
|
|
34
|
-
});
|
|
25
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
26
|
+
_defineProperty(this, "children", void 0);
|
|
35
27
|
_defineProperty(this, "renderClient", function (record) {
|
|
36
28
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
37
29
|
id: _this.id,
|
|
38
30
|
label: _this.name,
|
|
39
|
-
value: _this.
|
|
31
|
+
value: _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id])
|
|
40
32
|
}) : null;
|
|
41
33
|
});
|
|
42
34
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
43
|
-
if (
|
|
35
|
+
if ((record === null || record === void 0 ? void 0 : record[_this.id]) === undefined) {
|
|
44
36
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
45
37
|
}
|
|
46
|
-
return /*#__PURE__*/React.createElement("span", null, _this.expressDateInstance.getExpressNameByCode(
|
|
38
|
+
return /*#__PURE__*/React.createElement("span", null, _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id]));
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
41
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
42
|
+
return _this.renderPc(undefined, r);
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
45
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
47
46
|
});
|
|
48
47
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
49
|
-
return _this.expressDateInstance.getExpressNameByCode(
|
|
48
|
+
return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id]);
|
|
50
49
|
});
|
|
51
50
|
_defineProperty(this, "editRender", function () {
|
|
52
51
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
@@ -60,35 +59,30 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
60
59
|
}) : null
|
|
61
60
|
});
|
|
62
61
|
});
|
|
63
|
-
_defineProperty(this, "
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
;
|
|
62
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
63
|
+
var subKey = item.subKey;
|
|
64
|
+
return {
|
|
65
|
+
type: item.type,
|
|
66
|
+
id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
|
|
67
|
+
name: "".concat(item.name, "-\u7269\u6D41\u516C\u53F8"),
|
|
68
|
+
filterComponentType: 'MultipleSelect',
|
|
69
|
+
options: _this.expressDateInstance.getExpressData() || [],
|
|
70
|
+
filterFn: function filterFn(value) {
|
|
71
|
+
return function (i) {
|
|
72
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)));
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
79
76
|
});
|
|
80
77
|
this.name = options.name;
|
|
81
78
|
this.id = options.id;
|
|
82
79
|
this.type = options.type;
|
|
83
|
-
this.canFilter = true;
|
|
84
|
-
this.canGroup = true;
|
|
85
|
-
this.canHidden = false;
|
|
86
|
-
this.showContains = false;
|
|
87
|
-
this.dataType = 'string';
|
|
88
80
|
this.componentConfig = options.componentConfig;
|
|
89
81
|
this.rules = [];
|
|
90
82
|
this.align = 'left';
|
|
91
83
|
this.expressDateInstance = ExpressData.getInstance();
|
|
92
84
|
this.width = 200;
|
|
85
|
+
this.isCombinationComponent = false;
|
|
86
|
+
this.children = [];
|
|
93
87
|
});
|
|
94
88
|
export default Express;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class ExpressCode implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
-
canFilter: boolean;
|
|
9
|
-
canGroup: boolean;
|
|
10
|
-
canHidden: boolean;
|
|
11
|
-
dataType: DataType;
|
|
12
|
-
showContains: boolean;
|
|
13
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
14
9
|
align: ALignType;
|
|
15
10
|
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
children: ComponentInterface[];
|
|
16
13
|
constructor(options: PickOption);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
15
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
16
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
17
|
+
getComponentValue: (r: Record) => any;
|
|
18
|
+
renderExport: (value: string, record: Record) => any;
|
|
19
|
+
editRender: () => React.JSX.Element;
|
|
20
|
+
filterConfig: (item: ColumnConfig) => {
|
|
21
|
+
type: string;
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
filterComponentType: "Input";
|
|
25
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
28
26
|
};
|
|
29
27
|
}
|
|
30
28
|
export default ExpressCode;
|
|
@@ -1,17 +1,15 @@
|
|
|
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 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
|
-
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
2
|
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); } }
|
|
5
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
-
import React from
|
|
11
|
-
import { Input } from
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { Input } from "antd";
|
|
12
10
|
import GetFormItem from "../GetFormItem";
|
|
13
11
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull } from
|
|
12
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
13
|
var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
16
14
|
var _this = this,
|
|
17
15
|
_this$componentConfig5;
|
|
@@ -20,17 +18,11 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
20
18
|
_defineProperty(this, "id", void 0);
|
|
21
19
|
_defineProperty(this, "type", void 0);
|
|
22
20
|
_defineProperty(this, "rules", void 0);
|
|
23
|
-
_defineProperty(this, "canFilter", void 0);
|
|
24
|
-
_defineProperty(this, "canGroup", void 0);
|
|
25
|
-
_defineProperty(this, "canHidden", void 0);
|
|
26
|
-
_defineProperty(this, "dataType", void 0);
|
|
27
|
-
_defineProperty(this, "showContains", void 0);
|
|
28
21
|
_defineProperty(this, "componentConfig", void 0);
|
|
29
22
|
_defineProperty(this, "align", void 0);
|
|
30
23
|
_defineProperty(this, "width", void 0);
|
|
31
|
-
_defineProperty(this, "
|
|
32
|
-
|
|
33
|
-
});
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "children", void 0);
|
|
34
26
|
_defineProperty(this, "renderClient", function (record) {
|
|
35
27
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
36
28
|
id: _this.id,
|
|
@@ -39,10 +31,19 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
39
31
|
}) : null;
|
|
40
32
|
});
|
|
41
33
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
42
|
-
|
|
34
|
+
var _record$_this$id;
|
|
35
|
+
return /*#__PURE__*/React.createElement("span", null, (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--");
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
38
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
|
|
39
|
+
return _this.renderPc(undefined, r);
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
42
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
45
|
-
|
|
45
|
+
var _record$_this$id2;
|
|
46
|
+
return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
|
|
46
47
|
});
|
|
47
48
|
_defineProperty(this, "editRender", function () {
|
|
48
49
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
@@ -51,37 +52,38 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
51
52
|
name: _this.id,
|
|
52
53
|
rules: _this.rules,
|
|
53
54
|
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,
|
|
54
|
-
component: !((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.isSingle) || ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) ===
|
|
55
|
+
component: !((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.isSingle) || ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) === "EXPRESS_WAYBILL_CODE" ? /*#__PURE__*/React.createElement(Input, null) : null
|
|
55
56
|
});
|
|
56
57
|
});
|
|
57
|
-
_defineProperty(this, "
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
59
|
+
var subKey = item.subKey;
|
|
60
|
+
return {
|
|
61
|
+
type: item.type,
|
|
62
|
+
id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
|
|
63
|
+
name: "".concat(item.name, "-\u7269\u6D41\u5355\u53F7"),
|
|
64
|
+
filterComponentType: "Input",
|
|
65
|
+
filterFn: function filterFn(value) {
|
|
66
|
+
return function (i) {
|
|
67
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)), value);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
};
|
|
66
71
|
});
|
|
67
72
|
this.name = options.name;
|
|
68
73
|
this.id = options.id;
|
|
69
74
|
this.type = options.type;
|
|
70
|
-
this.canFilter = true;
|
|
71
|
-
this.canGroup = true;
|
|
72
|
-
this.canHidden = false;
|
|
73
|
-
this.showContains = true;
|
|
74
|
-
this.dataType = 'string';
|
|
75
75
|
this.componentConfig = options.componentConfig;
|
|
76
76
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
77
77
|
validator: function validator(_, value) {
|
|
78
78
|
if (/^[0-9a-zA-Z]*$/.test(value)) {
|
|
79
79
|
return Promise.resolve();
|
|
80
80
|
}
|
|
81
|
-
return Promise.reject(new Error(
|
|
81
|
+
return Promise.reject(new Error("只能输入数字和字母"));
|
|
82
82
|
}
|
|
83
83
|
}] : [];
|
|
84
|
-
this.align =
|
|
84
|
+
this.align = "left";
|
|
85
85
|
this.width = 200;
|
|
86
|
+
this.isCombinationComponent = false;
|
|
87
|
+
this.children = [];
|
|
86
88
|
});
|
|
87
89
|
export default ExpressCode;
|
|
@@ -1,51 +1,33 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare class WorkOrderId implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
-
canFilter: boolean;
|
|
9
|
-
canGroup: boolean;
|
|
10
|
-
canHidden: boolean;
|
|
11
|
-
dataType: DataType;
|
|
12
|
-
showContains: boolean;
|
|
13
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
14
9
|
effects: ComponentInterface["effects"];
|
|
15
|
-
workOrderStatus:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color: string;
|
|
19
|
-
bgColor: string;
|
|
20
|
-
};
|
|
21
|
-
HANDLING: {
|
|
22
|
-
label: string;
|
|
23
|
-
color: string;
|
|
24
|
-
bgColor: string;
|
|
25
|
-
};
|
|
26
|
-
STOPPING: {
|
|
27
|
-
label: string;
|
|
28
|
-
color: string;
|
|
29
|
-
bgColor: string;
|
|
30
|
-
};
|
|
31
|
-
COMPLETED: {
|
|
32
|
-
label: string;
|
|
33
|
-
color: string;
|
|
34
|
-
bgColor: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
10
|
+
workOrderStatus: any;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
children: ComponentInterface[];
|
|
37
13
|
constructor(options: PickOption);
|
|
38
14
|
renderMenu: (record: Record) => JSX.Element;
|
|
39
15
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
16
|
+
renderLog: (r: Record) => JSX.Element | null;
|
|
17
|
+
getComponentValue: (r: Record) => any;
|
|
40
18
|
renderExport: (value: any, record: Record) => any;
|
|
41
|
-
render: () => null;
|
|
42
19
|
renderClient: () => null;
|
|
43
20
|
editRender: () => JSX.Element;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
filterConfig: (item: ColumnConfig) => {
|
|
22
|
+
type: string;
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
filterComponentType: "MultipleSelect";
|
|
26
|
+
options: {
|
|
27
|
+
label: any;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
49
31
|
};
|
|
50
32
|
}
|
|
51
33
|
export default WorkOrderId;
|