@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.
Files changed (152) hide show
  1. package/dist/esm/commonComponents/ItemView/index.d.ts +7 -0
  2. package/dist/esm/commonComponents/ItemView/index.js +15 -0
  3. package/dist/esm/commonComponents/ItemView/index.module.scss +20 -0
  4. package/dist/esm/commonComponents/PlatBuyer/index.d.ts +9 -0
  5. package/dist/esm/commonComponents/PlatBuyer/index.js +45 -0
  6. package/dist/esm/commonComponents/Wangwang/img/wang.gif +0 -0
  7. package/dist/esm/commonComponents/Wangwang/index.d.ts +7 -0
  8. package/dist/esm/commonComponents/Wangwang/index.js +31 -0
  9. package/dist/esm/components/ActualPayment/index.d.ts +27 -0
  10. package/dist/esm/components/ActualPayment/index.js +82 -0
  11. package/dist/esm/components/Address/index.d.ts +37 -0
  12. package/dist/esm/components/Address/index.js +112 -0
  13. package/dist/esm/components/Alipay/index.d.ts +36 -0
  14. package/dist/esm/components/Alipay/index.js +88 -0
  15. package/dist/esm/components/AlipayAccount/index.d.ts +31 -0
  16. package/dist/esm/components/AlipayAccount/index.js +90 -0
  17. package/dist/esm/components/AlipayName/index.d.ts +31 -0
  18. package/dist/esm/components/AlipayName/index.js +89 -0
  19. package/dist/esm/components/BuyerNick/index.d.ts +31 -0
  20. package/dist/esm/components/BuyerNick/index.js +103 -0
  21. package/dist/esm/components/Cascader/index.d.ts +45 -0
  22. package/dist/esm/components/Cascader/index.js +112 -0
  23. package/dist/esm/components/Checkbox/index.d.ts +31 -0
  24. package/dist/esm/components/Checkbox/index.js +102 -0
  25. package/dist/esm/components/Common/img/default-img.png +0 -0
  26. package/dist/esm/components/Common/index.d.ts +18 -0
  27. package/dist/esm/components/Common/index.js +223 -0
  28. package/dist/esm/components/Common/index.module.less +8 -0
  29. package/dist/esm/components/CommonDataTime/index.d.ts +30 -0
  30. package/dist/esm/components/CommonDataTime/index.js +79 -0
  31. package/dist/esm/components/DataTime/ApaasDate.d.ts +9 -0
  32. package/dist/esm/components/DataTime/ApaasDate.js +22 -0
  33. package/dist/esm/components/DataTime/index.d.ts +29 -0
  34. package/dist/esm/components/DataTime/index.js +103 -0
  35. package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +3 -0
  36. package/dist/esm/components/EItemEnCode/ItemEncode.js +26 -0
  37. package/dist/esm/components/EItemEnCode/index.d.ts +27 -0
  38. package/dist/esm/components/EItemEnCode/index.js +109 -0
  39. package/dist/esm/components/EItemId/ItemId.d.ts +4 -0
  40. package/dist/esm/components/EItemId/ItemId.js +26 -0
  41. package/dist/esm/components/EItemId/index.d.ts +27 -0
  42. package/dist/esm/components/EItemId/index.js +110 -0
  43. package/dist/esm/components/EItemSelect/ItemSelect.d.ts +4 -0
  44. package/dist/esm/components/EItemSelect/ItemSelect.js +27 -0
  45. package/dist/esm/components/EItemSelect/index.d.ts +27 -0
  46. package/dist/esm/components/EItemSelect/index.js +92 -0
  47. package/dist/esm/components/ErpTradeId/index.d.ts +27 -0
  48. package/dist/esm/components/ErpTradeId/index.js +76 -0
  49. package/dist/esm/components/Express/index.d.ts +33 -0
  50. package/dist/esm/components/Express/index.js +94 -0
  51. package/dist/esm/components/ExpressCode/index.d.ts +30 -0
  52. package/dist/esm/components/ExpressCode/index.js +87 -0
  53. package/dist/esm/components/ExpressCompany/index.d.ts +3 -0
  54. package/dist/esm/components/ExpressCompany/index.js +20 -0
  55. package/dist/esm/components/FlowStatusSelect/index.d.ts +51 -0
  56. package/dist/esm/components/FlowStatusSelect/index.js +124 -0
  57. package/dist/esm/components/GetFormItem/index.d.ts +10 -0
  58. package/dist/esm/components/GetFormItem/index.js +28 -0
  59. package/dist/esm/components/Grade/index.d.ts +26 -0
  60. package/dist/esm/components/Grade/index.js +75 -0
  61. package/dist/esm/components/Input/index.d.ts +27 -0
  62. package/dist/esm/components/Input/index.js +84 -0
  63. package/dist/esm/components/JstItemSelect/index.d.ts +29 -0
  64. package/dist/esm/components/JstItemSelect/index.js +115 -0
  65. package/dist/esm/components/JstLogistics/index.d.ts +29 -0
  66. package/dist/esm/components/JstLogistics/index.js +107 -0
  67. package/dist/esm/components/JstSendGood/index.d.ts +27 -0
  68. package/dist/esm/components/JstSendGood/index.js +112 -0
  69. package/dist/esm/components/JstSupply/index.d.ts +27 -0
  70. package/dist/esm/components/JstSupply/index.js +113 -0
  71. package/dist/esm/components/Logistics/index.d.ts +44 -0
  72. package/dist/esm/components/Logistics/index.js +107 -0
  73. package/dist/esm/components/MultSelect/index.d.ts +27 -0
  74. package/dist/esm/components/MultSelect/index.js +84 -0
  75. package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +39 -0
  76. package/dist/esm/components/Ordinary/OrdinaryHeader.js +93 -0
  77. package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +39 -0
  78. package/dist/esm/components/Ordinary/OrdinaryMoney.js +93 -0
  79. package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +39 -0
  80. package/dist/esm/components/Ordinary/OrdinarySerial.js +86 -0
  81. package/dist/esm/components/Ordinary/index.d.ts +46 -0
  82. package/dist/esm/components/Ordinary/index.js +90 -0
  83. package/dist/esm/components/OrdinaryHeader/index.d.ts +7 -0
  84. package/dist/esm/components/OrdinaryHeader/index.js +157 -0
  85. package/dist/esm/components/OrdinaryHeader/index.module.less +46 -0
  86. package/dist/esm/components/Payment/AlipayNick.d.ts +39 -0
  87. package/dist/esm/components/Payment/AlipayNick.js +94 -0
  88. package/dist/esm/components/Payment/AlipayNo.d.ts +38 -0
  89. package/dist/esm/components/Payment/AlipayNo.js +101 -0
  90. package/dist/esm/components/Payment/AlipayTime.d.ts +39 -0
  91. package/dist/esm/components/Payment/AlipayTime.js +93 -0
  92. package/dist/esm/components/Payment/BuyerNick.d.ts +39 -0
  93. package/dist/esm/components/Payment/BuyerNick.js +112 -0
  94. package/dist/esm/components/Payment/PaymentAmount.d.ts +38 -0
  95. package/dist/esm/components/Payment/PaymentAmount.js +91 -0
  96. package/dist/esm/components/Payment/PaymentStatus.d.ts +50 -0
  97. package/dist/esm/components/Payment/PaymentStatus.js +96 -0
  98. package/dist/esm/components/Payment/PaymentTid.d.ts +38 -0
  99. package/dist/esm/components/Payment/PaymentTid.js +84 -0
  100. package/dist/esm/components/Payment/index.d.ts +120 -0
  101. package/dist/esm/components/Payment/index.js +118 -0
  102. package/dist/esm/components/Picture/index.d.ts +31 -0
  103. package/dist/esm/components/Picture/index.js +118 -0
  104. package/dist/esm/components/Popover/index.d.ts +3 -0
  105. package/dist/esm/components/Popover/index.js +51 -0
  106. package/dist/esm/components/Popover/index.module.less +22 -0
  107. package/dist/esm/components/Radio/index.d.ts +30 -0
  108. package/dist/esm/components/Radio/index.js +93 -0
  109. package/dist/esm/components/Rate/index.d.ts +34 -0
  110. package/dist/esm/components/Rate/index.js +158 -0
  111. package/dist/esm/components/ReceiverAddress/index.d.ts +35 -0
  112. package/dist/esm/components/ReceiverAddress/index.js +133 -0
  113. package/dist/esm/components/ReceiverMobile/index.d.ts +28 -0
  114. package/dist/esm/components/ReceiverMobile/index.js +91 -0
  115. package/dist/esm/components/ReceiverName/index.d.ts +28 -0
  116. package/dist/esm/components/ReceiverName/index.js +88 -0
  117. package/dist/esm/components/Remark/flag/trade-icon-flag-0.png +0 -0
  118. package/dist/esm/components/Remark/flag/trade-icon-flag-1.png +0 -0
  119. package/dist/esm/components/Remark/flag/trade-icon-flag-2.png +0 -0
  120. package/dist/esm/components/Remark/flag/trade-icon-flag-3.png +0 -0
  121. package/dist/esm/components/Remark/flag/trade-icon-flag-4.png +0 -0
  122. package/dist/esm/components/Remark/flag/trade-icon-flag-5.png +0 -0
  123. package/dist/esm/components/Remark/index.d.ts +33 -0
  124. package/dist/esm/components/Remark/index.js +113 -0
  125. package/dist/esm/components/ReturnLogistics/index.d.ts +44 -0
  126. package/dist/esm/components/ReturnLogistics/index.js +107 -0
  127. package/dist/esm/components/Select/index.d.ts +26 -0
  128. package/dist/esm/components/Select/index.js +79 -0
  129. package/dist/esm/components/ShopName/index.d.ts +27 -0
  130. package/dist/esm/components/ShopName/index.js +78 -0
  131. package/dist/esm/components/SystemOrderNo/index.d.ts +28 -0
  132. package/dist/esm/components/SystemOrderNo/index.js +81 -0
  133. package/dist/esm/components/TemplateSelect/index.d.ts +28 -0
  134. package/dist/esm/components/TemplateSelect/index.js +79 -0
  135. package/dist/esm/components/TextArea/index.d.ts +26 -0
  136. package/dist/esm/components/TextArea/index.js +78 -0
  137. package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +4 -0
  138. package/dist/esm/components/ThirdItemSelect/ItemEncode.js +31 -0
  139. package/dist/esm/components/ThirdItemSelect/index.d.ts +27 -0
  140. package/dist/esm/components/ThirdItemSelect/index.js +120 -0
  141. package/dist/esm/components/TradeDateTime/index.d.ts +27 -0
  142. package/dist/esm/components/TradeDateTime/index.js +92 -0
  143. package/dist/esm/components/TradeId/index.d.ts +28 -0
  144. package/dist/esm/components/TradeId/index.js +89 -0
  145. package/dist/esm/components/WorkOrderId/img/repeat.png +0 -0
  146. package/dist/esm/components/WorkOrderId/index.d.ts +28 -0
  147. package/dist/esm/components/WorkOrderId/index.js +98 -0
  148. package/dist/esm/index.d.ts +40 -0
  149. package/dist/esm/index.js +40 -0
  150. package/dist/esm/type.d.ts +174 -0
  151. package/dist/esm/type.js +1 -0
  152. package/package.json +39 -0
