@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
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
var InterceptType = /*#__PURE__*/_createClass(function InterceptType(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, InterceptType);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "companyId", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "children", void 0);
|
|
26
|
+
_defineProperty(this, "expressInterceptInstance", void 0);
|
|
27
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
28
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
29
|
+
});
|
|
30
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
31
|
+
var _this$expressIntercep;
|
|
32
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
33
|
+
id: _this.id,
|
|
34
|
+
label: _this.name,
|
|
35
|
+
value: (_this$expressIntercep = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]
|
|
36
|
+
}) : null;
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
39
|
+
var _this$expressIntercep2, _this$expressIntercep3;
|
|
40
|
+
return (_this$expressIntercep2 = (_this$expressIntercep3 = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep3 === void 0 ? void 0 : _this$expressIntercep3["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep2 !== void 0 ? _this$expressIntercep2 : "--";
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
43
|
+
var _this$expressIntercep4;
|
|
44
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
45
|
+
return (_this$expressIntercep4 = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep4 === void 0 ? void 0 : _this$expressIntercep4[r === null || r === void 0 ? void 0 : r["".concat(_this.id)]];
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
48
|
+
var _this$expressIntercep5, _this$expressIntercep6;
|
|
49
|
+
return (_this$expressIntercep5 = (_this$expressIntercep6 = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep6 === void 0 ? void 0 : _this$expressIntercep6["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep5 !== void 0 ? _this$expressIntercep5 : "--";
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "editRender", function () {
|
|
52
|
+
return null;
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
55
|
+
return {
|
|
56
|
+
type: item.type,
|
|
57
|
+
id: "".concat(item.id, "_interceptType"),
|
|
58
|
+
name: "".concat(item.name, "-\u62E6\u622A\u7C7B\u578B"),
|
|
59
|
+
filterComponentType: "MultipleSelect",
|
|
60
|
+
options: _this.expressInterceptInstance.getTypeOptions() || [],
|
|
61
|
+
filterFn: function filterFn(value) {
|
|
62
|
+
return function (i) {
|
|
63
|
+
var _value$map, _value$map$flat;
|
|
64
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
|
|
65
|
+
return v === null || v === void 0 ? void 0 : v.split(",");
|
|
66
|
+
})) === 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, "interceptType"));
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
this.name = "拦截类型";
|
|
72
|
+
this.id = "".concat(options.id, "_interceptType");
|
|
73
|
+
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
74
|
+
this.type = options.type;
|
|
75
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.rules = [];
|
|
77
|
+
this.align = "left";
|
|
78
|
+
this.width = 200;
|
|
79
|
+
this.isCombinationComponent = false;
|
|
80
|
+
this.children = [];
|
|
81
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
82
|
+
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
83
|
+
});
|
|
84
|
+
export default InterceptType;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useState } from "react";
|
|
8
|
+
import { Modal } from "antd";
|
|
9
|
+
import { QuestionCircleOutlined } from "@ant-design/icons";
|
|
10
|
+
var ColumnHeader = function ColumnHeader(_ref) {
|
|
11
|
+
var name = _ref.name;
|
|
12
|
+
var _useState = useState(false),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
visible = _useState2[0],
|
|
15
|
+
setVisible = _useState2[1];
|
|
16
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", null, name, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
17
|
+
style: {
|
|
18
|
+
fontSize: "14px",
|
|
19
|
+
marginLeft: "6px",
|
|
20
|
+
marginRight: "auto"
|
|
21
|
+
},
|
|
22
|
+
onClick: function onClick(e) {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
setVisible(true);
|
|
25
|
+
}
|
|
26
|
+
})), /*#__PURE__*/React.createElement(Modal, {
|
|
27
|
+
visible: visible,
|
|
28
|
+
title: "物流拦截字段解释",
|
|
29
|
+
onCancel: function onCancel() {
|
|
30
|
+
return setVisible(false);
|
|
31
|
+
},
|
|
32
|
+
footer: null
|
|
33
|
+
}, /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u516C\u53F8\uFF1A\u672C\u6B21\u5DE5\u5355\u9700\u8981\u62E6\u622A\u7684\u7269\u6D41\u516C\u53F8\u540D\u79F0"), /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u5355\u53F7\uFF1A\u672C\u6B21\u5DE5\u5355\u9700\u8981\u62E6\u622A\u7684\u7269\u6D41\u5355\u53F7"), /*#__PURE__*/React.createElement("p", null, "\u62E6\u622A\u7C7B\u578B\uFF1A\u672C\u6B21\u62E6\u622A\u6240\u8981\u505A\u7684\u52A8\u4F5C\u662F\u4EC0\u4E48\uFF1B\u4F8B\u5982\uFF1A\u662F\u9000\u56DE\u8FD8\u662F\u8F6C\u5BC4"), /*#__PURE__*/React.createElement("div", null, "\u6D3E\u9001\u5730\u5740\uFF1A"), /*#__PURE__*/React.createElement("div", null, "\u4E2D\u901A/\u987A\u4E30\uFF1A\u5982\u679C\u62E6\u622A\u7C7B\u578B\u4E3A\u8F6C\u5BC4\u7684\u8BDD\uFF0C\u9700\u8981\u586B\u5199\u65B0\u7684\u6D3E\u9001\u5730\u5740\uFF1B\u5982\u679C\u62E6\u622A\u7C7B\u578B\u4E3A\u9000\u56DE\u5219\u4E0D\u9700\u8981"), /*#__PURE__*/React.createElement("p", null, "\u6781\u5154\uFF1A\u65E0\u8BBA\u54EA\u79CD\u7C7B\u578B\u90FD\u9700\u8981\u586B\u5199\u6D3E\u9001\u5730\u5740"), /*#__PURE__*/React.createElement("p", null, "\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7\uFF1A\u5982\u679C\u7269\u6D41\u516C\u53F8\u4E3A\u987A\u4E30\uFF0C\u5219\u9700\u8981\u586B\u5199\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7\uFF0C\u7528\u6765\u67E5\u8BE2 \u7269\u6D41\u8F68\u8FF9"), /*#__PURE__*/React.createElement("p", null, "\u7269\u6D41\u72B6\u6001\uFF1A\u62E6\u622A\u5F53\u524D\u8FD9\u4E2A\u7269\u6D41\u5355\u53F7\u7684\u7269\u6D41\u8F68\u8FF9\u72B6\u6001\uFF08", /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
style: {
|
|
35
|
+
color: "#ff4d4f"
|
|
36
|
+
}
|
|
37
|
+
}, "\u8F6C\u5355\u6216\u4FEE\u6539\u5730\u5740\u8F6C\u5BC4/\u5DF2\u7B7E\u6536/\u4ECE\u5FEB\u9012\u67DC\u6216\u8005\u9A7F\u7AD9\u53D6\u51FA/\u9000\u56DE\u7B7E\u6536/\u5305\u88F9\u5F02\u5E38/\u62D2\u6536/\u6D3E\u4EF6\u5F02\u5E38/\u6EDE\u7559\u4EF6/\u95EE\u9898\u4EF6/\u9000\u56DE\u4EF6/\u7834\u635F/\u63FD\u4EF6\u53D6\u6D88 \u662F\u6700\u7EC8\u72B6\u6001\uFF0C\u4E0D\u518D\u505A\u66F4\u65B0\uFF0C\u53EF\u901A\u8FC7\u67E5\u8BE2\u7269\u6D41\u8F68\u8FF9\u6765\u83B7\u53D6\u6700\u65B0\u7269\u6D41\u72B6\u6001"), "\uFF09\uFF0C\u53EF\u4EE5\u901A\u8FC7\u67E5\u770B\u8BE5\u72B6\u6001\u6765\u5224\u65AD\u6B64\u6B21\u62E6\u622A\u662F\u5426\u6210\u529F\uFF08\u5BF9\u5173\u7CFB\u5982\u4E0B\uFF09"), /*#__PURE__*/React.createElement("p", null, "1.", /*#__PURE__*/React.createElement("b", {
|
|
38
|
+
style: {
|
|
39
|
+
color: "#1890ff"
|
|
40
|
+
}
|
|
41
|
+
}, "\u62E6\u622A\u4E2D"), "\uFF1A\u62E6\u622A\u8BF7\u6C42\u5DF2\u7ECF\u53D1\u9001\u7ED9\u5FEB\u9012\u516C\u53F8\uFF0C\u7269\u6D41\u72B6\u6001\u5927\u6982\u4E3A", /*#__PURE__*/React.createElement("b", null, "\u3010\u63A5\u5355\u4E2D\u3001\u5F85\u63FD\u6536\u3001\u5DF2\u63FD\u6536\u3001\u8FD0\u8F93\u4E2D\u3001\u5230\u8FBE\u76EE\u7684\u57CE\u5E02\u3001\u5305\u88F9\u5F02\u5E38\u3001\u95EE\u9898\u4EF6\u3001\u7834\u635F\u3011")), /*#__PURE__*/React.createElement("p", null, "2.", /*#__PURE__*/React.createElement("b", {
|
|
42
|
+
style: {
|
|
43
|
+
color: "#1890ff"
|
|
44
|
+
}
|
|
45
|
+
}, "\u62E6\u622A\u6210\u529F"), "\uFF1A\u8BE5\u7269\u6D41\u5355\u53F7\u5DF2\u7ECF\u88AB\u6210\u529F\u62E6\u622A\uFF0C\u7269\u6D41\u72B6\u6001\u5927\u6982\u4E3A", /*#__PURE__*/React.createElement("b", null, "\u3010\u9000\u56DE\u7B7E\u6536\u3001\u9000\u56DE\u4EF6\u3001\u62E6\u622A\u53D6\u6D88\u3001\u8F6C\u5355\u6216\u8005\u4FEE\u6539\u5730\u5740\u8F6C\u5BC4\u3011")), /*#__PURE__*/React.createElement("p", null, "3.", /*#__PURE__*/React.createElement("b", {
|
|
46
|
+
style: {
|
|
47
|
+
color: "#1890ff"
|
|
48
|
+
}
|
|
49
|
+
}, "\u62E6\u622A\u5931\u8D25"), "\uFF1A\u8BE5\u7269\u6D41\u5355\u53F7\u51FA\u73B0\u5F02\u5E38\u6216\u8005\u88AB\u7B7E\u6536\uFF0C\u7269\u6D41\u72B6\u6001\u5927\u6982\u4E3A", /*#__PURE__*/React.createElement("b", null, "\u3010\u6D3E\u4EF6\u4E2D\u3001\u5DF2\u653E\u5165\u5FEB\u9012\u67DC\u6216\u9A7F\u7AD9\u3001\u5DF2\u4EE3\u7B7E\u6536\u3001\u5DF2\u7B7E\u6536\u3001\u4ECE\u5FEB\u9012\u67DC\u6216\u8005\u9A7F\u7AD9\u53D6\u51FA\u3001\u62D2\u6536\u3001\u6D3E\u4EF6\u5F02\u5E38\u3001\u6EDE\u7559\u4EF6\u3011")), /*#__PURE__*/React.createElement("p", {
|
|
50
|
+
style: {
|
|
51
|
+
color: "#ff4d4f"
|
|
52
|
+
}
|
|
53
|
+
}, "\u6CE8\uFF1A\u7269\u6D41\u72B6\u6001\u4EC5\u9002\u7528\u4E8E\u4F7F\u7528\u81EA\u52A8\u62E6\u622A\u63A5\u53E3\u7684\u5FEB\u9012\u516C\u53F8\uFF0C\u4E0D\u5305\u542B\u7269\u6D41\u5BA2\u670D\u624B\u52A8\u62E6\u622A\u7684")));
|
|
54
|
+
};
|
|
55
|
+
export default ColumnHeader;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressData, ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
5
|
+
import InterceptAddress from "./InterceptAddress";
|
|
6
|
+
import InterceptType from "./InterceptType";
|
|
7
|
+
import InterceptStatus from "./InterceptStatus";
|
|
8
|
+
import Express from "../Express";
|
|
9
|
+
import ExpressCode from "../ExpressCode";
|
|
10
|
+
declare class Logistics implements ComponentInterface {
|
|
11
|
+
name: string;
|
|
12
|
+
columnHeader: string | JSX.Element;
|
|
13
|
+
id: string;
|
|
14
|
+
type: string;
|
|
15
|
+
rules: any[];
|
|
16
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
17
|
+
interceptAddress: InterceptAddress;
|
|
18
|
+
interceptType: InterceptType;
|
|
19
|
+
interceptLogisticsStatus: InterceptStatus;
|
|
20
|
+
interceptSenderMobile: InterceptSenderMobile;
|
|
21
|
+
isCombinationComponent: boolean;
|
|
22
|
+
children: ComponentInterface[];
|
|
23
|
+
express: Express;
|
|
24
|
+
expressCode: ExpressCode;
|
|
25
|
+
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
26
|
+
expressInterceptData: InstanceType<typeof ExpressInterceptData>;
|
|
27
|
+
effects: ComponentInterface["effects"];
|
|
28
|
+
constructor(options: PickOption);
|
|
29
|
+
renderClient: (record: any) => React.JSX.Element;
|
|
30
|
+
renderLog: (record: any) => React.JSX.Element;
|
|
31
|
+
getComponentValue: (r: Record) => {
|
|
32
|
+
interceptCompany: any;
|
|
33
|
+
interceptCode: any;
|
|
34
|
+
interceptSenderMobile: any;
|
|
35
|
+
interceptType: any;
|
|
36
|
+
interceptLogisticsStatus: any;
|
|
37
|
+
interceptRedirectTo: {
|
|
38
|
+
province: any;
|
|
39
|
+
city: any;
|
|
40
|
+
district: any;
|
|
41
|
+
detail: any;
|
|
42
|
+
name: any;
|
|
43
|
+
mobile: any;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
renderPc: () => null;
|
|
47
|
+
renderExport: () => null;
|
|
48
|
+
editRender: () => React.JSX.Element;
|
|
49
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
50
|
+
type: string;
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
filterComponentType: "MultipleSelect";
|
|
54
|
+
options: any[];
|
|
55
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
56
|
+
} | {
|
|
57
|
+
type: string;
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
filterComponentType: "Input";
|
|
61
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
62
|
+
} | {
|
|
63
|
+
type: string;
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
filterComponentType: "MultipleSelect";
|
|
67
|
+
options: {
|
|
68
|
+
label: string;
|
|
69
|
+
value: string;
|
|
70
|
+
}[];
|
|
71
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
72
|
+
})[];
|
|
73
|
+
}
|
|
74
|
+
export default Logistics;
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
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
|
+
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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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 "react";
|
|
12
|
+
import { LogisticsInterception } from "@kmkf-fe-packages/basic-components";
|
|
13
|
+
import { ExpressData, ExpressInterceptData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import GetFormItem from "../GetFormItem";
|
|
15
|
+
import InterceptSenderMobile from "./interceptSenderMobile";
|
|
16
|
+
import InterceptAddress from "./InterceptAddress";
|
|
17
|
+
import InterceptType from "./InterceptType";
|
|
18
|
+
import InterceptStatus from "./InterceptStatus";
|
|
19
|
+
import Express from "../Express";
|
|
20
|
+
import ExpressCode from "../ExpressCode";
|
|
21
|
+
import ColumnHeader from "./columnHeader";
|
|
22
|
+
var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
23
|
+
var _this = this;
|
|
24
|
+
_classCallCheck(this, Logistics);
|
|
25
|
+
_defineProperty(this, "name", void 0);
|
|
26
|
+
_defineProperty(this, "columnHeader", void 0);
|
|
27
|
+
_defineProperty(this, "id", void 0);
|
|
28
|
+
_defineProperty(this, "type", void 0);
|
|
29
|
+
_defineProperty(this, "rules", void 0);
|
|
30
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
31
|
+
_defineProperty(this, "interceptAddress", void 0);
|
|
32
|
+
_defineProperty(this, "interceptType", void 0);
|
|
33
|
+
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
34
|
+
_defineProperty(this, "interceptSenderMobile", void 0);
|
|
35
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
36
|
+
_defineProperty(this, "children", void 0);
|
|
37
|
+
_defineProperty(this, "express", void 0);
|
|
38
|
+
_defineProperty(this, "expressCode", void 0);
|
|
39
|
+
_defineProperty(this, "expressDateInstance", void 0);
|
|
40
|
+
_defineProperty(this, "expressInterceptData", void 0);
|
|
41
|
+
_defineProperty(this, "effects", void 0);
|
|
42
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
43
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record));
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderLog", function (record) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ": ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ": ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ": ", _this.interceptLogisticsStatus.renderLog(record))));
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
49
|
+
return {
|
|
50
|
+
interceptCompany: _this.express.getComponentValue(r),
|
|
51
|
+
interceptCode: _this.expressCode.getComponentValue(r),
|
|
52
|
+
interceptSenderMobile: _this.interceptSenderMobile.getComponentValue(r),
|
|
53
|
+
interceptType: _this.interceptType.getComponentValue(r),
|
|
54
|
+
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
55
|
+
interceptRedirectTo: _this.interceptAddress.getComponentValue(r)
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "renderPc", function () {
|
|
59
|
+
return null;
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "renderExport", function () {
|
|
62
|
+
return null;
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "editRender", function () {
|
|
65
|
+
var _this$componentConfig, _this$componentConfig2, _this$effects;
|
|
66
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
67
|
+
title: _this.name,
|
|
68
|
+
name: _this.id,
|
|
69
|
+
rules: _this.rules,
|
|
70
|
+
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,
|
|
71
|
+
component: /*#__PURE__*/React.createElement(LogisticsInterception, _extends({}, _this.componentConfig, {
|
|
72
|
+
logisticsOptions: _this.expressDateInstance.getExpressData(),
|
|
73
|
+
expressInterceptData: _this.expressInterceptData.getExpressData(),
|
|
74
|
+
isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
|
|
75
|
+
}))
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
79
|
+
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
80
|
+
subKey: "interceptCompany"
|
|
81
|
+
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
82
|
+
subKey: "interceptCode"
|
|
83
|
+
})), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item)];
|
|
84
|
+
});
|
|
85
|
+
this.name = options.name;
|
|
86
|
+
this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
|
|
87
|
+
name: options.name
|
|
88
|
+
});
|
|
89
|
+
this.id = options.id;
|
|
90
|
+
this.type = options.type;
|
|
91
|
+
this.componentConfig = options.componentConfig;
|
|
92
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
93
|
+
this.expressDateInstance = ExpressData.getInstance();
|
|
94
|
+
this.expressInterceptData = ExpressInterceptData.getInstance();
|
|
95
|
+
this.interceptAddress = new InterceptAddress(options);
|
|
96
|
+
this.interceptType = new InterceptType(options);
|
|
97
|
+
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
98
|
+
this.interceptSenderMobile = new InterceptSenderMobile(options);
|
|
99
|
+
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
100
|
+
id: "".concat(options.id, "_interceptCompany"),
|
|
101
|
+
name: "物流信息"
|
|
102
|
+
}));
|
|
103
|
+
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
104
|
+
id: "".concat(options.id, "_interceptCode"),
|
|
105
|
+
name: "物流单号"
|
|
106
|
+
}));
|
|
107
|
+
this.isCombinationComponent = true;
|
|
108
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus];
|
|
109
|
+
this.rules = [{
|
|
110
|
+
validator: function validator(_, value) {
|
|
111
|
+
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre, _value$interceptSende;
|
|
112
|
+
if ((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required && (!(value !== null && value !== void 0 && value.interceptCompany) || !value.interceptCode)) {
|
|
113
|
+
return Promise.reject(new Error("请填写物流信息"));
|
|
114
|
+
}
|
|
115
|
+
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.interceptType)) {
|
|
116
|
+
return Promise.reject(new Error("请选择拦截类型"));
|
|
117
|
+
}
|
|
118
|
+
var showAddress = _this.expressInterceptData.getShowNewAddressMap()["".concat(value === null || value === void 0 ? void 0 : value.interceptType)];
|
|
119
|
+
if (showAddress && (!(value !== null && value !== void 0 && (_value$interceptAddre = value.interceptAddress) !== null && _value$interceptAddre !== void 0 && _value$interceptAddre.length) || !(value !== null && value !== void 0 && value.interceptDetail) || !(value !== null && value !== void 0 && value.interceptReceiverName) || !(value !== null && value !== void 0 && value.interceptReceiverMobile))) {
|
|
120
|
+
return Promise.reject(new Error("请填写派送地址"));
|
|
121
|
+
}
|
|
122
|
+
var showSender = _this.expressInterceptData.getShowSenderMobileMap()["".concat(value === null || value === void 0 ? void 0 : value.interceptType)];
|
|
123
|
+
if (showSender && !(value !== null && value !== void 0 && value.interceptSenderMobile)) {
|
|
124
|
+
return Promise.reject(new Error("请填写发件人手机号"));
|
|
125
|
+
}
|
|
126
|
+
if (showSender && value !== null && value !== void 0 && value.interceptSenderMobile && !(value !== null && value !== void 0 && (_value$interceptSende = value.interceptSenderMobile) !== null && _value$interceptSende !== void 0 && _value$interceptSende.match(/^[1][0-9]{10}$/))) {
|
|
127
|
+
return Promise.reject(new Error("请填写正确的发件人手机号"));
|
|
128
|
+
}
|
|
129
|
+
return Promise.resolve();
|
|
130
|
+
}
|
|
131
|
+
}];
|
|
132
|
+
});
|
|
133
|
+
export default Logistics;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class InterceptSenderMobile implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
companyId: 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
|
+
constructor(options: PickOption);
|
|
16
|
+
getComponentValue: (r: Record) => any;
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: any, record: Record) => any;
|
|
19
|
+
renderLog: (r: Record) => any;
|
|
20
|
+
renderExport: (value: any, record: Record) => any;
|
|
21
|
+
editRender: () => null;
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
type: string;
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
filterComponentType: "Input";
|
|
27
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export default InterceptSenderMobile;
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
var InterceptSenderMobile = /*#__PURE__*/_createClass(function InterceptSenderMobile(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, InterceptSenderMobile);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "companyId", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "rules", void 0);
|
|
19
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
20
|
+
_defineProperty(this, "effects", void 0);
|
|
21
|
+
_defineProperty(this, "align", void 0);
|
|
22
|
+
_defineProperty(this, "width", void 0);
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
26
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
29
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
30
|
+
id: _this.id,
|
|
31
|
+
label: _this.name,
|
|
32
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
33
|
+
}) : null;
|
|
34
|
+
});
|
|
35
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
36
|
+
return record === null || record === void 0 ? void 0 : record[_this.id];
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
39
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
|
|
40
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
43
|
+
var _record;
|
|
44
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
45
|
+
});
|
|
46
|
+
_defineProperty(this, "editRender", function () {
|
|
47
|
+
return null;
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
50
|
+
return {
|
|
51
|
+
type: item.type,
|
|
52
|
+
id: "".concat(item.id, "_interceptSenderMobile"),
|
|
53
|
+
name: "".concat(item.name, "-\u53D1\u4EF6\u4EBA\u624B\u673A\u53F7"),
|
|
54
|
+
filterComponentType: "Input",
|
|
55
|
+
filterFn: function filterFn(value) {
|
|
56
|
+
return function (i) {
|
|
57
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptSenderMobile")).includes(value);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
this.name = "发件人手机号";
|
|
63
|
+
this.id = "".concat(options.id, "_interceptSenderMobile");
|
|
64
|
+
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
65
|
+
this.type = options.type;
|
|
66
|
+
this.componentConfig = options.componentConfig;
|
|
67
|
+
this.rules = [];
|
|
68
|
+
this.align = "left";
|
|
69
|
+
this.width = 200;
|
|
70
|
+
this.isCombinationComponent = false;
|
|
71
|
+
this.children = [];
|
|
72
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
73
|
+
});
|
|
74
|
+
export default InterceptSenderMobile;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
declare type Value = string[];
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
declare class BasicMultSelect implements ComponentInterface {
|
|
5
4
|
name: string;
|
|
6
5
|
id: string;
|
|
7
6
|
type: string;
|
|
8
7
|
rules: any[];
|
|
9
|
-
canFilter: boolean;
|
|
10
|
-
canGroup: boolean;
|
|
11
|
-
canHidden: boolean;
|
|
12
|
-
dataType: DataType;
|
|
13
|
-
showContains: boolean;
|
|
14
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
isCombinationComponent: boolean;
|
|
10
|
+
children: ComponentInterface[];
|
|
15
11
|
constructor(options: PickOption);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
13
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
14
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
15
|
+
getComponentValue: (r: Record) => any;
|
|
19
16
|
renderExport: (value: any, record: Record) => any;
|
|
20
|
-
editRender: () => JSX.Element;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
editRender: () => React.JSX.Element;
|
|
18
|
+
filterConfig: (item: ColumnConfig) => {
|
|
19
|
+
type: string;
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
filterComponentType: "MultipleSelect";
|
|
23
|
+
options: any[];
|
|
24
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export default BasicMultSelect;
|
|
@@ -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,10 +7,11 @@ 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 intersection from 'lodash/intersection';
|
|
12
11
|
import { ApaasMultipleSelect } from '@kmkf-fe-packages/basic-components';
|
|
13
12
|
import GetFormItem from "../GetFormItem";
|
|
14
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
15
|
var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options) {
|
|
17
16
|
var _this = this;
|
|
18
17
|
_classCallCheck(this, BasicMultSelect);
|
|
@@ -20,20 +19,15 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
20
19
|
_defineProperty(this, "id", void 0);
|
|
21
20
|
_defineProperty(this, "type", void 0);
|
|
22
21
|
_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
22
|
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
-
_defineProperty(this, "
|
|
30
|
-
|
|
31
|
-
});
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
32
25
|
_defineProperty(this, "renderClient", function (record) {
|
|
26
|
+
var _record$_this$id;
|
|
33
27
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
28
|
id: _this.id,
|
|
35
29
|
label: _this.name,
|
|
36
|
-
value:
|
|
30
|
+
value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(',')
|
|
37
31
|
}) : null;
|
|
38
32
|
});
|
|
39
33
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -43,6 +37,13 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
43
37
|
}
|
|
44
38
|
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(','));
|
|
45
39
|
});
|
|
40
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
41
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_basicMultSelect")])) 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["".concat(_this.id, "_basicMultSelect")];
|
|
46
|
+
});
|
|
46
47
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
47
48
|
var _record2;
|
|
48
49
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
|
|
@@ -62,23 +63,29 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
62
63
|
}))
|
|
63
64
|
});
|
|
64
65
|
});
|
|
65
|
-
_defineProperty(this, "
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
67
|
+
var _item$config;
|
|
68
|
+
return {
|
|
69
|
+
type: item.type,
|
|
70
|
+
id: item.id,
|
|
71
|
+
// 过滤组件id
|
|
72
|
+
name: item.name,
|
|
73
|
+
// 过滤组件名称
|
|
74
|
+
filterComponentType: 'MultipleSelect',
|
|
75
|
+
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || [],
|
|
76
|
+
filterFn: function filterFn(value) {
|
|
77
|
+
return function (i) {
|
|
78
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
72
82
|
});
|
|
73
83
|
this.name = options.name;
|
|
74
84
|
this.id = options.id;
|
|
75
85
|
this.type = options.type;
|
|
76
|
-
this.canFilter = false;
|
|
77
|
-
this.canGroup = false;
|
|
78
|
-
this.canHidden = true;
|
|
79
|
-
this.showContains = false;
|
|
80
|
-
this.dataType = 'array';
|
|
81
86
|
this.componentConfig = options.componentConfig;
|
|
82
87
|
this.rules = [];
|
|
88
|
+
this.isCombinationComponent = false;
|
|
89
|
+
this.children = [];
|
|
83
90
|
});
|
|
84
91
|
export default BasicMultSelect;
|