@kmkf-fe-packages/services-components 0.11.1 → 0.12.0-alpha.1
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/OperationLog/index.js +2 -1
- package/dist/esm/components/BS/BsExchange/index.d.ts +1 -1
- package/dist/esm/components/BS/BsExchange/index.js +15 -5
- package/dist/esm/components/BS/BsReissue/index.js +1 -1
- package/dist/esm/components/Input/index.js +19 -19
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +7 -5
- package/package.json +4 -4
|
@@ -8,7 +8,7 @@ import React from "react";
|
|
|
8
8
|
import { factory } from "@kmkf-fe-packages/services-components";
|
|
9
9
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
10
|
export var unTransField = function unTransField(key) {
|
|
11
|
-
return ["itemList", "jstItemList", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture"].reduce(function (cur, nxt) {
|
|
11
|
+
return ["itemList", "jstItemList", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture", "file", "bsSendGood", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsSystemShowOrder", "bsSystemSelectIds", "reissueLogisticsList", "deliveryNoList", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "bsExchangeReason"].reduce(function (cur, nxt) {
|
|
12
12
|
return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
|
|
13
13
|
}, false);
|
|
14
14
|
};
|
|
@@ -92,6 +92,7 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
92
92
|
}, /*#__PURE__*/React.createElement("span", {
|
|
93
93
|
style: {
|
|
94
94
|
maxWidth: "66px",
|
|
95
|
+
minWidth: "50px",
|
|
95
96
|
marginRight: "8px",
|
|
96
97
|
flexShrink: 1
|
|
97
98
|
}
|
|
@@ -22,7 +22,7 @@ declare class BsExchange implements ComponentInterface {
|
|
|
22
22
|
constructor(options: PickOption);
|
|
23
23
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
24
24
|
renderPc: () => null;
|
|
25
|
-
renderLog: (r: Record) =>
|
|
25
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
26
26
|
getComponentValue: (r: Record) => any;
|
|
27
27
|
renderExport: (value: any, record: any) => null;
|
|
28
28
|
editRender: (p: any) => React.JSX.Element;
|
|
@@ -67,7 +67,17 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
67
67
|
return null;
|
|
68
68
|
});
|
|
69
69
|
_defineProperty(this, "renderLog", function (r) {
|
|
70
|
-
|
|
70
|
+
var _this$componentConfig4, _this$componentConfig5, _r, _this$componentConfig6;
|
|
71
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u9000\u56DE\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
72
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsExchangeReturnGoods")]) || [],
|
|
73
|
+
showHeader: ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showHeader) || []
|
|
74
|
+
})), /*#__PURE__*/React.createElement("div", null, "\u6362\u51FA\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
75
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsExchangeSwapOutGoods")]) || [],
|
|
76
|
+
showHeader: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showHeader) || []
|
|
77
|
+
})), r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_bsExchangeGiftGoods")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement("div", null, "\u8D60\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
78
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsExchangeGiftGoods")]) || [],
|
|
79
|
+
showHeader: ((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showHeader) || []
|
|
80
|
+
})) : null);
|
|
71
81
|
});
|
|
72
82
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
73
83
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
@@ -76,7 +86,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
76
86
|
return null;
|
|
77
87
|
});
|
|
78
88
|
_defineProperty(this, "editRender", function (p) {
|
|
79
|
-
var _this$
|
|
89
|
+
var _this$componentConfig7, _this$effects, _this$effects2, _this$effects3;
|
|
80
90
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
81
91
|
title: _this.name,
|
|
82
92
|
name: _this.id,
|
|
@@ -84,7 +94,7 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
84
94
|
required: false,
|
|
85
95
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
86
96
|
component: /*#__PURE__*/React.createElement(Exchange, _extends({}, _this.componentConfig, {
|
|
87
|
-
maxLength: ((_this$
|
|
97
|
+
maxLength: ((_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.maxLength) || 20,
|
|
88
98
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
89
99
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
90
100
|
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
@@ -165,8 +175,8 @@ var BsExchange = /*#__PURE__*/_createClass(function BsExchange(options) {
|
|
|
165
175
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
166
176
|
this.rules = [{
|
|
167
177
|
validator: function validator(_, value) {
|
|
168
|
-
var _this$
|
|
169
|
-
if ((_this$
|
|
178
|
+
var _this$componentConfig8, _value$bsExchangeRetu;
|
|
179
|
+
if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.required && !(value !== null && value !== void 0 && (_value$bsExchangeRetu = value.bsExchangeReturnGoods) !== null && _value$bsExchangeRetu !== void 0 && _value$bsExchangeRetu.length)) {
|
|
170
180
|
return Promise.reject(new Error("请选择bs换货商品"));
|
|
171
181
|
}
|
|
172
182
|
return Promise.resolve();
|
|
@@ -51,7 +51,7 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
|
|
|
51
51
|
});
|
|
52
52
|
_defineProperty(this, "renderLog", function (r) {
|
|
53
53
|
var _this$componentConfig2;
|
|
54
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
54
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
55
55
|
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")]) || [],
|
|
56
56
|
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
57
57
|
})));
|
|
@@ -86,7 +86,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
86
86
|
this.componentConfig = options.componentConfig;
|
|
87
87
|
this.rules = [{
|
|
88
88
|
validator: function validator(_, value) {
|
|
89
|
-
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
|
|
89
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
|
|
90
90
|
if (!value) {
|
|
91
91
|
return Promise.resolve();
|
|
92
92
|
}
|
|
@@ -103,24 +103,24 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
103
103
|
if (testList.length && !isTest) {
|
|
104
104
|
return Promise.reject(new Error("请填写正确的格式"));
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
106
|
+
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && (_this$componentConfig7 = _this$componentConfig6.rulesOptions) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.length) {
|
|
107
|
+
var _this$componentConfig8;
|
|
108
|
+
var rulesList = (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.rulesOptions.filter(function (item) {
|
|
109
|
+
var _this$componentConfig9;
|
|
110
|
+
return (((_this$componentConfig9 = _this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : _this$componentConfig9.selectRules) || []).includes(item.id);
|
|
111
|
+
});
|
|
112
|
+
var hasRule = rulesList.some(function (item) {
|
|
113
|
+
var reg = new RegExp(item.value);
|
|
114
|
+
return reg.test(value);
|
|
115
|
+
});
|
|
116
|
+
if (rulesList.length && !hasRule) {
|
|
117
|
+
var rulesItem = rulesList.find(function (item) {
|
|
118
|
+
var reg = new RegExp(item.value);
|
|
119
|
+
return !reg.test(value);
|
|
120
|
+
});
|
|
121
|
+
return Promise.reject(new Error(rulesItem === null || rulesItem === void 0 ? void 0 : rulesItem.errorText));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
124
|
return Promise.resolve();
|
|
125
125
|
}
|
|
126
126
|
}];
|
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, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from './index';
|
|
2
2
|
import { PickOption } from './type';
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
|
+
// CommonTradeId,
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
|
|
2
4
|
export var factory = function factory(type, options) {
|
|
3
5
|
var _options$componentCon;
|
|
4
6
|
switch (type) {
|
|
@@ -130,9 +132,9 @@ export var factory = function factory(type, options) {
|
|
|
130
132
|
return new BsReissue(options);
|
|
131
133
|
case 'BS_RETURN_GOODS':
|
|
132
134
|
return new BsReturn(options);
|
|
133
|
-
// case 'REISSUE_TRADE_ID':
|
|
134
135
|
case 'BS_DELIVERY_NO':
|
|
135
136
|
case 'RETURN_GOODS_TRADE_ID':
|
|
137
|
+
case 'REISSUE_TRADE_ID':
|
|
136
138
|
case 'EXCHANGE_TRADE_ID':
|
|
137
139
|
return new CommonSystemOrder(options);
|
|
138
140
|
case 'BS_LOGISTICS':
|
|
@@ -150,9 +152,9 @@ export var factory = function factory(type, options) {
|
|
|
150
152
|
case 'RETURN_GOODS_STATUS':
|
|
151
153
|
case 'EXCHANGE_STATUS':
|
|
152
154
|
return new CommonMultiStatus(options);
|
|
153
|
-
case 'REISSUE_TRADE_ID':
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
// case 'REISSUE_TRADE_ID':
|
|
156
|
+
// case 'EXCHANGE_TRADE_ID':
|
|
157
|
+
// return new CommonTradeId(options)
|
|
156
158
|
case 'NUMERICAL_CALCULATION':
|
|
157
159
|
return new Calculation(options);
|
|
158
160
|
case 'NODE_DEAD_LINE_INPUT':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-alpha.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.12.0-alpha.0",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.12.0-alpha.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "dacb2b0d1a63e567725fefa01677383a21678756"
|
|
44
44
|
}
|