@@ -0,0 +1,96 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from 'react';
9
+ import ItemView from "../../commonComponents/ItemView";
10
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
+ var PaymentStatus = /*#__PURE__*/_createClass(function PaymentStatus(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, PaymentStatus);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "type", void 0);
17
+ _defineProperty(this, "rules", void 0);
18
+ _defineProperty(this, "canFilter", void 0);
19
+ _defineProperty(this, "canGroup", void 0);
20
+ _defineProperty(this, "canHidden", void 0);
21
+ _defineProperty(this, "dataType", void 0);
22
+ _defineProperty(this, "showContains", void 0);
23
+ _defineProperty(this, "componentConfig", void 0);
24
+ _defineProperty(this, "align", void 0);
25
+ _defineProperty(this, "width", void 0);
26
+ _defineProperty(this, "paymentStatus", void 0);
27
+ _defineProperty(this, "render", function (value) {
28
+ return /*#__PURE__*/React.createElement("span", null, value);
29
+ });
30
+ _defineProperty(this, "renderClient", function (record) {
31
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
32
+ id: _this.id,
33
+ label: _this.name,
34
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
35
+ }) : null;
36
+ });
37
+ _defineProperty(this, "renderPc", function (value, record) {
38
+ return value !== null && value !== void 0 ? value : '--';
39
+ });
40
+ _defineProperty(this, "renderExport", function (value) {
41
+ return value !== null && value !== void 0 ? value : '--';
42
+ });
43
+ _defineProperty(this, "editRender", function (value) {
44
+ return null;
45
+ });
46
+ _defineProperty(this, "getColumns", function () {
47
+ return {
48
+ title: _this.name,
49
+ align: _this.align,
50
+ dataIndex: _this.id,
51
+ dataType: _this.dataType,
52
+ canHidden: _this.canHidden,
53
+ canFilter: _this.canFilter,
54
+ canGroup: _this.canGroup,
55
+ width: _this.width,
56
+ type: _this.type,
57
+ render: _this.renderPc,
58
+ componentType: _this.editRender,
59
+ showContains: _this.showContains,
60
+ renderExport: _this.renderExport,
61
+ widget: 'selectMultiple',
62
+ 'x-options': Object.keys(_this.paymentStatus).map(function (item) {
63
+ return {
64
+ label: _this.paymentStatus[item],
65
+ value: _this.paymentStatus[item]
66
+ };
67
+ }),
68
+ 'x-style': {
69
+ width: '356px'
70
+ },
71
+ 'x-placeholder': '请选择内容'
72
+ };
73
+ });
74
+ this.name = '打款状态';
75
+ this.id = "".concat(options.id, "_enterprisePaymentStatus");
76
+ this.type = options.type;
77
+ this.canFilter = true;
78
+ this.canGroup = true;
79
+ this.canHidden = false;
80
+ this.showContains = false;
81
+ this.dataType = 'string';
82
+ this.componentConfig = options.componentConfig;
83
+ this.rules = [];
84
+ this.align = 'left';
85
+ this.width = 200;
86
+ this.paymentStatus = {
87
+ WAITING_EXAMINE: '未打款',
88
+ EXAMINED: '审核通过',
89
+ FLAG_PAID: '标记已打款',
90
+ ALI_PAY_WAITING: '支付宝待付款',
91
+ ALI_PAY_SUCCESS: '支付宝打款成功',
92
+ ALI_PAY_FAIL: '支付宝打款失败',
93
+ ALI_PAY_CLOSE: '支付宝打款关闭'
94
+ };
95
+ });
96
+ export default PaymentStatus;
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ import { ComponentInterface, PickOption, DataType, ALignType } from '../../type';
3
+ declare class PaymentTid 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
+ align: ALignType;
15
+ width: number;
16
+ constructor(options: PickOption);
17
+ render: (value: string) => JSX.Element;
18
+ renderClient: (record: any) => JSX.Element | null;
19
+ renderPc: (value: any, record: any) => JSX.Element;
20
+ renderExport: (value: string) => string;
21
+ editRender: () => JSX.Element;
22
+ getColumns: () => {
23
+ title: string;
24
+ align: ALignType;
25
+ dataIndex: string;
26
+ dataType: DataType;
27
+ canHidden: boolean;
28
+ canFilter: boolean;
29
+ canGroup: boolean;
30
+ width: number;
31
+ type: string;
32
+ render: (value: any, record: any) => JSX.Element;
33
+ componentType: () => JSX.Element;
34
+ showContains: boolean;
35
+ renderExport: (value: string) => string;
36
+ };
37
+ }
38
+ export default PaymentTid;
@@ -0,0 +1,84 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from 'react';
9
+ import { ApaasInput } from '@kmkf-fe-packages/basic-components';
10
+ import GetFormItem from "../GetFormItem";
11
+ import ItemView from "../../commonComponents/ItemView";
12
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
13
+ var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
14
+ var _this = this;
15
+ _classCallCheck(this, PaymentTid);
16
+ _defineProperty(this, "name", void 0);
17
+ _defineProperty(this, "id", void 0);
18
+ _defineProperty(this, "type", void 0);
19
+ _defineProperty(this, "rules", void 0);
20
+ _defineProperty(this, "canFilter", void 0);
21
+ _defineProperty(this, "canGroup", void 0);
22
+ _defineProperty(this, "canHidden", void 0);
23
+ _defineProperty(this, "dataType", void 0);
24
+ _defineProperty(this, "showContains", void 0);
25
+ _defineProperty(this, "componentConfig", void 0);
26
+ _defineProperty(this, "align", void 0);
27
+ _defineProperty(this, "width", void 0);
28
+ _defineProperty(this, "render", function (value) {
29
+ return /*#__PURE__*/React.createElement("span", null, value);
30
+ });
31
+ _defineProperty(this, "renderClient", function (record) {
32
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
33
+ id: _this.id,
34
+ label: _this.name,
35
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
36
+ }) : null;
37
+ });
38
+ _defineProperty(this, "renderPc", function (value, record) {
39
+ return /*#__PURE__*/React.createElement("span", null, value !== null && value !== void 0 ? value : '--');
40
+ });
41
+ _defineProperty(this, "renderExport", function (value) {
42
+ return value !== null && value !== void 0 ? value : '--';
43
+ });
44
+ _defineProperty(this, "editRender", function () {
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(ApaasInput, _this.componentConfig)
52
+ });
53
+ });
54
+ _defineProperty(this, "getColumns", function () {
55
+ return {
56
+ title: _this.name,
57
+ align: _this.align,
58
+ dataIndex: _this.id,
59
+ dataType: _this.dataType,
60
+ canHidden: _this.canHidden,
61
+ canFilter: _this.canFilter,
62
+ canGroup: _this.canGroup,
63
+ width: _this.width,
64
+ type: _this.type,
65
+ render: _this.renderPc,
66
+ componentType: _this.editRender,
67
+ showContains: _this.showContains,
68
+ renderExport: _this.renderExport
69
+ };
70
+ });
71
+ this.name = '订单编号';
72
+ this.id = "".concat(options.id, "_enterprisePaymentTid");
73
+ this.type = options.type;
74
+ this.canFilter = true;
75
+ this.canGroup = true;
76
+ this.canHidden = false;
77
+ this.showContains = false;
78
+ this.dataType = 'string';
79
+ this.componentConfig = options.componentConfig;
80
+ this.rules = [];
81
+ this.align = 'left';
82
+ this.width = 200;
83
+ });
84
+ export default PaymentTid;
@@ -0,0 +1,120 @@
1
+ /// <reference types="react" />
2
+ import { ComponentInterface, PickOption, DataType } from '../../type';
3
+ import AlipayNick from './AlipayNick';
4
+ import AlipayNo from './AlipayNo';
5
+ import AlipayTime from './AlipayTime';
6
+ import BuyerNick from './BuyerNick';
7
+ import PaymentAmount from './PaymentAmount';
8
+ import PaymentStatus from './PaymentStatus';
9
+ import PaymentTid from './PaymentTid';
10
+ declare class Logistics implements ComponentInterface {
11
+ name: string;
12
+ id: string;
13
+ type: string;
14
+ rules: any[];
15
+ canFilter: boolean;
16
+ canGroup: boolean;
17
+ canHidden: boolean;
18
+ dataType: DataType;
19
+ showContains: boolean;
20
+ componentConfig: ComponentInterface["componentConfig"];
21
+ paymentTid: PaymentTid;
22
+ paymentStatus: PaymentStatus;
23
+ paymentAmount: PaymentAmount;
24
+ buyerNick: BuyerNick;
25
+ alipayNick: AlipayNick;
26
+ alipayNo: AlipayNo;
27
+ payTime: AlipayTime;
28
+ constructor(options: PickOption);
29
+ render: () => null;
30
+ renderClient: (record: any) => JSX.Element;
31
+ renderPc: () => null;
32
+ renderExport: () => null;
33
+ editRender: (value: any) => JSX.Element;
34
+ getColumns: () => {
35
+ title: string;
36
+ children: ({
37
+ title: string;
38
+ align: import("../../type").ALignType;
39
+ dataIndex: string;
40
+ dataType: DataType;
41
+ canHidden: boolean;
42
+ canFilter: boolean;
43
+ canGroup: boolean;
44
+ width: number;
45
+ type: string;
46
+ render: (value: any, record: any) => any;
47
+ componentType: (value: any) => null;
48
+ showContains: boolean;
49
+ renderExport: (value: any) => any;
50
+ widget: string;
51
+ 'x-options': {
52
+ label: string;
53
+ value: string;
54
+ }[];
55
+ 'x-style': {
56
+ width: string;
57
+ };
58
+ 'x-placeholder': string;
59
+ } | {
60
+ title: string;
61
+ align: import("../../type").ALignType;
62
+ dataIndex: string;
63
+ width: number;
64
+ dataType: DataType;
65
+ canHidden: boolean;
66
+ canFilter: boolean;
67
+ canGroup: boolean;
68
+ type: string;
69
+ render: (value: any, record: import("../../type").Record) => JSX.Element;
70
+ componentType: () => JSX.Element;
71
+ showContains: boolean;
72
+ renderExport: (value: string) => string;
73
+ } | {
74
+ title: string;
75
+ align: import("../../type").ALignType;
76
+ dataIndex: string;
77
+ dataType: DataType;
78
+ canHidden: boolean;
79
+ canFilter: boolean;
80
+ canGroup: boolean;
81
+ type: string;
82
+ width: number;
83
+ render: (value: any, record: import("../../type").Record) => JSX.Element;
84
+ componentType: () => JSX.Element;
85
+ showContains: boolean;
86
+ renderExport: (value: any, record: import("../../type").Record) => any;
87
+ } | {
88
+ title: string;
89
+ align: import("../../type").ALignType;
90
+ dataIndex: string;
91
+ width: number;
92
+ dataType: DataType;
93
+ canHidden: boolean;
94
+ canFilter: boolean;
95
+ canGroup: boolean;
96
+ type: string;
97
+ render: (value: any, record: any) => JSX.Element;
98
+ componentType: () => JSX.Element;
99
+ showContains: boolean;
100
+ } | {
101
+ title: string;
102
+ align: import("../../type").ALignType;
103
+ dataIndex: string;
104
+ width: number;
105
+ dataType: DataType;
106
+ canHidden: boolean;
107
+ canFilter: boolean;
108
+ canGroup: boolean;
109
+ type: string;
110
+ render: (value: any, record: import("../../type").Record) => JSX.Element;
111
+ componentType: () => JSX.Element;
112
+ showContains: boolean;
113
+ renderExport: (value: string) => string | null;
114
+ widget: null;
115
+ })[];
116
+ canHidden: boolean;
117
+ dataIndex: string;
118
+ };
119
+ }
120
+ export default Logistics;
@@ -0,0 +1,118 @@
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 _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); }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ 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; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ import React from 'react';
10
+ import { Payment as ApaasPayment } from '@kmkf-fe-packages/basic-components';
11
+ import GetFormItem from "../GetFormItem";
12
+ import AlipayNick from "./AlipayNick";
13
+ import AlipayNo from "./AlipayNo";
14
+ import AlipayTime from "./AlipayTime";
15
+ import BuyerNick from "./BuyerNick";
16
+ import PaymentAmount from "./PaymentAmount";
17
+ import PaymentStatus from "./PaymentStatus";
18
+ import PaymentTid from "./PaymentTid";
19
+ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
20
+ var _this = this;
21
+ _classCallCheck(this, Logistics);
22
+ _defineProperty(this, "name", void 0);
23
+ _defineProperty(this, "id", void 0);
24
+ _defineProperty(this, "type", void 0);
25
+ _defineProperty(this, "rules", void 0);
26
+ _defineProperty(this, "canFilter", void 0);
27
+ _defineProperty(this, "canGroup", void 0);
28
+ _defineProperty(this, "canHidden", void 0);
29
+ _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "showContains", void 0);
31
+ _defineProperty(this, "componentConfig", void 0);
32
+ _defineProperty(this, "paymentTid", void 0);
33
+ _defineProperty(this, "paymentStatus", void 0);
34
+ _defineProperty(this, "paymentAmount", void 0);
35
+ _defineProperty(this, "buyerNick", void 0);
36
+ _defineProperty(this, "alipayNick", void 0);
37
+ _defineProperty(this, "alipayNo", void 0);
38
+ _defineProperty(this, "payTime", void 0);
39
+ _defineProperty(this, "render", function () {
40
+ return null;
41
+ });
42
+ _defineProperty(this, "renderClient", function (record) {
43
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.alipayNick.renderClient(record), _this.paymentAmount.renderClient(record), _this.alipayNo.renderClient(record), _this.buyerNick.renderClient(record), _this.paymentTid.renderClient(record), _this.paymentStatus.renderClient(record), _this.payTime.renderClient(record));
44
+ });
45
+ _defineProperty(this, "renderPc", function () {
46
+ return null;
47
+ });
48
+ _defineProperty(this, "renderExport", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "editRender", function (value) {
52
+ var _this$componentConfig, _this$componentConfig2;
53
+ return /*#__PURE__*/React.createElement(GetFormItem, {
54
+ title: _this.name,
55
+ name: _this.id,
56
+ rules: _this.rules,
57
+ 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,
58
+ component: /*#__PURE__*/React.createElement(ApaasPayment, _extends({}, _this.componentConfig, {
59
+ onBlur: value === null || value === void 0 ? void 0 : value.onBlur
60
+ }))
61
+ });
62
+ });
63
+ _defineProperty(this, "getColumns", function () {
64
+ return {
65
+ title: _this.name,
66
+ children: [_this.paymentTid.getColumns(), _this.paymentStatus.getColumns(), _this.paymentAmount.getColumns(), _this.buyerNick.getColumns(), _this.alipayNick.getColumns(), _this.alipayNo.getColumns(), _this.payTime.getColumns()],
67
+ canHidden: _this.canHidden,
68
+ dataIndex: _this.id
69
+ };
70
+ });
71
+ this.name = options.name;
72
+ this.id = options.id;
73
+ this.type = options.type;
74
+ this.canFilter = false;
75
+ this.canGroup = false;
76
+ this.canHidden = true;
77
+ this.showContains = false;
78
+ this.dataType = 'string';
79
+ this.componentConfig = options.componentConfig;
80
+ this.paymentTid = new PaymentTid(options);
81
+ this.paymentStatus = new PaymentStatus(options);
82
+ this.paymentAmount = new PaymentAmount(options);
83
+ this.buyerNick = new BuyerNick(options);
84
+ this.alipayNick = new AlipayNick(options);
85
+ this.alipayNo = new AlipayNo(options);
86
+ this.payTime = new AlipayTime(options);
87
+ this.rules = [{
88
+ validator: function validator(_, value) {
89
+ var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6;
90
+ if ((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
91
+ return Promise.reject(new Error('请输入打款金额'));
92
+ } else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
93
+ return Promise.reject(new Error('打款金额最多2位小数'));
94
+ }
95
+ if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
96
+ return Promise.reject(new Error('请输入订单编号'));
97
+ } else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
98
+ return Promise.reject(new Error('请输入正确的订单编号'));
99
+ }
100
+ if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
101
+ return Promise.reject(new Error('请输入支付宝名称'));
102
+ }
103
+ if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
104
+ return Promise.reject(new Error('请输入支付宝账号'));
105
+ } else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
106
+ return Promise.reject(new Error('请输入正确的支付宝账号格式'));
107
+ }
108
+ //支付宝信息不能只填一个,否则不能打款
109
+ if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
110
+ if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
111
+ return Promise.reject(new Error('支付宝姓名/账号都要填写'));
112
+ }
113
+ }
114
+ return Promise.resolve();
115
+ }
116
+ }];
117
+ });
118
+ export default Logistics;
@@ -0,0 +1,31 @@
1
+ /// <reference types="react" />
2
+ import { ComponentInterface, PickOption, DataType, Record } from '../../type';
3
+ declare type Value = string[] | undefined;
4
+ declare class BasicPicture implements ComponentInterface {
5
+ name: string;
6
+ id: string;
7
+ type: string;
8
+ rules: any[];
9
+ canFilter: boolean;
10
+ canGroup: boolean;
11
+ canHidden: boolean;
12
+ dataType: DataType;
13
+ showContains: boolean;
14
+ componentConfig: ComponentInterface["componentConfig"];
15
+ constructor(options: PickOption);
16
+ formatPictures: (pictures: string) => string[];
17
+ render: (value: Value) => JSX.Element | null;
18
+ renderPc: (value: any, record: Record) => JSX.Element | JSX.Element[];
19
+ renderClient: (record: any) => JSX.Element | null;
20
+ editRender: (value: any) => JSX.Element;
21
+ /**
22
+ *
23
+ * @returns 图片类型的导出需要在导出时单独处理
24
+ */
25
+ renderExport: () => null;
26
+ getColumns: () => this & {
27
+ dataIndex: string;
28
+ title: string;
29
+ };
30
+ }
31
+ export default BasicPicture;
@@ -0,0 +1,118 @@
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 { Image } from 'antd';
13
+ import { ApaasUploadAsync, ApaasUpload } from '@kmkf-fe-packages/basic-components';
14
+ import { imgResize } from '@kmkf-fe-packages/kmkf-utils';
15
+ import GetFormItem from "../GetFormItem";
16
+ import ItemView from "../../commonComponents/ItemView";
17
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
18
+ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
19
+ var _this = this;
20
+ _classCallCheck(this, BasicPicture);
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, "formatPictures", function (pictures) {
32
+ pictures = pictures.replace(/[\[\]]/g, '');
33
+ pictures = pictures.replace(/\s/g, '');
34
+ return pictures ? pictures.split(',') : [];
35
+ });
36
+ _defineProperty(this, "render", function (value) {
37
+ if (!(value !== null && value !== void 0 && value.length)) {
38
+ return null;
39
+ }
40
+ return /*#__PURE__*/React.createElement("div", null, value === null || value === void 0 ? void 0 : value.map(function (pic) {
41
+ return /*#__PURE__*/React.createElement("div", {
42
+ style: {
43
+ marginRight: '5px',
44
+ display: 'inline-block'
45
+ }
46
+ }, /*#__PURE__*/React.createElement(Image, {
47
+ width: 32,
48
+ src: imgResize(pic || ''),
49
+ preview: {
50
+ src: imgResize(pic || '', 0, 0)
51
+ }
52
+ }));
53
+ }));
54
+ });
55
+ _defineProperty(this, "renderPc", function (value, record) {
56
+ if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]) === undefined) {
57
+ return /*#__PURE__*/React.createElement("span", null, "--");
58
+ }
59
+ var finalPictures = _this.formatPictures(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]).map(function (item) {
60
+ return "".concat(window.location.origin, "/").concat(item);
61
+ });
62
+ return finalPictures === null || finalPictures === void 0 ? void 0 : finalPictures.map(function (pic) {
63
+ return /*#__PURE__*/React.createElement("div", {
64
+ style: {
65
+ marginRight: '5px',
66
+ display: 'inline-block'
67
+ }
68
+ }, /*#__PURE__*/React.createElement(Image, {
69
+ width: 32,
70
+ src: "".concat(pic, "?x-oss-process=image/resize,m_pad,h_40,w_40"),
71
+ preview: {
72
+ src: pic
73
+ }
74
+ }));
75
+ });
76
+ });
77
+ _defineProperty(this, "renderClient", function (record) {
78
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
79
+ id: _this.id,
80
+ label: _this.name,
81
+ value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
82
+ }) : null;
83
+ });
84
+ _defineProperty(this, "editRender", function (value) {
85
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
86
+ return /*#__PURE__*/React.createElement(GetFormItem, {
87
+ title: _this.name,
88
+ name: _this.id,
89
+ rules: _this.rules,
90
+ 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,
91
+ component: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
92
+ uniqueKey: _this.id,
93
+ hostUrl: "https://kefu.kuaimai.com"
94
+ }))
95
+ });
96
+ });
97
+ _defineProperty(this, "renderExport", function () {
98
+ return null;
99
+ });
100
+ _defineProperty(this, "getColumns", function () {
101
+ return _objectSpread(_objectSpread({}, _this), {}, {
102
+ dataIndex: _this.id,
103
+ title: _this.name
104
+ });
105
+ ;
106
+ });
107
+ this.name = options.name;
108
+ this.id = options.id;
109
+ this.type = options.type;
110
+ this.canFilter = false;
111
+ this.canGroup = false;
112
+ this.canHidden = true;
113
+ this.dataType = 'array';
114
+ this.showContains = false;
115
+ this.componentConfig = options.componentConfig;
116
+ this.rules = [];
117
+ });
118
+ export default BasicPicture;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Popover: ({ Overlay, ShowComponent }: any) => JSX.Element;
3
+ export default Popover;