@kmkf-fe-packages/services-components 0.3.1-alpha.10
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/commonComponents/PlatBuyer/index.d.ts +9 -0
- package/dist/esm/commonComponents/PlatBuyer/index.js +45 -0
- package/dist/esm/commonComponents/Wangwang/img/wang.gif +0 -0
- package/dist/esm/commonComponents/Wangwang/index.d.ts +7 -0
- package/dist/esm/commonComponents/Wangwang/index.js +31 -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 +31 -0
- package/dist/esm/components/AlipayAccount/index.js +90 -0
- package/dist/esm/components/AlipayName/index.d.ts +31 -0
- package/dist/esm/components/AlipayName/index.js +89 -0
- package/dist/esm/components/BuyerNick/index.d.ts +31 -0
- package/dist/esm/components/BuyerNick/index.js +103 -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 +223 -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 +33 -0
- package/dist/esm/components/Express/index.js +94 -0
- package/dist/esm/components/ExpressCode/index.d.ts +30 -0
- package/dist/esm/components/ExpressCode/index.js +87 -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 +39 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +93 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +39 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +93 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +39 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.js +86 -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 +39 -0
- package/dist/esm/components/Payment/AlipayNick.js +94 -0
- package/dist/esm/components/Payment/AlipayNo.d.ts +38 -0
- package/dist/esm/components/Payment/AlipayNo.js +101 -0
- package/dist/esm/components/Payment/AlipayTime.d.ts +39 -0
- package/dist/esm/components/Payment/AlipayTime.js +93 -0
- package/dist/esm/components/Payment/BuyerNick.d.ts +39 -0
- package/dist/esm/components/Payment/BuyerNick.js +112 -0
- package/dist/esm/components/Payment/PaymentAmount.d.ts +38 -0
- package/dist/esm/components/Payment/PaymentAmount.js +91 -0
- package/dist/esm/components/Payment/PaymentStatus.d.ts +50 -0
- package/dist/esm/components/Payment/PaymentStatus.js +96 -0
- package/dist/esm/components/Payment/PaymentTid.d.ts +38 -0
- package/dist/esm/components/Payment/PaymentTid.js +84 -0
- package/dist/esm/components/Payment/index.d.ts +120 -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,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
var ItemView = function ItemView(_ref) {
|
|
3
|
+
var label = _ref.label,
|
|
4
|
+
value = _ref.value,
|
|
5
|
+
id = _ref.id;
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7
|
+
key: id,
|
|
8
|
+
className: "orderItemView"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "itemViewLeft"
|
|
11
|
+
}, label, ":"), /*#__PURE__*/React.createElement("span", {
|
|
12
|
+
className: "itemViewRight"
|
|
13
|
+
}, value));
|
|
14
|
+
};
|
|
15
|
+
export default ItemView;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.orderItemView {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
margin: 6px 0;
|
|
5
|
+
|
|
6
|
+
.itemViewLeft {
|
|
7
|
+
max-width: 58px;
|
|
8
|
+
margin-right: 8px;
|
|
9
|
+
color: rgba(0, 0, 0, 0.4);
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.itemViewRight {
|
|
15
|
+
flex-grow: 1;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
color: rgba(0, 0, 0, 0.85);
|
|
18
|
+
word-break: break-all;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type PlatBuyerProp = {
|
|
3
|
+
shopId: string;
|
|
4
|
+
buyerNick: string;
|
|
5
|
+
buyerOpenUid: string;
|
|
6
|
+
shopList: any[];
|
|
7
|
+
};
|
|
8
|
+
declare const PlatBuyer: ({ shopId, buyerNick, buyerOpenUid, shopList }: PlatBuyerProp) => JSX.Element;
|
|
9
|
+
export default PlatBuyer;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 _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; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
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); }
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
|
+
import { CopyOutlined } from '@ant-design/icons';
|
|
9
|
+
import { message } from 'antd';
|
|
10
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
11
|
+
import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
|
+
import Wangwang from "../Wangwang";
|
|
13
|
+
var PlatBuyer = function PlatBuyer(_ref) {
|
|
14
|
+
var _platInfo$shopId;
|
|
15
|
+
var shopId = _ref.shopId,
|
|
16
|
+
buyerNick = _ref.buyerNick,
|
|
17
|
+
buyerOpenUid = _ref.buyerOpenUid,
|
|
18
|
+
shopList = _ref.shopList;
|
|
19
|
+
var platList = PlatData.getInstance().getPlatData();
|
|
20
|
+
var platInfo = useMemo(function () {
|
|
21
|
+
var info = {};
|
|
22
|
+
(shopList || []).forEach(function (item) {
|
|
23
|
+
var plat = platList.find(function (t) {
|
|
24
|
+
return +t.platformType === +item.shopSource;
|
|
25
|
+
});
|
|
26
|
+
plat && (info[item.shopId] = _objectSpread({}, plat));
|
|
27
|
+
});
|
|
28
|
+
return info;
|
|
29
|
+
}, [platList, shopList]);
|
|
30
|
+
return (platInfo === null || platInfo === void 0 ? void 0 : (_platInfo$shopId = platInfo[shopId]) === null || _platInfo$shopId === void 0 ? void 0 : _platInfo$shopId.platformTypeStr) === 'TAOBAO' ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Wangwang, {
|
|
31
|
+
nick: buyerNick,
|
|
32
|
+
buyerOpenUid: buyerOpenUid
|
|
33
|
+
})) : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
34
|
+
text: buyerNick,
|
|
35
|
+
onCopy: function onCopy() {
|
|
36
|
+
message.success('复制成功');
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
style: {
|
|
40
|
+
paddingLeft: '4px',
|
|
41
|
+
cursor: 'pointer'
|
|
42
|
+
}
|
|
43
|
+
}, /*#__PURE__*/React.createElement(CopyOutlined, null)));
|
|
44
|
+
};
|
|
45
|
+
export default PlatBuyer;
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Description:
|
|
3
|
+
* @Author: litian
|
|
4
|
+
* @Date: 2022-07-27 16:36:49
|
|
5
|
+
* @LastEditors: litian
|
|
6
|
+
* @LastEditTime: 2022-08-26 15:27:11
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import wangImg from "./img/wang.gif";
|
|
10
|
+
var Wangwang = function Wangwang(props) {
|
|
11
|
+
var nick = props.nick,
|
|
12
|
+
buyerOpenUid = props.buyerOpenUid;
|
|
13
|
+
var isOSX = function isOSX() {
|
|
14
|
+
return /Mac OS X/i.test(navigator.userAgent);
|
|
15
|
+
};
|
|
16
|
+
var openWangwang = function openWangwang() {
|
|
17
|
+
var url = isOSX() ? "//amos.alicdn.com/getcid.aw?v=2&uid=".concat(decodeURIComponent(nick), "&site=cntaobao&s=1&groupid=0&openAppkey=21819818&openUID=").concat(buyerOpenUid, "&charset=utf-8") : "aliim:sendmsg?&touid=cntaobao".concat(decodeURIComponent(nick), "&siteid=cntaobao&status=2&portalId=&gid=&itemsId=&scene=&toRole=&source=light&client=false&encryptUID=&bizDomain=taobao&openAppkey=21819818&openUID=").concat(buyerOpenUid);
|
|
18
|
+
window.open(url);
|
|
19
|
+
};
|
|
20
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
21
|
+
onClick: function onClick() {
|
|
22
|
+
openWangwang();
|
|
23
|
+
}
|
|
24
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
25
|
+
alt: "\u8BF7\u70B9\u51FB\u76F4\u63A5\u8BBF\u95EE",
|
|
26
|
+
src: wangImg
|
|
27
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
className: "fc_blue wangwangname"
|
|
29
|
+
}, nick));
|
|
30
|
+
};
|
|
31
|
+
export default Wangwang;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class ActualPayment 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: number) => JSX.Element;
|
|
16
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
17
|
+
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
18
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
19
|
+
editRender: (value: any) => JSX.Element;
|
|
20
|
+
getColumns: () => this & {
|
|
21
|
+
dataIndex: string;
|
|
22
|
+
title: string;
|
|
23
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
24
|
+
componentType: (value: any) => JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export default ActualPayment;
|
|
@@ -0,0 +1,82 @@
|
|
|
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 ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
|
|
17
|
+
var _this = this;
|
|
18
|
+
_classCallCheck(this, ActualPayment);
|
|
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: 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, "_actualPayment")]) !== 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, "_actualPayment")]) !== 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
|
+
renderExport: _this.renderExport,
|
|
64
|
+
componentType: _this.editRender
|
|
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.dataType = 'number';
|
|
75
|
+
this.showContains = false;
|
|
76
|
+
this.componentConfig = options.componentConfig;
|
|
77
|
+
this.rules = [{
|
|
78
|
+
pattern: /^\d+(\.\d{1,2})?$/,
|
|
79
|
+
message: '字段为正数或最多两位小数'
|
|
80
|
+
}];
|
|
81
|
+
});
|
|
82
|
+
export default ActualPayment;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
|
+
declare type Value = (string | number)[] | undefined;
|
|
5
|
+
declare class BasicInput implements ComponentInterface {
|
|
6
|
+
name: string;
|
|
7
|
+
id: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
canFilter: boolean;
|
|
11
|
+
canGroup: boolean;
|
|
12
|
+
canHidden: boolean;
|
|
13
|
+
dataType: DataType;
|
|
14
|
+
showContains: boolean;
|
|
15
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
16
|
+
addressDateInstance: AddressData;
|
|
17
|
+
constructor(options: PickOption);
|
|
18
|
+
/**
|
|
19
|
+
* 通过值计算展示内容
|
|
20
|
+
* @param value
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
getValue: (value: Value) => string | undefined;
|
|
24
|
+
render: (value: Value) => JSX.Element;
|
|
25
|
+
transTextToNumber: (value?: string) => string | number | undefined;
|
|
26
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
27
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
28
|
+
renderExport: (value: any, record: any) => string;
|
|
29
|
+
editRender: (value: any) => JSX.Element;
|
|
30
|
+
getColumns: () => this & {
|
|
31
|
+
dataIndex: string;
|
|
32
|
+
title: string;
|
|
33
|
+
componentType: (value: any) => JSX.Element;
|
|
34
|
+
renderExport: (value: any, record: any) => string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export default BasicInput;
|
|
@@ -0,0 +1,112 @@
|
|
|
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 { ApaasAddress } from '@kmkf-fe-packages/basic-components';
|
|
12
|
+
import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
|
+
import every from 'lodash/every';
|
|
17
|
+
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
_classCallCheck(this, BasicInput);
|
|
20
|
+
_defineProperty(this, "name", void 0);
|
|
21
|
+
_defineProperty(this, "id", void 0);
|
|
22
|
+
_defineProperty(this, "type", void 0);
|
|
23
|
+
_defineProperty(this, "rules", void 0);
|
|
24
|
+
_defineProperty(this, "canFilter", void 0);
|
|
25
|
+
_defineProperty(this, "canGroup", void 0);
|
|
26
|
+
_defineProperty(this, "canHidden", void 0);
|
|
27
|
+
_defineProperty(this, "dataType", void 0);
|
|
28
|
+
_defineProperty(this, "showContains", void 0);
|
|
29
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
30
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
31
|
+
_defineProperty(this, "getValue", function (value) {
|
|
32
|
+
var _value$map;
|
|
33
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (suffix) {
|
|
34
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
35
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.join('');
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "render", function (value) {
|
|
38
|
+
return /*#__PURE__*/React.createElement("span", null, _this.getValue(value));
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "transTextToNumber", function (value) {
|
|
41
|
+
return value ? +value : value;
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
44
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
45
|
+
id: _this.id,
|
|
46
|
+
label: _this.name,
|
|
47
|
+
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
48
|
+
}) : null;
|
|
49
|
+
});
|
|
50
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
51
|
+
var _address;
|
|
52
|
+
if (record["".concat(_this.id, "_basicProvince")] === undefined) {
|
|
53
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
54
|
+
}
|
|
55
|
+
var address = [_this.transTextToNumber(record["".concat(_this.id, "_basicProvince")]), _this.transTextToNumber(record["".concat(_this.id, "_basicCity")]), _this.transTextToNumber(record["".concat(_this.id, "_basicDistrict")])];
|
|
56
|
+
address = every(address, function (item) {
|
|
57
|
+
return !item;
|
|
58
|
+
}) ? [] : address;
|
|
59
|
+
return /*#__PURE__*/React.createElement("span", null, (_address = address) === null || _address === void 0 ? void 0 : _address.map(function (suffix) {
|
|
60
|
+
return _this.addressDateInstance.getNameByCode(suffix || '');
|
|
61
|
+
}).join(''));
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
64
|
+
var _address2;
|
|
65
|
+
if (record["".concat(_this.id, "_basicProvince")] === undefined) {
|
|
66
|
+
return '--';
|
|
67
|
+
}
|
|
68
|
+
var address = [_this.transTextToNumber(record["".concat(_this.id, "_basicProvince")]), _this.transTextToNumber(record["".concat(_this.id, "_basicCity")]), _this.transTextToNumber(record["".concat(_this.id, "_basicDistrict")])];
|
|
69
|
+
address = every(address, function (item) {
|
|
70
|
+
return !item;
|
|
71
|
+
}) ? [] : address;
|
|
72
|
+
return (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function (suffix) {
|
|
73
|
+
return _this.addressDateInstance.getNameByCode(suffix || '');
|
|
74
|
+
}).join('');
|
|
75
|
+
});
|
|
76
|
+
_defineProperty(this, "editRender", function (value) {
|
|
77
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
78
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
79
|
+
title: _this.name,
|
|
80
|
+
name: _this.id,
|
|
81
|
+
rules: _this.rules,
|
|
82
|
+
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,
|
|
83
|
+
component: /*#__PURE__*/React.createElement(ApaasAddress, _this.componentConfig)
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
_defineProperty(this, "getColumns", function () {
|
|
87
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
88
|
+
dataIndex: _this.id,
|
|
89
|
+
title: _this.name,
|
|
90
|
+
componentType: _this.editRender,
|
|
91
|
+
renderExport: _this.renderExport
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
this.name = options.name;
|
|
95
|
+
this.id = options.id;
|
|
96
|
+
this.type = options.type;
|
|
97
|
+
this.canFilter = true;
|
|
98
|
+
this.canGroup = true;
|
|
99
|
+
this.canHidden = true;
|
|
100
|
+
this.dataType = 'array';
|
|
101
|
+
this.showContains = false;
|
|
102
|
+
this.rules = [];
|
|
103
|
+
this.componentConfig = options.componentConfig;
|
|
104
|
+
this.addressDateInstance = AddressData.getInstance();
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 通过值计算展示内容
|
|
108
|
+
* @param value
|
|
109
|
+
* @returns
|
|
110
|
+
*/);
|
|
111
|
+
|
|
112
|
+
export default BasicInput;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
import EAlipayAccount from '../AlipayAccount';
|
|
4
|
+
import EAlipayName from '../AlipayName';
|
|
5
|
+
declare class Alipay implements ComponentInterface {
|
|
6
|
+
name: string;
|
|
7
|
+
id: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
canFilter: boolean;
|
|
11
|
+
canGroup: boolean;
|
|
12
|
+
canHidden: boolean;
|
|
13
|
+
dataType: DataType;
|
|
14
|
+
showContains: boolean;
|
|
15
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
16
|
+
alipayAccount: EAlipayAccount;
|
|
17
|
+
alipayName: EAlipayName;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
render: () => null;
|
|
20
|
+
renderClient: (record: Record) => JSX.Element;
|
|
21
|
+
renderPc: () => null;
|
|
22
|
+
renderExport: () => null;
|
|
23
|
+
editRender: (value: any) => JSX.Element;
|
|
24
|
+
getColumns: () => {
|
|
25
|
+
title: string;
|
|
26
|
+
children: (EAlipayAccount & {
|
|
27
|
+
dataIndex: string;
|
|
28
|
+
title: string;
|
|
29
|
+
componentType: (value: any) => JSX.Element;
|
|
30
|
+
renderExport: (value?: string | undefined) => string;
|
|
31
|
+
})[];
|
|
32
|
+
canHidden: boolean;
|
|
33
|
+
dataIndex: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export default Alipay;
|
|
@@ -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 { AliPay } from '@kmkf-fe-packages/basic-components';
|
|
13
|
+
import EAlipayAccount from "../AlipayAccount";
|
|
14
|
+
import EAlipayName from "../AlipayName";
|
|
15
|
+
import GetFormItem from "../GetFormItem";
|
|
16
|
+
var Alipay = /*#__PURE__*/_createClass(function Alipay(options) {
|
|
17
|
+
var _this = this,
|
|
18
|
+
_this$componentConfig3;
|
|
19
|
+
_classCallCheck(this, Alipay);
|
|
20
|
+
_defineProperty(this, "name", void 0);
|
|
21
|
+
_defineProperty(this, "id", void 0);
|
|
22
|
+
_defineProperty(this, "type", void 0);
|
|
23
|
+
_defineProperty(this, "rules", void 0);
|
|
24
|
+
_defineProperty(this, "canFilter", void 0);
|
|
25
|
+
_defineProperty(this, "canGroup", void 0);
|
|
26
|
+
_defineProperty(this, "canHidden", void 0);
|
|
27
|
+
_defineProperty(this, "dataType", void 0);
|
|
28
|
+
_defineProperty(this, "showContains", void 0);
|
|
29
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
30
|
+
_defineProperty(this, "alipayAccount", void 0);
|
|
31
|
+
_defineProperty(this, "alipayName", void 0);
|
|
32
|
+
_defineProperty(this, "render", function () {
|
|
33
|
+
return null;
|
|
34
|
+
});
|
|
35
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.alipayName.renderClient(record), _this.alipayAccount.renderClient(record));
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderPc", function () {
|
|
39
|
+
return null;
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "renderExport", function () {
|
|
42
|
+
return null;
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "editRender", function (value) {
|
|
45
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
46
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
47
|
+
title: _this.name,
|
|
48
|
+
name: _this.id,
|
|
49
|
+
rules: _this.rules,
|
|
50
|
+
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,
|
|
51
|
+
component: /*#__PURE__*/React.createElement(AliPay, _extends({}, _this.componentConfig, {
|
|
52
|
+
onBlur: value === null || value === void 0 ? void 0 : value.onBlur
|
|
53
|
+
}))
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "getColumns", function () {
|
|
57
|
+
return {
|
|
58
|
+
title: _this.name,
|
|
59
|
+
children: [_this.alipayName.getColumns(), _this.alipayAccount.getColumns()],
|
|
60
|
+
canHidden: _this.canHidden,
|
|
61
|
+
dataIndex: _this.id
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
this.name = options.name;
|
|
65
|
+
this.id = options.id;
|
|
66
|
+
this.type = options.type;
|
|
67
|
+
this.canFilter = false;
|
|
68
|
+
this.canGroup = false;
|
|
69
|
+
this.canHidden = true;
|
|
70
|
+
this.showContains = false;
|
|
71
|
+
this.dataType = 'string';
|
|
72
|
+
this.componentConfig = options.componentConfig;
|
|
73
|
+
this.alipayAccount = new EAlipayAccount(_objectSpread({}, options));
|
|
74
|
+
this.alipayName = new EAlipayName(_objectSpread({}, options));
|
|
75
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
76
|
+
validator: function validator(_, value) {
|
|
77
|
+
var _this$componentConfig4;
|
|
78
|
+
if (!((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.isSingle) && !(value !== null && value !== void 0 && value.name)) {
|
|
79
|
+
return Promise.reject(new Error('请输入支付宝名称'));
|
|
80
|
+
}
|
|
81
|
+
if (!(value !== null && value !== void 0 && value.user)) {
|
|
82
|
+
return Promise.reject(new Error('请输入支付宝账号'));
|
|
83
|
+
}
|
|
84
|
+
return Promise.resolve();
|
|
85
|
+
}
|
|
86
|
+
}] : [];
|
|
87
|
+
});
|
|
88
|
+
export default Alipay;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, ALignType, Record } from '../../type';
|
|
3
|
+
declare class EAlipayAccount 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
|
+
effects: ComponentInterface["effects"];
|
|
15
|
+
align: ALignType;
|
|
16
|
+
width: number;
|
|
17
|
+
constructor(options: PickOption);
|
|
18
|
+
render: (value: string, record: Record) => JSX.Element;
|
|
19
|
+
renderClient: (record: Record) => JSX.Element | null;
|
|
20
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
21
|
+
renderExport: (value?: string) => string;
|
|
22
|
+
editRender: (value: any) => JSX.Element;
|
|
23
|
+
getColumns: () => this & {
|
|
24
|
+
dataIndex: string;
|
|
25
|
+
title: string;
|
|
26
|
+
componentType: (value: any) => JSX.Element;
|
|
27
|
+
renderExport: (value?: string) => string;
|
|
28
|
+
render: (value: any, record: Record) => JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export default EAlipayAccount;
|