@kmkf-fe-packages/services-components 0.3.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/ItemView/index.d.ts +7 -0
- package/dist/esm/commonComponents/ItemView/index.js +15 -0
- package/dist/esm/commonComponents/ItemView/index.module.scss +20 -0
- package/dist/esm/components/ActualPayment/index.d.ts +27 -0
- package/dist/esm/components/ActualPayment/index.js +82 -0
- package/dist/esm/components/Address/index.d.ts +37 -0
- package/dist/esm/components/Address/index.js +112 -0
- package/dist/esm/components/Alipay/index.d.ts +36 -0
- package/dist/esm/components/Alipay/index.js +88 -0
- package/dist/esm/components/AlipayAccount/index.d.ts +29 -0
- package/dist/esm/components/AlipayAccount/index.js +86 -0
- package/dist/esm/components/AlipayName/index.d.ts +29 -0
- package/dist/esm/components/AlipayName/index.js +86 -0
- package/dist/esm/components/BuyerNick/index.d.ts +31 -0
- package/dist/esm/components/BuyerNick/index.js +100 -0
- package/dist/esm/components/Cascader/index.d.ts +45 -0
- package/dist/esm/components/Cascader/index.js +112 -0
- package/dist/esm/components/Checkbox/index.d.ts +31 -0
- package/dist/esm/components/Checkbox/index.js +102 -0
- package/dist/esm/components/Common/img/default-img.png +0 -0
- package/dist/esm/components/Common/index.d.ts +18 -0
- package/dist/esm/components/Common/index.js +222 -0
- package/dist/esm/components/Common/index.module.less +8 -0
- package/dist/esm/components/CommonDataTime/index.d.ts +30 -0
- package/dist/esm/components/CommonDataTime/index.js +79 -0
- package/dist/esm/components/DataTime/ApaasDate.d.ts +9 -0
- package/dist/esm/components/DataTime/ApaasDate.js +22 -0
- package/dist/esm/components/DataTime/index.d.ts +29 -0
- package/dist/esm/components/DataTime/index.js +103 -0
- package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +3 -0
- package/dist/esm/components/EItemEnCode/ItemEncode.js +26 -0
- package/dist/esm/components/EItemEnCode/index.d.ts +27 -0
- package/dist/esm/components/EItemEnCode/index.js +109 -0
- package/dist/esm/components/EItemId/ItemId.d.ts +4 -0
- package/dist/esm/components/EItemId/ItemId.js +26 -0
- package/dist/esm/components/EItemId/index.d.ts +27 -0
- package/dist/esm/components/EItemId/index.js +110 -0
- package/dist/esm/components/EItemSelect/ItemSelect.d.ts +4 -0
- package/dist/esm/components/EItemSelect/ItemSelect.js +27 -0
- package/dist/esm/components/EItemSelect/index.d.ts +27 -0
- package/dist/esm/components/EItemSelect/index.js +92 -0
- package/dist/esm/components/ErpTradeId/index.d.ts +27 -0
- package/dist/esm/components/ErpTradeId/index.js +76 -0
- package/dist/esm/components/Express/index.d.ts +31 -0
- package/dist/esm/components/Express/index.js +91 -0
- package/dist/esm/components/ExpressCode/index.d.ts +28 -0
- package/dist/esm/components/ExpressCode/index.js +84 -0
- package/dist/esm/components/ExpressCompany/index.d.ts +3 -0
- package/dist/esm/components/ExpressCompany/index.js +20 -0
- package/dist/esm/components/FlowStatusSelect/index.d.ts +51 -0
- package/dist/esm/components/FlowStatusSelect/index.js +124 -0
- package/dist/esm/components/GetFormItem/index.d.ts +10 -0
- package/dist/esm/components/GetFormItem/index.js +28 -0
- package/dist/esm/components/Grade/index.d.ts +26 -0
- package/dist/esm/components/Grade/index.js +75 -0
- package/dist/esm/components/Input/index.d.ts +27 -0
- package/dist/esm/components/Input/index.js +84 -0
- package/dist/esm/components/JstItemSelect/index.d.ts +29 -0
- package/dist/esm/components/JstItemSelect/index.js +115 -0
- package/dist/esm/components/JstLogistics/index.d.ts +29 -0
- package/dist/esm/components/JstLogistics/index.js +107 -0
- package/dist/esm/components/JstSendGood/index.d.ts +27 -0
- package/dist/esm/components/JstSendGood/index.js +112 -0
- package/dist/esm/components/JstSupply/index.d.ts +27 -0
- package/dist/esm/components/JstSupply/index.js +113 -0
- package/dist/esm/components/Logistics/index.d.ts +44 -0
- package/dist/esm/components/Logistics/index.js +107 -0
- package/dist/esm/components/MultSelect/index.d.ts +27 -0
- package/dist/esm/components/MultSelect/index.js +84 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +37 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +90 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +37 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +90 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +37 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.js +83 -0
- package/dist/esm/components/Ordinary/index.d.ts +46 -0
- package/dist/esm/components/Ordinary/index.js +90 -0
- package/dist/esm/components/OrdinaryHeader/index.d.ts +7 -0
- package/dist/esm/components/OrdinaryHeader/index.js +157 -0
- package/dist/esm/components/OrdinaryHeader/index.module.less +46 -0
- package/dist/esm/components/Payment/AlipayNick.d.ts +37 -0
- package/dist/esm/components/Payment/AlipayNick.js +91 -0
- package/dist/esm/components/Payment/AlipayNo.d.ts +36 -0
- package/dist/esm/components/Payment/AlipayNo.js +98 -0
- package/dist/esm/components/Payment/AlipayTime.d.ts +37 -0
- package/dist/esm/components/Payment/AlipayTime.js +90 -0
- package/dist/esm/components/Payment/BuyerNick.d.ts +36 -0
- package/dist/esm/components/Payment/BuyerNick.js +104 -0
- package/dist/esm/components/Payment/PaymentAmount.d.ts +36 -0
- package/dist/esm/components/Payment/PaymentAmount.js +88 -0
- package/dist/esm/components/Payment/PaymentStatus.d.ts +48 -0
- package/dist/esm/components/Payment/PaymentStatus.js +93 -0
- package/dist/esm/components/Payment/PaymentTid.d.ts +36 -0
- package/dist/esm/components/Payment/PaymentTid.js +81 -0
- package/dist/esm/components/Payment/index.d.ts +88 -0
- package/dist/esm/components/Payment/index.js +118 -0
- package/dist/esm/components/Picture/index.d.ts +31 -0
- package/dist/esm/components/Picture/index.js +118 -0
- package/dist/esm/components/Popover/index.d.ts +3 -0
- package/dist/esm/components/Popover/index.js +51 -0
- package/dist/esm/components/Popover/index.module.less +22 -0
- package/dist/esm/components/Radio/index.d.ts +30 -0
- package/dist/esm/components/Radio/index.js +93 -0
- package/dist/esm/components/Rate/index.d.ts +34 -0
- package/dist/esm/components/Rate/index.js +158 -0
- package/dist/esm/components/ReceiverAddress/index.d.ts +35 -0
- package/dist/esm/components/ReceiverAddress/index.js +133 -0
- package/dist/esm/components/ReceiverMobile/index.d.ts +28 -0
- package/dist/esm/components/ReceiverMobile/index.js +91 -0
- package/dist/esm/components/ReceiverName/index.d.ts +28 -0
- package/dist/esm/components/ReceiverName/index.js +88 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-0.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-1.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-2.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-3.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-4.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-5.png +0 -0
- package/dist/esm/components/Remark/index.d.ts +33 -0
- package/dist/esm/components/Remark/index.js +113 -0
- package/dist/esm/components/ReturnLogistics/index.d.ts +44 -0
- package/dist/esm/components/ReturnLogistics/index.js +107 -0
- package/dist/esm/components/Select/index.d.ts +26 -0
- package/dist/esm/components/Select/index.js +79 -0
- package/dist/esm/components/ShopName/index.d.ts +27 -0
- package/dist/esm/components/ShopName/index.js +78 -0
- package/dist/esm/components/SystemOrderNo/index.d.ts +28 -0
- package/dist/esm/components/SystemOrderNo/index.js +81 -0
- package/dist/esm/components/TemplateSelect/index.d.ts +28 -0
- package/dist/esm/components/TemplateSelect/index.js +79 -0
- package/dist/esm/components/TextArea/index.d.ts +26 -0
- package/dist/esm/components/TextArea/index.js +78 -0
- package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +4 -0
- package/dist/esm/components/ThirdItemSelect/ItemEncode.js +31 -0
- package/dist/esm/components/ThirdItemSelect/index.d.ts +27 -0
- package/dist/esm/components/ThirdItemSelect/index.js +120 -0
- package/dist/esm/components/TradeDateTime/index.d.ts +27 -0
- package/dist/esm/components/TradeDateTime/index.js +92 -0
- package/dist/esm/components/TradeId/index.d.ts +28 -0
- package/dist/esm/components/TradeId/index.js +89 -0
- package/dist/esm/components/WorkOrderId/img/repeat.png +0 -0
- package/dist/esm/components/WorkOrderId/index.d.ts +28 -0
- package/dist/esm/components/WorkOrderId/index.js +98 -0
- package/dist/esm/index.d.ts +40 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/type.d.ts +174 -0
- package/dist/esm/type.js +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,88 @@
|
|
|
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 { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, ReceiverName);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_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
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "effects", void 0);
|
|
30
|
+
_defineProperty(this, "render", function (value, record) {
|
|
31
|
+
return /*#__PURE__*/React.createElement("span", null, value);
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
34
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
|
+
id: _this.id,
|
|
36
|
+
label: _this.name,
|
|
37
|
+
value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id], record)
|
|
38
|
+
}) : null;
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_receiveName")]) === undefined) {
|
|
42
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
43
|
+
}
|
|
44
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
45
|
+
className: "pointer",
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
var _this$effects;
|
|
48
|
+
return _this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail(record);
|
|
49
|
+
}
|
|
50
|
+
}, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_receiveName")]);
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
53
|
+
return record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_receiveName")];
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "editRender", function () {
|
|
56
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
57
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
58
|
+
title: _this.name,
|
|
59
|
+
name: _this.id,
|
|
60
|
+
rules: _this.rules,
|
|
61
|
+
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,
|
|
62
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
63
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
64
|
+
}))
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "getColumns", function () {
|
|
68
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
69
|
+
dataIndex: _this.id,
|
|
70
|
+
title: _this.name,
|
|
71
|
+
componentType: _this.editRender,
|
|
72
|
+
renderExport: _this.renderExport
|
|
73
|
+
});
|
|
74
|
+
;
|
|
75
|
+
});
|
|
76
|
+
this.name = options.name;
|
|
77
|
+
this.id = options.id;
|
|
78
|
+
this.type = options.type;
|
|
79
|
+
this.canFilter = true;
|
|
80
|
+
this.canGroup = false;
|
|
81
|
+
this.canHidden = true;
|
|
82
|
+
this.dataType = 'string';
|
|
83
|
+
this.showContains = true;
|
|
84
|
+
this.componentConfig = options.componentConfig;
|
|
85
|
+
this.rules = [];
|
|
86
|
+
this.effects = options.effects;
|
|
87
|
+
});
|
|
88
|
+
export default ReceiverName;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare type Value = {
|
|
4
|
+
flag?: number | string;
|
|
5
|
+
remark?: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
declare class ERemark implements ComponentInterface {
|
|
8
|
+
name: string;
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
rules: any[];
|
|
12
|
+
canFilter: boolean;
|
|
13
|
+
canGroup: boolean;
|
|
14
|
+
canHidden: boolean;
|
|
15
|
+
dataType: DataType;
|
|
16
|
+
showContains: boolean;
|
|
17
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
18
|
+
imgList: any[];
|
|
19
|
+
flagColors: string[];
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
render: (value: Value) => JSX.Element;
|
|
22
|
+
renderClient: (record: Record) => JSX.Element | null;
|
|
23
|
+
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
24
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
25
|
+
editRender: () => JSX.Element;
|
|
26
|
+
getColumns: () => this & {
|
|
27
|
+
dataIndex: string;
|
|
28
|
+
title: string;
|
|
29
|
+
componentType: () => JSX.Element;
|
|
30
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export default ERemark;
|
|
@@ -0,0 +1,113 @@
|
|
|
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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Remark } from '@kmkf-fe-packages/basic-components';
|
|
12
|
+
import GetFormItem from "../GetFormItem";
|
|
13
|
+
import trade0 from "./flag/trade-icon-flag-0.png";
|
|
14
|
+
import trade1 from "./flag/trade-icon-flag-1.png";
|
|
15
|
+
import trade2 from "./flag/trade-icon-flag-2.png";
|
|
16
|
+
import trade3 from "./flag/trade-icon-flag-3.png";
|
|
17
|
+
import trade4 from "./flag/trade-icon-flag-4.png";
|
|
18
|
+
import trade5 from "./flag/trade-icon-flag-5.png";
|
|
19
|
+
import get from 'lodash/get';
|
|
20
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
21
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
22
|
+
var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
|
|
23
|
+
var _this = this,
|
|
24
|
+
_this$componentConfig3;
|
|
25
|
+
_classCallCheck(this, ERemark);
|
|
26
|
+
_defineProperty(this, "name", void 0);
|
|
27
|
+
_defineProperty(this, "id", void 0);
|
|
28
|
+
_defineProperty(this, "type", void 0);
|
|
29
|
+
_defineProperty(this, "rules", void 0);
|
|
30
|
+
_defineProperty(this, "canFilter", void 0);
|
|
31
|
+
_defineProperty(this, "canGroup", void 0);
|
|
32
|
+
_defineProperty(this, "canHidden", void 0);
|
|
33
|
+
_defineProperty(this, "dataType", void 0);
|
|
34
|
+
_defineProperty(this, "showContains", void 0);
|
|
35
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
36
|
+
_defineProperty(this, "imgList", void 0);
|
|
37
|
+
_defineProperty(this, "flagColors", void 0);
|
|
38
|
+
_defineProperty(this, "render", function (value) {
|
|
39
|
+
var index = get(value, 'flag');
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
style: {
|
|
42
|
+
display: 'inline-block'
|
|
43
|
+
}
|
|
44
|
+
}, index !== undefined && /*#__PURE__*/React.createElement("img", {
|
|
45
|
+
src: _this.imgList[Number(index)]
|
|
46
|
+
}), /*#__PURE__*/React.createElement("span", null, get(value, 'remark')));
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
49
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
50
|
+
id: _this.id,
|
|
51
|
+
label: _this.name,
|
|
52
|
+
value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
53
|
+
}) : null;
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
56
|
+
if (get(record, "".concat(_this.id, "_flag")) === undefined && get(record, "".concat(_this.id, "_remark")) === undefined) {
|
|
57
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
58
|
+
}
|
|
59
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
style: {
|
|
61
|
+
display: 'inline-block'
|
|
62
|
+
}
|
|
63
|
+
}, get(record, "".concat(_this.id, "_flag")) + '' ? /*#__PURE__*/React.createElement("i", {
|
|
64
|
+
className: "dz-iconfont dz-beizhu_qizhi f-lt ft_12 mr_5 ".concat(_this.flagColors[get(record, "".concat(_this.id, "_flag"))])
|
|
65
|
+
}) : null, /*#__PURE__*/React.createElement("span", null, get(record, "".concat(_this.id, "_remark"))));
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
68
|
+
return get(record, "".concat(_this.id, "_remark"));
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(this, "editRender", function () {
|
|
71
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
72
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
73
|
+
title: _this.name,
|
|
74
|
+
name: _this.id,
|
|
75
|
+
rules: _this.rules,
|
|
76
|
+
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,
|
|
77
|
+
component: /*#__PURE__*/React.createElement(Remark, _this.componentConfig)
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
_defineProperty(this, "getColumns", function () {
|
|
81
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
82
|
+
dataIndex: _this.id,
|
|
83
|
+
title: _this.name,
|
|
84
|
+
componentType: _this.editRender,
|
|
85
|
+
renderExport: _this.renderExport
|
|
86
|
+
});
|
|
87
|
+
;
|
|
88
|
+
});
|
|
89
|
+
this.name = options.name;
|
|
90
|
+
this.id = options.id;
|
|
91
|
+
this.type = options.type;
|
|
92
|
+
this.canFilter = false;
|
|
93
|
+
this.canGroup = false;
|
|
94
|
+
this.canHidden = true;
|
|
95
|
+
this.dataType = 'string';
|
|
96
|
+
this.showContains = false;
|
|
97
|
+
this.componentConfig = options.componentConfig;
|
|
98
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
99
|
+
validator: function validator(_, value) {
|
|
100
|
+
var _this$componentConfig4;
|
|
101
|
+
if (!(value !== null && value !== void 0 && value.remark)) {
|
|
102
|
+
return Promise.reject(new Error('请输入备注'));
|
|
103
|
+
}
|
|
104
|
+
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
|
|
105
|
+
return Promise.reject(new Error('请选择旗帜'));
|
|
106
|
+
}
|
|
107
|
+
return Promise.resolve();
|
|
108
|
+
}
|
|
109
|
+
}] : [];
|
|
110
|
+
this.imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
|
|
111
|
+
this.flagColors = ['gray', 'red', 'yellow', 'green', 'blue', 'purple'];
|
|
112
|
+
});
|
|
113
|
+
export default ERemark;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType } from '../../type';
|
|
3
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
|
+
import Express from '../Express';
|
|
5
|
+
import ExpressCode from '../ExpressCode';
|
|
6
|
+
declare class ReturnLogistics implements ComponentInterface {
|
|
7
|
+
name: string;
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
rules: any[];
|
|
11
|
+
canFilter: boolean;
|
|
12
|
+
canGroup: boolean;
|
|
13
|
+
canHidden: boolean;
|
|
14
|
+
dataType: DataType;
|
|
15
|
+
showContains: boolean;
|
|
16
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
17
|
+
expressDateInstance: ExpressData;
|
|
18
|
+
express: Express;
|
|
19
|
+
expressCode: ExpressCode;
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
render: () => null;
|
|
22
|
+
renderClient: (record: any) => JSX.Element;
|
|
23
|
+
renderPc: () => null;
|
|
24
|
+
renderExport: () => null;
|
|
25
|
+
editRender: (value: any) => JSX.Element;
|
|
26
|
+
getColumns: () => {
|
|
27
|
+
title: string;
|
|
28
|
+
children: ((Express & {
|
|
29
|
+
dataIndex: string;
|
|
30
|
+
title: string;
|
|
31
|
+
widget: JSX.Element;
|
|
32
|
+
groupFieldPath: string;
|
|
33
|
+
renderExport: (value: string, record: import("../../type").Record) => string | number;
|
|
34
|
+
}) | (ExpressCode & {
|
|
35
|
+
dataIndex: string;
|
|
36
|
+
title: string;
|
|
37
|
+
groupFieldPath: string;
|
|
38
|
+
renderExport: (value: string, record: import("../../type").Record) => string;
|
|
39
|
+
}))[];
|
|
40
|
+
canHidden: boolean;
|
|
41
|
+
dataIndex: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export default ReturnLogistics;
|
|
@@ -0,0 +1,107 @@
|
|
|
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 { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { ExpressLogistics } from '@kmkf-fe-packages/basic-components';
|
|
14
|
+
import Express from "../Express";
|
|
15
|
+
import ExpressCode from "../ExpressCode";
|
|
16
|
+
import GetFormItem from "../GetFormItem";
|
|
17
|
+
var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options) {
|
|
18
|
+
var _this = this,
|
|
19
|
+
_this$componentConfig3;
|
|
20
|
+
_classCallCheck(this, ReturnLogistics);
|
|
21
|
+
_defineProperty(this, "name", void 0);
|
|
22
|
+
_defineProperty(this, "id", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
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
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
31
|
+
_defineProperty(this, "expressDateInstance", void 0);
|
|
32
|
+
_defineProperty(this, "express", void 0);
|
|
33
|
+
_defineProperty(this, "expressCode", void 0);
|
|
34
|
+
_defineProperty(this, "render", function () {
|
|
35
|
+
return null;
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record));
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderPc", function () {
|
|
41
|
+
return null;
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderExport", function () {
|
|
44
|
+
return null;
|
|
45
|
+
});
|
|
46
|
+
_defineProperty(this, "editRender", function (value) {
|
|
47
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
48
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
49
|
+
title: _this.name,
|
|
50
|
+
name: _this.id,
|
|
51
|
+
rules: _this.rules,
|
|
52
|
+
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,
|
|
53
|
+
component: /*#__PURE__*/React.createElement(ExpressLogistics, _extends({}, _this.componentConfig, {
|
|
54
|
+
options: _this.expressDateInstance.getExpressData(),
|
|
55
|
+
onBlur: value === null || value === void 0 ? void 0 : value.onBlur
|
|
56
|
+
}))
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "getColumns", function () {
|
|
60
|
+
return {
|
|
61
|
+
title: _this.name,
|
|
62
|
+
children: [_this.express.getColumns(), _this.expressCode.getColumns()],
|
|
63
|
+
canHidden: _this.canHidden,
|
|
64
|
+
dataIndex: _this.id
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
this.name = options.name;
|
|
68
|
+
this.id = options.id;
|
|
69
|
+
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
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.expressDateInstance = ExpressData.getInstance();
|
|
77
|
+
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
78
|
+
name: '退货物流公司',
|
|
79
|
+
id: "".concat(options.id, "_returnLogisticsCompany")
|
|
80
|
+
}));
|
|
81
|
+
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
82
|
+
name: '退货物流单号',
|
|
83
|
+
id: "".concat(options.id, "_returnLogisticsCode")
|
|
84
|
+
}));
|
|
85
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
86
|
+
validator: function validator(_, value) {
|
|
87
|
+
var _this$componentConfig4;
|
|
88
|
+
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.isSingle) {
|
|
89
|
+
var _this$componentConfig5, _this$componentConfig6;
|
|
90
|
+
if (((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) === 'EXPRESS_COMPANY' && !(value !== null && value !== void 0 && value.company)) {
|
|
91
|
+
return Promise.reject(new Error('请选择物流公司'));
|
|
92
|
+
} else if (((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showField) === 'EXPRESS_WAYBILL_CODE' && !(value !== null && value !== void 0 && value.order)) {
|
|
93
|
+
return Promise.reject(new Error('请输入物流单号'));
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
if (!(value !== null && value !== void 0 && value.company)) {
|
|
97
|
+
return Promise.reject(new Error('请选择物流公司'));
|
|
98
|
+
}
|
|
99
|
+
if (!(value !== null && value !== void 0 && value.order)) {
|
|
100
|
+
return Promise.reject(new Error('请输入物流单号'));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return Promise.resolve();
|
|
104
|
+
}
|
|
105
|
+
}] : [];
|
|
106
|
+
});
|
|
107
|
+
export default ReturnLogistics;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class BasicSelect implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
constructor(options: PickOption);
|
|
15
|
+
render: (value: string) => JSX.Element;
|
|
16
|
+
editRender: () => JSX.Element;
|
|
17
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
18
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
19
|
+
renderExport: (value: any, record: Record) => any;
|
|
20
|
+
getColumns: () => this & {
|
|
21
|
+
dataIndex: string;
|
|
22
|
+
title: string;
|
|
23
|
+
renderExport: (value: any, record: Record) => any;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export default BasicSelect;
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { ApaasSelect } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, BasicSelect);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_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
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "render", function (value) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("span", null, value);
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(this, "editRender", function () {
|
|
33
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
34
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
35
|
+
title: _this.name,
|
|
36
|
+
name: _this.id,
|
|
37
|
+
rules: _this.rules,
|
|
38
|
+
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,
|
|
39
|
+
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
40
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
41
|
+
showSearch: true
|
|
42
|
+
}))
|
|
43
|
+
});
|
|
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: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
50
|
+
}) : null;
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
53
|
+
var _record;
|
|
54
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_select")]) !== null && _record !== void 0 ? _record : '--');
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
57
|
+
var _record2;
|
|
58
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_select")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "getColumns", function () {
|
|
61
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
62
|
+
dataIndex: _this.id,
|
|
63
|
+
title: _this.name,
|
|
64
|
+
renderExport: _this.renderExport
|
|
65
|
+
});
|
|
66
|
+
;
|
|
67
|
+
});
|
|
68
|
+
this.name = options.name;
|
|
69
|
+
this.id = options.id;
|
|
70
|
+
this.type = options.type;
|
|
71
|
+
this.canFilter = true;
|
|
72
|
+
this.canGroup = true;
|
|
73
|
+
this.canHidden = true;
|
|
74
|
+
this.showContains = false;
|
|
75
|
+
this.dataType = 'string';
|
|
76
|
+
this.componentConfig = options.componentConfig;
|
|
77
|
+
this.rules = [];
|
|
78
|
+
});
|
|
79
|
+
export default BasicSelect;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class BasicInput implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
constructor(options: PickOption);
|
|
15
|
+
render: (value: string) => JSX.Element;
|
|
16
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
17
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
18
|
+
renderExport: (value: any, record: Record) => any;
|
|
19
|
+
editRender: (value: any) => JSX.Element;
|
|
20
|
+
getColumns: () => this & {
|
|
21
|
+
dataIndex: string;
|
|
22
|
+
title: string;
|
|
23
|
+
componentType: (value: any) => JSX.Element;
|
|
24
|
+
renderExport: (value: any, record: Record) => any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export default BasicInput;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, BasicInput);
|
|
19
|
+
_defineProperty(this, "name", void 0);
|
|
20
|
+
_defineProperty(this, "id", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_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
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "render", function (value) {
|
|
30
|
+
return /*#__PURE__*/React.createElement("span", null, value);
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
33
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
|
+
id: _this.id,
|
|
35
|
+
label: _this.name,
|
|
36
|
+
value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
37
|
+
}) : null;
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
40
|
+
var _record;
|
|
41
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_shopName")]) !== null && _record !== void 0 ? _record : '--');
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
44
|
+
var _record2;
|
|
45
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_shopName")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "editRender", function (value) {
|
|
48
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
49
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
50
|
+
title: _this.name,
|
|
51
|
+
name: _this.id,
|
|
52
|
+
rules: _this.rules,
|
|
53
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
54
|
+
component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
|
|
55
|
+
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
56
|
+
}))
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "getColumns", function () {
|
|
60
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
61
|
+
dataIndex: _this.id,
|
|
62
|
+
title: _this.name,
|
|
63
|
+
componentType: _this.editRender,
|
|
64
|
+
renderExport: _this.renderExport
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
this.name = options.name;
|
|
68
|
+
this.id = options.id;
|
|
69
|
+
this.type = options.type;
|
|
70
|
+
this.canFilter = true;
|
|
71
|
+
this.canGroup = true;
|
|
72
|
+
this.canHidden = true;
|
|
73
|
+
this.dataType = 'string';
|
|
74
|
+
this.showContains = true;
|
|
75
|
+
this.componentConfig = options.componentConfig;
|
|
76
|
+
this.rules = [];
|
|
77
|
+
});
|
|
78
|
+
export default BasicInput;
|