@kmkf-fe-packages/services-components 0.8.17-alpha.36 → 0.8.17-alpha.38
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.
|
@@ -42,14 +42,15 @@ var Calculation = /*#__PURE__*/_createClass(function Calculation(options) {
|
|
|
42
42
|
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_numericalCalculation")]) !== null && _record2 !== void 0 ? _record2 : "--";
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "renderClient", function (record) {
|
|
45
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
|
|
45
46
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
46
47
|
id: _this.id,
|
|
47
48
|
label: _this.name,
|
|
48
|
-
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
49
|
+
value: "".concat(record === null || record === void 0 ? void 0 : record[_this.id], " ").concat((_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : (_this$componentConfig3 = _this$componentConfig2.config) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.unit) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : '')
|
|
49
50
|
}) : null;
|
|
50
51
|
});
|
|
51
52
|
_defineProperty(this, "editRender", function (p) {
|
|
52
|
-
var _this$
|
|
53
|
+
var _this$componentConfig4, _this$componentConfig5;
|
|
53
54
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
54
55
|
title: _this.name,
|
|
55
56
|
name: _this.id,
|
|
@@ -57,7 +58,7 @@ var Calculation = /*#__PURE__*/_createClass(function Calculation(options) {
|
|
|
57
58
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
58
59
|
required: false,
|
|
59
60
|
style: {
|
|
60
|
-
display: (_this$
|
|
61
|
+
display: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && (_this$componentConfig5 = _this$componentConfig4.config) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.display ? 'unset' : 'none'
|
|
61
62
|
} // TODO: 样式隐藏
|
|
62
63
|
,
|
|
63
64
|
component: /*#__PURE__*/React.createElement(CalculationInput, _extends({}, _this.componentConfig, {
|
|
@@ -63,7 +63,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
63
63
|
}) : null;
|
|
64
64
|
});
|
|
65
65
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
66
|
-
var _typeMap$_this$type2, _typeMap$_this$type3;
|
|
66
|
+
var _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
|
|
67
67
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
|
|
68
68
|
//兼容多个商品
|
|
69
69
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -72,29 +72,30 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
72
72
|
}
|
|
73
73
|
}, /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
74
74
|
list: list,
|
|
75
|
-
type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type
|
|
75
|
+
type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type,
|
|
76
|
+
valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey
|
|
76
77
|
}));
|
|
77
78
|
});
|
|
78
79
|
_defineProperty(this, "renderLog", function (r) {
|
|
79
|
-
var _typeMap$_this$
|
|
80
|
-
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
80
|
+
var _typeMap$_this$type5;
|
|
81
|
+
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
|
|
81
82
|
if (isNull(list)) return null;
|
|
82
83
|
return _this.renderPc(undefined, r);
|
|
83
84
|
});
|
|
84
85
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
85
|
-
var _typeMap$_this$
|
|
86
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
86
|
+
var _typeMap$_this$type6;
|
|
87
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
|
|
87
88
|
});
|
|
88
89
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
89
|
-
var _typeMap$_this$
|
|
90
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
90
|
+
var _typeMap$_this$type7;
|
|
91
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
|
|
91
92
|
return (list || []).map(function (item) {
|
|
92
|
-
var _typeMap$_this$
|
|
93
|
-
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
93
|
+
var _typeMap$_this$type8;
|
|
94
|
+
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.valueKey];
|
|
94
95
|
}).join(",");
|
|
95
96
|
});
|
|
96
97
|
_defineProperty(this, "editRender", function (p) {
|
|
97
|
-
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$
|
|
98
|
+
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type9;
|
|
98
99
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
99
100
|
title: _this.name,
|
|
100
101
|
name: _this.id,
|
|
@@ -102,22 +103,22 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
102
103
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
103
104
|
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,
|
|
104
105
|
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
105
|
-
type: (_typeMap$_this$
|
|
106
|
+
type: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.type
|
|
106
107
|
}))
|
|
107
108
|
});
|
|
108
109
|
});
|
|
109
110
|
_defineProperty(this, "filterConfig", function (item) {
|
|
110
|
-
var _typeMap$_this$
|
|
111
|
+
var _typeMap$_this$type10;
|
|
111
112
|
return [{
|
|
112
113
|
searchDefaultConditions: SYMBOL.like,
|
|
113
114
|
type: item.type,
|
|
114
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
115
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
|
|
115
116
|
name: "".concat(_this.name),
|
|
116
117
|
filterComponentType: "Input",
|
|
117
118
|
filterFn: function filterFn(value) {
|
|
118
119
|
return function (i) {
|
|
119
|
-
var _typeMap$_this$
|
|
120
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
120
|
+
var _typeMap$_this$type11;
|
|
121
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code), value);
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
124
|
}];
|
|
@@ -136,12 +137,12 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
136
137
|
required: true,
|
|
137
138
|
validator: function validator(_, value) {
|
|
138
139
|
var hasNo = (value || []).some(function (item) {
|
|
139
|
-
var _typeMap$_this$
|
|
140
|
-
return item[(_typeMap$_this$
|
|
140
|
+
var _typeMap$_this$type12;
|
|
141
|
+
return item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey];
|
|
141
142
|
});
|
|
142
143
|
if (!hasNo) {
|
|
143
|
-
var _typeMap$_this$
|
|
144
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
144
|
+
var _typeMap$_this$type13;
|
|
145
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.name)));
|
|
145
146
|
}
|
|
146
147
|
return Promise.resolve();
|
|
147
148
|
}
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration } 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) => ActualPayment | BsExchange | BsGoods | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | CommonMultiStatus | CommonSystemOrder | CommonTradeId | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowStatusSelect | FlowWorkOrderId | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | LogisticsTrajectory | NodeDeadLine | NodeStayDuration | Payment | BasicPicture | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | BasicSelect | ShopInput | StatusSelect | BasicTextArea | ThirdItemSelect | BasicDataTime | TradeDateTime | TradeId | WorkOrderId | BasicAddress | BasicCheckbox | BasicMultSelect | BasicGrade | CommonDataTime | ShopName | Logistics | ReturnLogistics | ERemark | AliPay | SystemOrderNo | Ordinary | TemplateSelect | LogisticsInterception | PlatForm | Submitter | Handler | CompletedUser;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.17-alpha.
|
|
3
|
+
"version": "0.8.17-alpha.38",
|
|
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.8.17-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.17-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.17-alpha.38",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.17-alpha.38"
|
|
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": "10fac44deb5d0f9ff70156291c2cc71d6bff4807"
|
|
44
44
|
}
|