@kmkf-fe-packages/services-components 1.22.1-beta.20 → 1.22.1-beta.22
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.
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class MemberLevel implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
formField: string;
|
|
12
|
+
canSort: boolean;
|
|
13
|
+
children: ComponentInterface[];
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
options: ComponentInterface["options"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
getComponentValue: (r: Record) => any;
|
|
18
|
+
editRender: (p: any) => React.JSX.Element;
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: (value: any, record: Record) => string;
|
|
21
|
+
renderLog: (r: Record) => string;
|
|
22
|
+
renderExport: (value: any, record: Record) => string;
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
searchDefaultConditions: "in";
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
filterComponentType: "MultipleSelect";
|
|
29
|
+
props: {
|
|
30
|
+
options: any;
|
|
31
|
+
};
|
|
32
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export default MemberLevel;
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
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); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Select } from "antd";
|
|
11
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
+
import intersection from "lodash/intersection";
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
import { SYMBOL } from "../../constant";
|
|
16
|
+
var EditRenderItem = function EditRenderItem(props) {
|
|
17
|
+
var value = props.value;
|
|
18
|
+
return /*#__PURE__*/React.createElement(Select, _extends({}, props, {
|
|
19
|
+
value: value,
|
|
20
|
+
mode: "multiple"
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
var MemberLevel = /*#__PURE__*/_createClass(function MemberLevel(options) {
|
|
24
|
+
var _this = this;
|
|
25
|
+
_classCallCheck(this, MemberLevel);
|
|
26
|
+
_defineProperty(this, "name", void 0);
|
|
27
|
+
_defineProperty(this, "id", void 0);
|
|
28
|
+
_defineProperty(this, "sortField", void 0);
|
|
29
|
+
_defineProperty(this, "type", void 0);
|
|
30
|
+
_defineProperty(this, "rules", void 0);
|
|
31
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
32
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
33
|
+
_defineProperty(this, "formField", void 0);
|
|
34
|
+
_defineProperty(this, "canSort", void 0);
|
|
35
|
+
_defineProperty(this, "children", void 0);
|
|
36
|
+
_defineProperty(this, "dataType", void 0);
|
|
37
|
+
_defineProperty(this, "options", void 0);
|
|
38
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
39
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_memberLevel")];
|
|
40
|
+
});
|
|
41
|
+
_defineProperty(this, "editRender", function (p) {
|
|
42
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
43
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
44
|
+
title: _this.name,
|
|
45
|
+
name: _this.id,
|
|
46
|
+
rules: _this.rules,
|
|
47
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
48
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
49
|
+
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,
|
|
50
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
51
|
+
component: /*#__PURE__*/React.createElement(EditRenderItem, _extends({}, _this.componentConfig, {
|
|
52
|
+
placeholder: "\u8BF7\u9009\u62E9\u4F1A\u5458\u7B49\u7EA7",
|
|
53
|
+
showSearch: true,
|
|
54
|
+
onChange: p === null || p === void 0 ? void 0 : p.onChange,
|
|
55
|
+
options: _this.options,
|
|
56
|
+
optionFilterProp: "label"
|
|
57
|
+
}))
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
61
|
+
var _Array$from;
|
|
62
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
63
|
+
id: _this.id,
|
|
64
|
+
label: _this.name,
|
|
65
|
+
value: (_Array$from = Array.from(new Set(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_memberLevel")]))) === null || _Array$from === void 0 ? void 0 : _Array$from.join("、")
|
|
66
|
+
}) : null;
|
|
67
|
+
});
|
|
68
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
69
|
+
var _Array$from2;
|
|
70
|
+
return (_Array$from2 = Array.from(new Set(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_memberLevel")]))) === null || _Array$from2 === void 0 ? void 0 : _Array$from2.join("、");
|
|
71
|
+
});
|
|
72
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
73
|
+
return _this.renderPc(undefined, r);
|
|
74
|
+
});
|
|
75
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
76
|
+
var _Array$from3;
|
|
77
|
+
return (_Array$from3 = Array.from(new Set(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_memberLevel")]))) === null || _Array$from3 === void 0 ? void 0 : _Array$from3.join("、");
|
|
78
|
+
});
|
|
79
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
80
|
+
return {
|
|
81
|
+
searchDefaultConditions: SYMBOL.in,
|
|
82
|
+
type: item.type,
|
|
83
|
+
id: "".concat(item.id, "_memberLevel"),
|
|
84
|
+
// 过滤组件id
|
|
85
|
+
name: item.name,
|
|
86
|
+
// 过滤组件名称
|
|
87
|
+
filterComponentType: "MultipleSelect",
|
|
88
|
+
props: {
|
|
89
|
+
options: _this.options || []
|
|
90
|
+
},
|
|
91
|
+
filterFn: function filterFn(value) {
|
|
92
|
+
return function (i) {
|
|
93
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "memberLevel")).length > 0;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
this.name = options.name;
|
|
99
|
+
this.id = options.id;
|
|
100
|
+
this.sortField = options.id;
|
|
101
|
+
this.formField = "".concat(options.id, "_memberLevel");
|
|
102
|
+
this.type = options.type;
|
|
103
|
+
this.componentConfig = options.componentConfig;
|
|
104
|
+
this.rules = [];
|
|
105
|
+
this.isCombinationComponent = false;
|
|
106
|
+
this.canSort = false;
|
|
107
|
+
this.children = [];
|
|
108
|
+
this.dataType = "array";
|
|
109
|
+
this.options = ["赏花官", "鉴花官", "伴花官", "护花官", "种花官", "店铺客户(非会员)"].map(function (item) {
|
|
110
|
+
return {
|
|
111
|
+
value: item,
|
|
112
|
+
label: item
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// formDataTransform = (v: Array<{ labelShowName: string }>) => {
|
|
118
|
+
// return v
|
|
119
|
+
// }
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
export default MemberLevel;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BsGoods |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsGoods | CommonMultiStatus | JstLogistics | JstSendGood | MemberLevel | MsgStatus | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsE3Goods | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue } from "./index";
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -230,6 +230,8 @@ export var factory = function factory(type, options) {
|
|
|
230
230
|
case "AFTER_SALES_ORDER_ID":
|
|
231
231
|
// 售后单ID
|
|
232
232
|
return new AfterSalesOrderId(options);
|
|
233
|
+
case "MEMBER_LEVEL":
|
|
234
|
+
return new MemberLevel(options);
|
|
233
235
|
default:
|
|
234
236
|
return new BasicInput(options);
|
|
235
237
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export { default as WdtExchange } from "./components/WDT/WdtExchange";
|
|
|
83
83
|
export { default as CommonInput } from "./components/CommonInput";
|
|
84
84
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
85
85
|
export { default as Label } from "./components/Label";
|
|
86
|
+
export { default as MemberLevel } from "./components/MemberLevel";
|
|
86
87
|
export { default as KmErpSendGood } from "./components/KmErpSendGood";
|
|
87
88
|
export { default as AfterSalesOrderId } from "./components/AfterSalesOrderId";
|
|
88
89
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
package/dist/esm/index.js
CHANGED
|
@@ -83,6 +83,7 @@ export { default as WdtExchange } from "./components/WDT/WdtExchange";
|
|
|
83
83
|
export { default as CommonInput } from "./components/CommonInput";
|
|
84
84
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
85
85
|
export { default as Label } from "./components/Label";
|
|
86
|
+
export { default as MemberLevel } from "./components/MemberLevel";
|
|
86
87
|
export { default as KmErpSendGood } from "./components/KmErpSendGood";
|
|
87
88
|
export { default as AfterSalesOrderId } from "./components/AfterSalesOrderId";
|
|
88
89
|
// TODO: ERP 打款工单使用
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.22.1-beta.
|
|
3
|
+
"version": "1.22.1-beta.22",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "2ed714c99d7dddefc0efb8d2d2d4578302dd5e8f",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|