@kmkf-fe-packages/services-components 0.6.3 → 0.7.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 +3 -3
- package/dist/esm/commonComponents/OperationLog/index.d.ts +9 -0
- package/dist/esm/commonComponents/OperationLog/index.js +127 -0
- package/dist/esm/commonComponents/PlatBuyer/index.d.ts +2 -2
- 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/commonComponents/Wangwang/index.d.ts +2 -2
- package/dist/esm/components/ActualPayment/index.d.ts +15 -16
- package/dist/esm/components/ActualPayment/index.js +28 -26
- package/dist/esm/components/Address/index.d.ts +12 -19
- package/dist/esm/components/Address/index.js +17 -26
- package/dist/esm/components/Alipay/index.d.ts +18 -22
- package/dist/esm/components/Alipay/index.js +15 -20
- package/dist/esm/components/AlipayAccount/index.d.ts +15 -17
- package/dist/esm/components/AlipayAccount/index.js +29 -28
- package/dist/esm/components/AlipayName/index.d.ts +15 -17
- package/dist/esm/components/AlipayName/index.js +29 -28
- package/dist/esm/components/BuyerNick/index.d.ts +18 -19
- package/dist/esm/components/BuyerNick/index.js +41 -28
- package/dist/esm/components/Cascader/index.d.ts +16 -28
- package/dist/esm/components/Cascader/index.js +38 -31
- package/dist/esm/components/Checkbox/index.d.ts +19 -15
- package/dist/esm/components/Checkbox/index.js +45 -26
- package/dist/esm/components/Common/index.d.ts +5 -5
- package/dist/esm/components/CommonDataTime/index.d.ts +14 -14
- 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/ApaasDate.d.ts +2 -2
- package/dist/esm/components/DataTime/index.d.ts +17 -16
- package/dist/esm/components/DataTime/index.js +30 -26
- package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +2 -2
- package/dist/esm/components/EItemEnCode/index.d.ts +15 -15
- package/dist/esm/components/EItemEnCode/index.js +34 -27
- package/dist/esm/components/EItemId/ItemId.d.ts +2 -2
- package/dist/esm/components/EItemId/index.d.ts +15 -15
- package/dist/esm/components/EItemId/index.js +34 -27
- package/dist/esm/components/EItemSelect/ItemSelect.d.ts +2 -2
- package/dist/esm/components/EItemSelect/index.d.ts +10 -16
- package/dist/esm/components/EItemSelect/index.js +16 -24
- package/dist/esm/components/ErpTradeId/index.d.ts +15 -16
- package/dist/esm/components/ErpTradeId/index.js +28 -26
- package/dist/esm/components/Express/index.d.ts +18 -20
- 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/ExpressCompany/index.d.ts +2 -2
- package/dist/esm/components/FlowStatusSelect/index.d.ts +20 -38
- 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 +10 -16
- 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 +15 -16
- package/dist/esm/components/Input/index.js +29 -28
- package/dist/esm/components/JstItemSelect/index.d.ts +17 -17
- package/dist/esm/components/JstItemSelect/index.js +48 -28
- package/dist/esm/components/JstLogistics/index.d.ts +25 -17
- package/dist/esm/components/JstLogistics/index.js +50 -29
- package/dist/esm/components/JstSendGood/index.d.ts +16 -16
- package/dist/esm/components/JstSendGood/index.js +54 -29
- package/dist/esm/components/JstSupply/index.d.ts +16 -16
- package/dist/esm/components/JstSupply/index.js +54 -29
- package/dist/esm/components/Logistics/index.d.ts +26 -30
- 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 +74 -0
- package/dist/esm/components/LogisticsInterception/index.js +133 -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 +16 -16
- package/dist/esm/components/MultSelect/index.js +31 -24
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +14 -25
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +26 -32
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +14 -25
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +25 -31
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +14 -20
- package/dist/esm/components/Ordinary/OrdinarySerial.js +26 -22
- package/dist/esm/components/Ordinary/index.d.ts +19 -26
- package/dist/esm/components/Ordinary/index.js +20 -12
- package/dist/esm/components/OrdinaryHeader/index.d.ts +2 -2
- package/dist/esm/components/Payment/AlipayNick.d.ts +14 -25
- package/dist/esm/components/Payment/AlipayNick.js +29 -34
- package/dist/esm/components/Payment/AlipayNo.d.ts +14 -24
- package/dist/esm/components/Payment/AlipayNo.js +29 -34
- package/dist/esm/components/Payment/AlipayTime.d.ts +14 -26
- package/dist/esm/components/Payment/AlipayTime.js +26 -35
- package/dist/esm/components/Payment/BuyerNick.d.ts +14 -25
- package/dist/esm/components/Payment/BuyerNick.js +26 -32
- package/dist/esm/components/Payment/PaymentAmount.d.ts +14 -25
- package/dist/esm/components/Payment/PaymentAmount.js +24 -30
- package/dist/esm/components/Payment/PaymentStatus.d.ts +19 -31
- package/dist/esm/components/Payment/PaymentStatus.js +48 -41
- package/dist/esm/components/Payment/PaymentTid.d.ts +14 -25
- package/dist/esm/components/Payment/PaymentTid.js +24 -30
- package/dist/esm/components/Payment/index.d.ts +39 -100
- package/dist/esm/components/Payment/index.js +22 -20
- package/dist/esm/components/Picture/index.d.ts +15 -15
- 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/Popover/index.d.ts +2 -2
- package/dist/esm/components/Radio/index.d.ts +20 -15
- package/dist/esm/components/Radio/index.js +34 -20
- package/dist/esm/components/Rate/index.d.ts +11 -16
- package/dist/esm/components/Rate/index.js +17 -30
- package/dist/esm/components/ReceiverAddress/index.d.ts +14 -17
- package/dist/esm/components/ReceiverAddress/index.js +22 -29
- package/dist/esm/components/ReceiverMobile/index.d.ts +15 -16
- package/dist/esm/components/ReceiverMobile/index.js +29 -27
- package/dist/esm/components/ReceiverName/index.d.ts +15 -16
- package/dist/esm/components/ReceiverName/index.js +29 -27
- package/dist/esm/components/Remark/index.d.ts +19 -16
- 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 +16 -15
- 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 +15 -16
- 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 +15 -16
- package/dist/esm/components/SystemOrderNo/index.js +27 -25
- package/dist/esm/components/TemplateSelect/index.d.ts +15 -15
- package/dist/esm/components/TemplateSelect/index.js +29 -24
- package/dist/esm/components/TextArea/index.d.ts +15 -15
- package/dist/esm/components/TextArea/index.js +27 -24
- package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +2 -2
- package/dist/esm/components/ThirdItemSelect/index.d.ts +15 -15
- package/dist/esm/components/ThirdItemSelect/index.js +36 -28
- package/dist/esm/components/TradeDateTime/index.d.ts +18 -10
- package/dist/esm/components/TradeDateTime/index.js +52 -17
- package/dist/esm/components/TradeId/index.d.ts +15 -10
- package/dist/esm/components/TradeId/index.js +27 -14
- package/dist/esm/components/WorkOrderId/index.d.ts +14 -15
- 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 +12 -0
- package/dist/esm/index.js +13 -1
- package/dist/esm/type.d.ts +53 -45
- package/package.json +10 -5
|
@@ -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 _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
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); } }
|
|
6
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; }
|
|
@@ -9,11 +7,12 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
9
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
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); }
|
|
11
9
|
import React from 'react';
|
|
10
|
+
import some from 'lodash/some';
|
|
12
11
|
import GetFormItem from "../GetFormItem";
|
|
13
12
|
import { JstGoodImage } from "../Common";
|
|
14
13
|
import { JstGoods } from '@kmkf-fe-packages/basic-components';
|
|
15
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
16
|
var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
18
17
|
var _this = this,
|
|
19
18
|
_this$componentConfig;
|
|
@@ -22,25 +21,21 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
22
21
|
_defineProperty(this, "id", void 0);
|
|
23
22
|
_defineProperty(this, "type", void 0);
|
|
24
23
|
_defineProperty(this, "rules", void 0);
|
|
25
|
-
_defineProperty(this, "canFilter", void 0);
|
|
26
|
-
_defineProperty(this, "canGroup", void 0);
|
|
27
|
-
_defineProperty(this, "canHidden", void 0);
|
|
28
|
-
_defineProperty(this, "dataType", void 0);
|
|
29
|
-
_defineProperty(this, "showContains", void 0);
|
|
30
24
|
_defineProperty(this, "componentConfig", void 0);
|
|
31
25
|
_defineProperty(this, "align", void 0);
|
|
32
|
-
_defineProperty(this, "
|
|
33
|
-
|
|
34
|
-
return /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
35
|
-
list: value,
|
|
36
|
-
type: 2
|
|
37
|
-
});
|
|
38
|
-
});
|
|
26
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
39
28
|
_defineProperty(this, "renderClient", function (record) {
|
|
40
|
-
|
|
29
|
+
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
30
|
+
return !isNull(item);
|
|
31
|
+
}) : false;
|
|
32
|
+
return isShow ? /*#__PURE__*/React.createElement(ItemView, {
|
|
41
33
|
id: _this.id,
|
|
42
34
|
label: _this.name,
|
|
43
|
-
value:
|
|
35
|
+
value: /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
36
|
+
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
37
|
+
type: 2
|
|
38
|
+
})
|
|
44
39
|
}) : null;
|
|
45
40
|
});
|
|
46
41
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -51,6 +46,14 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
51
46
|
type: 2
|
|
52
47
|
});
|
|
53
48
|
});
|
|
49
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
50
|
+
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_jstItemList")];
|
|
51
|
+
if (isNull(list)) return null;
|
|
52
|
+
return _this.renderPc(undefined, r);
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
55
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_jstItemList")];
|
|
56
|
+
});
|
|
54
57
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
55
58
|
var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_jstItemList")]) || [];
|
|
56
59
|
return list.map(function (item) {
|
|
@@ -68,23 +71,45 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
68
71
|
}))
|
|
69
72
|
});
|
|
70
73
|
});
|
|
71
|
-
_defineProperty(this, "
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
75
|
+
return [{
|
|
76
|
+
type: item.type,
|
|
77
|
+
id: "".concat(item.id, "_supplyName"),
|
|
78
|
+
name: "jst\u4F9B\u9500\u5546\u540D\u79F0",
|
|
79
|
+
filterComponentType: 'Input',
|
|
80
|
+
filterFn: function filterFn(value) {
|
|
81
|
+
return function (i) {
|
|
82
|
+
var _ref;
|
|
83
|
+
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'jstItemList') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
|
|
84
|
+
var _String;
|
|
85
|
+
var name = item !== null && item !== void 0 && item.supplyName ? (_String = String(item === null || item === void 0 ? void 0 : item.supplyName)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
86
|
+
return name;
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
type: item.type,
|
|
92
|
+
id: "".concat(item.id, "_supplyId"),
|
|
93
|
+
name: "jst\u4F9B\u9500\u5546\u7F16\u7801",
|
|
94
|
+
filterComponentType: 'Input',
|
|
95
|
+
filterFn: function filterFn(value) {
|
|
96
|
+
return function (i) {
|
|
97
|
+
var _ref2;
|
|
98
|
+
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'jstItemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
|
|
99
|
+
var _String2;
|
|
100
|
+
var id = item !== null && item !== void 0 && item.supplyId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.supplyId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
|
|
101
|
+
return id;
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}];
|
|
78
106
|
});
|
|
79
107
|
this.name = options.name;
|
|
80
108
|
this.id = options.id;
|
|
81
109
|
this.type = options.type;
|
|
82
|
-
this.canFilter = false;
|
|
83
|
-
this.canGroup = false;
|
|
84
|
-
this.canHidden = true;
|
|
85
|
-
this.showContains = false;
|
|
86
|
-
this.dataType = 'string';
|
|
87
110
|
this.componentConfig = options.componentConfig;
|
|
111
|
+
this.isCombinationComponent = false;
|
|
112
|
+
this.children = [];
|
|
88
113
|
this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
|
|
89
114
|
required: true,
|
|
90
115
|
validator: function validator(_, value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
4
|
import Express from '../Express';
|
|
5
5
|
import ExpressCode from '../ExpressCode';
|
|
@@ -8,39 +8,35 @@ declare class Logistics implements ComponentInterface {
|
|
|
8
8
|
id: string;
|
|
9
9
|
type: string;
|
|
10
10
|
rules: any[];
|
|
11
|
-
canFilter: boolean;
|
|
12
|
-
canGroup: boolean;
|
|
13
|
-
canHidden: boolean;
|
|
14
|
-
dataType: DataType;
|
|
15
|
-
showContains: boolean;
|
|
16
11
|
componentConfig: ComponentInterface["componentConfig"];
|
|
17
|
-
expressDateInstance: ExpressData
|
|
12
|
+
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
18
13
|
express: Express;
|
|
19
14
|
expressCode: ExpressCode;
|
|
15
|
+
isCombinationComponent: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
20
17
|
constructor(options: PickOption);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
renderClient: (record: Record) => JSX.Element;
|
|
18
|
+
editRender: (value: any) => React.JSX.Element;
|
|
19
|
+
renderClient: (record: Record) => React.JSX.Element;
|
|
24
20
|
renderPc: () => null;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
dataIndex: string;
|
|
30
|
-
title: string;
|
|
31
|
-
widget: JSX.Element;
|
|
32
|
-
groupFieldPath: string;
|
|
33
|
-
renderExport: (value: string, record: Record) => string | number;
|
|
34
|
-
render: (value: string, record: Record) => JSX.Element;
|
|
35
|
-
}) | (ExpressCode & {
|
|
36
|
-
dataIndex: string;
|
|
37
|
-
title: string;
|
|
38
|
-
groupFieldPath: string;
|
|
39
|
-
renderExport: (value: string, record: Record) => string;
|
|
40
|
-
render: (value: any, record: Record) => JSX.Element;
|
|
41
|
-
}))[];
|
|
42
|
-
canHidden: boolean;
|
|
43
|
-
dataIndex: string;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
22
|
+
getComponentValue: (r: Record) => {
|
|
23
|
+
company: any;
|
|
24
|
+
order: any;
|
|
44
25
|
};
|
|
26
|
+
renderExport: () => null;
|
|
27
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
28
|
+
type: string;
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
options: any[];
|
|
33
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
34
|
+
} | {
|
|
35
|
+
type: string;
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
filterComponentType: "Input";
|
|
39
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
40
|
+
})[];
|
|
45
41
|
}
|
|
46
42
|
export default Logistics;
|
|
@@ -22,18 +22,12 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
22
22
|
_defineProperty(this, "id", void 0);
|
|
23
23
|
_defineProperty(this, "type", void 0);
|
|
24
24
|
_defineProperty(this, "rules", void 0);
|
|
25
|
-
_defineProperty(this, "canFilter", void 0);
|
|
26
|
-
_defineProperty(this, "canGroup", void 0);
|
|
27
|
-
_defineProperty(this, "canHidden", void 0);
|
|
28
|
-
_defineProperty(this, "dataType", void 0);
|
|
29
|
-
_defineProperty(this, "showContains", void 0);
|
|
30
25
|
_defineProperty(this, "componentConfig", void 0);
|
|
31
26
|
_defineProperty(this, "expressDateInstance", void 0);
|
|
32
27
|
_defineProperty(this, "express", void 0);
|
|
33
28
|
_defineProperty(this, "expressCode", void 0);
|
|
34
|
-
_defineProperty(this, "
|
|
35
|
-
|
|
36
|
-
});
|
|
29
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
30
|
+
_defineProperty(this, "children", void 0);
|
|
37
31
|
_defineProperty(this, "editRender", function (value) {
|
|
38
32
|
var _this$componentConfig, _this$componentConfig2;
|
|
39
33
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
@@ -53,25 +47,28 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
53
47
|
_defineProperty(this, "renderPc", function () {
|
|
54
48
|
return null;
|
|
55
49
|
});
|
|
56
|
-
_defineProperty(this, "
|
|
57
|
-
return null;
|
|
50
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
51
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(r)));
|
|
58
52
|
});
|
|
59
|
-
_defineProperty(this, "
|
|
53
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
60
54
|
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
canHidden: _this.canHidden,
|
|
64
|
-
dataIndex: _this.id
|
|
55
|
+
company: _this.express.getComponentValue(r),
|
|
56
|
+
order: _this.expressCode.getComponentValue(r)
|
|
65
57
|
};
|
|
66
58
|
});
|
|
59
|
+
_defineProperty(this, "renderExport", function () {
|
|
60
|
+
return null;
|
|
61
|
+
});
|
|
62
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
63
|
+
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
64
|
+
subKey: 'expressLogisticsCompany'
|
|
65
|
+
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
66
|
+
subKey: 'expressLogisticsCode'
|
|
67
|
+
}))];
|
|
68
|
+
});
|
|
67
69
|
this.name = options.name;
|
|
68
70
|
this.id = options.id;
|
|
69
71
|
this.type = options.type;
|
|
70
|
-
this.canFilter = false;
|
|
71
|
-
this.canGroup = false;
|
|
72
|
-
this.canHidden = true;
|
|
73
|
-
this.showContains = false;
|
|
74
|
-
this.dataType = 'string';
|
|
75
72
|
this.componentConfig = options.componentConfig;
|
|
76
73
|
this.expressDateInstance = ExpressData.getInstance();
|
|
77
74
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
@@ -82,6 +79,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
82
79
|
name: '快递物流单号',
|
|
83
80
|
id: "".concat(this.id, "_expressLogisticsCode")
|
|
84
81
|
}));
|
|
82
|
+
this.isCombinationComponent = true;
|
|
83
|
+
this.children = [this.express, this.expressCode];
|
|
85
84
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
86
85
|
validator: function validator(_, value) {
|
|
87
86
|
var _this$componentConfig4;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
declare class PaymentTid implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
align: ALignType;
|
|
12
|
+
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
originId: string;
|
|
16
|
+
addressDateInstance: AddressData;
|
|
17
|
+
constructor(options: PickOption);
|
|
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) => {
|
|
22
|
+
province: any;
|
|
23
|
+
city: any;
|
|
24
|
+
district: any;
|
|
25
|
+
detail: any;
|
|
26
|
+
name: any;
|
|
27
|
+
mobile: any;
|
|
28
|
+
};
|
|
29
|
+
renderExport: (value: any, record: Record) => string | null;
|
|
30
|
+
editRender: () => React.JSX.Element;
|
|
31
|
+
filterConfig: () => never[];
|
|
32
|
+
}
|
|
33
|
+
export default PaymentTid;
|
|
@@ -0,0 +1,134 @@
|
|
|
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 _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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { ApaasInput } from "@kmkf-fe-packages/basic-components";
|
|
10
|
+
import GetFormItem from "../GetFormItem";
|
|
11
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
12
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
15
|
+
var _this = this;
|
|
16
|
+
_classCallCheck(this, PaymentTid);
|
|
17
|
+
_defineProperty(this, "name", void 0);
|
|
18
|
+
_defineProperty(this, "id", void 0);
|
|
19
|
+
_defineProperty(this, "type", void 0);
|
|
20
|
+
_defineProperty(this, "rules", void 0);
|
|
21
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
22
|
+
_defineProperty(this, "effects", void 0);
|
|
23
|
+
_defineProperty(this, "align", void 0);
|
|
24
|
+
_defineProperty(this, "width", void 0);
|
|
25
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
26
|
+
_defineProperty(this, "children", void 0);
|
|
27
|
+
_defineProperty(this, "originId", void 0);
|
|
28
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
29
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
30
|
+
var _ref;
|
|
31
|
+
var province = record["".concat(_this.originId, "_interceptProvince")];
|
|
32
|
+
var city = record["".concat(_this.originId, "_interceptCity")];
|
|
33
|
+
var district = record["".concat(_this.originId, "_interceptDistrict")];
|
|
34
|
+
var detail = record["".concat(_this.originId, "_interceptDetail")];
|
|
35
|
+
var name = record["".concat(_this.originId, "_interceptReceiverName")];
|
|
36
|
+
var mobile = record["".concat(_this.originId, "_interceptReceiverMobile")];
|
|
37
|
+
var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
|
|
38
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
39
|
+
}).join("");
|
|
40
|
+
var hasValue = addressText || detail || name || mobile;
|
|
41
|
+
var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
|
|
42
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
43
|
+
id: _this.id,
|
|
44
|
+
label: _this.name,
|
|
45
|
+
value: value
|
|
46
|
+
}) : null;
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
49
|
+
var _ref2;
|
|
50
|
+
var province = record["".concat(_this.originId, "_interceptProvince")];
|
|
51
|
+
var city = record["".concat(_this.originId, "_interceptCity")];
|
|
52
|
+
var district = record["".concat(_this.originId, "_interceptDistrict")];
|
|
53
|
+
var detail = record["".concat(_this.originId, "_interceptDetail")];
|
|
54
|
+
var name = record["".concat(_this.originId, "_interceptReceiverName")];
|
|
55
|
+
var mobile = record["".concat(_this.originId, "_interceptReceiverMobile")];
|
|
56
|
+
if (province === undefined) {
|
|
57
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
58
|
+
}
|
|
59
|
+
var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
|
|
60
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
61
|
+
}).join("");
|
|
62
|
+
return /*#__PURE__*/React.createElement("span", null, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile));
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
65
|
+
var _ref3;
|
|
66
|
+
var _this$getComponentVal = _this.getComponentValue(r),
|
|
67
|
+
province = _this$getComponentVal.province,
|
|
68
|
+
city = _this$getComponentVal.city,
|
|
69
|
+
district = _this$getComponentVal.district,
|
|
70
|
+
detail = _this$getComponentVal.detail,
|
|
71
|
+
name = _this$getComponentVal.name,
|
|
72
|
+
mobile = _this$getComponentVal.mobile;
|
|
73
|
+
if ([province, detail, name, mobile].every(function (item) {
|
|
74
|
+
return isNull(item);
|
|
75
|
+
})) return null;
|
|
76
|
+
var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
|
|
77
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
78
|
+
}).join("");
|
|
79
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
|
|
80
|
+
});
|
|
81
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
82
|
+
return {
|
|
83
|
+
province: r === null || r === void 0 ? void 0 : r["".concat(_this.originId, "_interceptProvince")],
|
|
84
|
+
city: r === null || r === void 0 ? void 0 : r["".concat(_this.originId, "_interceptCity")],
|
|
85
|
+
district: r === null || r === void 0 ? void 0 : r["".concat(_this.originId, "_interceptDistrict")],
|
|
86
|
+
detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.originId, "_interceptDetail")]) || '',
|
|
87
|
+
name: (r === null || r === void 0 ? void 0 : r["".concat(_this.originId, "_interceptReceiverName")]) || '',
|
|
88
|
+
mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.originId, "_interceptReceiverMobile")]) || ''
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
92
|
+
var _ref4;
|
|
93
|
+
var _this$getComponentVal2 = _this.getComponentValue(record),
|
|
94
|
+
province = _this$getComponentVal2.province,
|
|
95
|
+
city = _this$getComponentVal2.city,
|
|
96
|
+
district = _this$getComponentVal2.district,
|
|
97
|
+
detail = _this$getComponentVal2.detail,
|
|
98
|
+
name = _this$getComponentVal2.name,
|
|
99
|
+
mobile = _this$getComponentVal2.mobile;
|
|
100
|
+
if ([province, detail, name, mobile].every(function (item) {
|
|
101
|
+
return isNull(item);
|
|
102
|
+
})) return null;
|
|
103
|
+
var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
|
|
104
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
105
|
+
}).join("");
|
|
106
|
+
return "".concat(addressText).concat(detail, " ").concat(name).concat(mobile);
|
|
107
|
+
});
|
|
108
|
+
_defineProperty(this, "editRender", function () {
|
|
109
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
110
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
111
|
+
title: _this.name,
|
|
112
|
+
name: _this.id,
|
|
113
|
+
rules: _this.rules,
|
|
114
|
+
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,
|
|
115
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _this.componentConfig)
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
_defineProperty(this, "filterConfig", function () {
|
|
119
|
+
return [];
|
|
120
|
+
});
|
|
121
|
+
this.name = "派送地址";
|
|
122
|
+
this.id = "".concat(options.id, "_interceptProvince");
|
|
123
|
+
this.type = options.type;
|
|
124
|
+
this.componentConfig = options.componentConfig;
|
|
125
|
+
this.rules = [];
|
|
126
|
+
this.align = "left";
|
|
127
|
+
this.width = 350;
|
|
128
|
+
this.originId = options.id;
|
|
129
|
+
this.isCombinationComponent = false;
|
|
130
|
+
this.children = [];
|
|
131
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
132
|
+
this.addressDateInstance = AddressData.getInstance();
|
|
133
|
+
});
|
|
134
|
+
export default PaymentTid;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
declare class InterceptStatus implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
parentId: string;
|
|
7
|
+
id: string;
|
|
8
|
+
companyId: string;
|
|
9
|
+
type: string;
|
|
10
|
+
rules: any[];
|
|
11
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
+
effects: ComponentInterface["effects"];
|
|
13
|
+
align: ALignType;
|
|
14
|
+
width: number;
|
|
15
|
+
isCombinationComponent: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
expressInterceptInstance: ExpressInterceptData;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
getComponentValue: (r: Record) => any;
|
|
20
|
+
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
21
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
23
|
+
renderLog: (r: Record) => any;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
editRender: () => null;
|
|
26
|
+
filterConfig: (item: ColumnConfig) => {
|
|
27
|
+
type: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
filterComponentType: "MultipleSelect";
|
|
31
|
+
options: {
|
|
32
|
+
label: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}[];
|
|
35
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export default InterceptStatus;
|
|
@@ -0,0 +1,102 @@
|
|
|
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 _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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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); }
|
|
8
|
+
import React from "react";
|
|
9
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
+
import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
|
|
13
|
+
var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options) {
|
|
14
|
+
var _this = this;
|
|
15
|
+
_classCallCheck(this, InterceptStatus);
|
|
16
|
+
_defineProperty(this, "name", void 0);
|
|
17
|
+
_defineProperty(this, "parentId", void 0);
|
|
18
|
+
_defineProperty(this, "id", void 0);
|
|
19
|
+
_defineProperty(this, "companyId", void 0);
|
|
20
|
+
_defineProperty(this, "type", void 0);
|
|
21
|
+
_defineProperty(this, "rules", void 0);
|
|
22
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
23
|
+
_defineProperty(this, "effects", void 0);
|
|
24
|
+
_defineProperty(this, "align", void 0);
|
|
25
|
+
_defineProperty(this, "width", void 0);
|
|
26
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "expressInterceptInstance", void 0);
|
|
29
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
30
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(this, "renderStatus", function (record) {
|
|
33
|
+
var _this$expressIntercep;
|
|
34
|
+
var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
35
|
+
var interceptCode = "".concat(_this.parentId, "_interceptCode");
|
|
36
|
+
var interceptSenderMobile = "".concat(_this.parentId, "_interceptSenderMobile");
|
|
37
|
+
var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record[_this.id])];
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", null, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
39
|
+
modelWidth: w,
|
|
40
|
+
interceptCompany: record[_this.companyId],
|
|
41
|
+
interceptCode: record[interceptCode],
|
|
42
|
+
interceptSenderMobile: record[interceptSenderMobile]
|
|
43
|
+
}) : null);
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
46
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
47
|
+
id: _this.id,
|
|
48
|
+
label: _this.name,
|
|
49
|
+
value: _this.renderStatus(record)
|
|
50
|
+
}) : null;
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
53
|
+
return _this.renderStatus(record, 700);
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
56
|
+
var _this$expressIntercep2;
|
|
57
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
58
|
+
return (_this$expressIntercep2 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep2 === void 0 ? void 0 : _this$expressIntercep2[r === null || r === void 0 ? void 0 : r["".concat(_this.id)]];
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
61
|
+
var _this$expressIntercep3, _this$expressIntercep4;
|
|
62
|
+
return (_this$expressIntercep3 = (_this$expressIntercep4 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep4 === void 0 ? void 0 : _this$expressIntercep4["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep3 !== void 0 ? _this$expressIntercep3 : "--";
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "editRender", function () {
|
|
65
|
+
return null;
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
68
|
+
return {
|
|
69
|
+
type: item.type,
|
|
70
|
+
id: "".concat(item.id, "_interceptLogisticsStatus"),
|
|
71
|
+
name: "".concat(item.name, "-\u7269\u6D41\u72B6\u6001"),
|
|
72
|
+
filterComponentType: "MultipleSelect",
|
|
73
|
+
options: _this.expressInterceptInstance.getStatusOptions() || [],
|
|
74
|
+
filterFn: function filterFn(value) {
|
|
75
|
+
return function (i) {
|
|
76
|
+
var _value$map, _value$map$flat;
|
|
77
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
|
|
78
|
+
return v === null || v === void 0 ? void 0 : v.split(",");
|
|
79
|
+
})) === null || _value$map === void 0 ? void 0 : (_value$map$flat = _value$map.flat()) === null || _value$map$flat === void 0 ? void 0 : _value$map$flat.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptLogisticsStatus"));
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
this.name = "物流状态";
|
|
85
|
+
this.parentId = options.id;
|
|
86
|
+
this.id = "".concat(options.id, "_interceptLogisticsStatus");
|
|
87
|
+
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
88
|
+
this.type = options.type;
|
|
89
|
+
this.componentConfig = options.componentConfig;
|
|
90
|
+
this.rules = [];
|
|
91
|
+
this.align = "left";
|
|
92
|
+
this.width = 220;
|
|
93
|
+
this.isCombinationComponent = false;
|
|
94
|
+
this.children = [];
|
|
95
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
96
|
+
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//物流轨迹查询
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export default InterceptStatus;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
declare class InterceptType implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
companyId: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
expressInterceptInstance: ExpressInterceptData;
|
|
17
|
+
constructor(options: PickOption);
|
|
18
|
+
getComponentValue: (r: Record) => any;
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: (value: any, record: Record) => any;
|
|
21
|
+
renderLog: (r: Record) => any;
|
|
22
|
+
renderExport: (value: any, record: Record) => any;
|
|
23
|
+
editRender: () => null;
|
|
24
|
+
filterConfig: (item: ColumnConfig) => {
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
filterComponentType: "MultipleSelect";
|
|
29
|
+
options: {
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
33
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export default InterceptType;
|