@kmkf-fe-packages/services-components 1.22.1-beta.30 → 1.22.1-beta.32
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class CommonMultiStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
isSingleValue: boolean;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -8,104 +8,108 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
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
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
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
|
|
12
|
-
import some from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import some from "lodash/some";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import { CommonOrderContent } from "../Common";
|
|
15
|
-
import { CommonMultiStatus as Status } from
|
|
15
|
+
import { CommonMultiStatus as Status } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull, filterFn as _filterFn } from
|
|
17
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SYMBOL } from "../../constant";
|
|
19
19
|
var typeMap = {
|
|
20
20
|
RETURN_GOODS_STATUS: {
|
|
21
21
|
options: [{
|
|
22
|
-
value:
|
|
23
|
-
label:
|
|
24
|
-
color:
|
|
22
|
+
value: "成功",
|
|
23
|
+
label: "成功",
|
|
24
|
+
color: "#52c41a"
|
|
25
25
|
}, {
|
|
26
|
-
value:
|
|
27
|
-
label:
|
|
28
|
-
color:
|
|
26
|
+
value: "失败",
|
|
27
|
+
label: "失败",
|
|
28
|
+
color: "#ff4d4f"
|
|
29
29
|
}],
|
|
30
|
-
key:
|
|
31
|
-
code:
|
|
32
|
-
name:
|
|
30
|
+
key: "returnGoodsStatusList",
|
|
31
|
+
code: "returnGoodsStatusValue",
|
|
32
|
+
name: "退货状态",
|
|
33
33
|
type: 1,
|
|
34
|
-
valueKey:
|
|
35
|
-
idKey:
|
|
36
|
-
failValue:
|
|
34
|
+
valueKey: "status",
|
|
35
|
+
idKey: "systemOrderId",
|
|
36
|
+
failValue: "失败"
|
|
37
37
|
},
|
|
38
38
|
EXCHANGE_STATUS: {
|
|
39
39
|
options: [{
|
|
40
|
-
value:
|
|
41
|
-
label:
|
|
42
|
-
color:
|
|
40
|
+
value: "成功",
|
|
41
|
+
label: "成功",
|
|
42
|
+
color: "#52c41a"
|
|
43
43
|
}, {
|
|
44
|
-
value:
|
|
45
|
-
label:
|
|
46
|
-
color:
|
|
44
|
+
value: "失败",
|
|
45
|
+
label: "失败",
|
|
46
|
+
color: "#ff4d4f"
|
|
47
47
|
}],
|
|
48
|
-
key:
|
|
49
|
-
code:
|
|
50
|
-
name:
|
|
48
|
+
key: "exchangeReason",
|
|
49
|
+
code: "exchangeStatusValue",
|
|
50
|
+
name: "换货状态",
|
|
51
51
|
type: 1,
|
|
52
|
-
valueKey:
|
|
53
|
-
idKey:
|
|
54
|
-
failValue:
|
|
52
|
+
valueKey: "status",
|
|
53
|
+
idKey: "systemOrderId",
|
|
54
|
+
failValue: "失败"
|
|
55
55
|
},
|
|
56
56
|
WAREHOUSING_STATUS: {
|
|
57
57
|
options: [{
|
|
58
|
-
value:
|
|
59
|
-
label:
|
|
60
|
-
color:
|
|
58
|
+
value: "2",
|
|
59
|
+
label: "已入库",
|
|
60
|
+
color: "#52c41a"
|
|
61
61
|
}, {
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
64
|
-
color:
|
|
62
|
+
value: "1",
|
|
63
|
+
label: "部分入库",
|
|
64
|
+
color: "#e7780f"
|
|
65
65
|
}, {
|
|
66
|
-
value:
|
|
67
|
-
label:
|
|
68
|
-
color:
|
|
66
|
+
value: "0",
|
|
67
|
+
label: "未入库",
|
|
68
|
+
color: "#ff4d4f"
|
|
69
69
|
}],
|
|
70
|
-
key:
|
|
71
|
-
code:
|
|
72
|
-
name:
|
|
70
|
+
key: "inStockStatusItemList",
|
|
71
|
+
code: "inStockStatusList",
|
|
72
|
+
name: "商品入库状态(勿填)",
|
|
73
73
|
type: 2,
|
|
74
|
-
valueKey:
|
|
75
|
-
idKey:
|
|
76
|
-
failValue:
|
|
74
|
+
valueKey: "status",
|
|
75
|
+
idKey: "systemOrderId",
|
|
76
|
+
failValue: "失败",
|
|
77
|
+
dataType: "array_object"
|
|
77
78
|
},
|
|
78
79
|
BS_E3_WAREHOUSING_STATUS: {
|
|
79
80
|
options: [{
|
|
80
|
-
value:
|
|
81
|
-
label:
|
|
82
|
-
color:
|
|
81
|
+
value: "2",
|
|
82
|
+
label: "已入库",
|
|
83
|
+
color: "#52c41a"
|
|
83
84
|
}, {
|
|
84
|
-
value:
|
|
85
|
-
label:
|
|
86
|
-
color:
|
|
85
|
+
value: "1",
|
|
86
|
+
label: "部分入库",
|
|
87
|
+
color: "#e7780f"
|
|
87
88
|
}, {
|
|
88
|
-
value:
|
|
89
|
-
label:
|
|
90
|
-
color:
|
|
89
|
+
value: "0",
|
|
90
|
+
label: "未入库",
|
|
91
|
+
color: "#ff4d4f"
|
|
91
92
|
}, {
|
|
92
|
-
value:
|
|
93
|
-
label:
|
|
94
|
-
color:
|
|
93
|
+
value: "3",
|
|
94
|
+
label: "已退回给客户",
|
|
95
|
+
color: "#1B5BF3"
|
|
95
96
|
}],
|
|
96
|
-
key:
|
|
97
|
-
code:
|
|
98
|
-
name:
|
|
97
|
+
key: "bsE3InStockStatusItemList",
|
|
98
|
+
code: "bsE3InStockStatusList",
|
|
99
|
+
name: "商品入库状态",
|
|
99
100
|
type: 2,
|
|
100
|
-
valueKey:
|
|
101
|
-
idKey:
|
|
102
|
-
failValue:
|
|
101
|
+
valueKey: "status",
|
|
102
|
+
idKey: "systemOrderId",
|
|
103
|
+
failValue: "失败",
|
|
104
|
+
dataType: "array_object"
|
|
103
105
|
}
|
|
104
106
|
};
|
|
105
107
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
106
108
|
var _this = this,
|
|
107
109
|
_typeMap$options$type,
|
|
108
110
|
_typeMap$options$type2,
|
|
111
|
+
_typeMap$options$type3,
|
|
112
|
+
_typeMap$options$type4,
|
|
109
113
|
_this$componentConfig5,
|
|
110
114
|
_this$componentConfig6;
|
|
111
115
|
_classCallCheck(this, CommonMultiStatus);
|
|
@@ -176,10 +180,10 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
176
180
|
});
|
|
177
181
|
if (_this.isSingleValue) {
|
|
178
182
|
var _typeMap$_this$type15;
|
|
179
|
-
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
183
|
+
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "";
|
|
180
184
|
}
|
|
181
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
182
|
-
}).join(
|
|
185
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || "");
|
|
186
|
+
}).join(",");
|
|
183
187
|
});
|
|
184
188
|
_defineProperty(this, "editRender", function (p) {
|
|
185
189
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
|
|
@@ -190,7 +194,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
190
194
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
191
195
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
192
196
|
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,
|
|
193
|
-
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 :
|
|
197
|
+
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 : "",
|
|
194
198
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
195
199
|
type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
|
|
196
200
|
failValue: typeMap[_this.type].failValue
|
|
@@ -200,16 +204,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
200
204
|
_defineProperty(this, "filterConfig", function (item) {
|
|
201
205
|
var _typeMap$_this$type19, _item$templateConfig;
|
|
202
206
|
return {
|
|
203
|
-
searchDefaultConditions: [
|
|
207
|
+
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
204
208
|
type: item.type,
|
|
205
209
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
|
|
206
210
|
name: "".concat(_this.name),
|
|
207
|
-
filterComponentType: [
|
|
211
|
+
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
208
212
|
props: {
|
|
209
213
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
210
214
|
fieldNames: {
|
|
211
|
-
label:
|
|
212
|
-
value:
|
|
215
|
+
label: "label",
|
|
216
|
+
value: "value"
|
|
213
217
|
}
|
|
214
218
|
},
|
|
215
219
|
filterFn: function filterFn(value) {
|
|
@@ -218,8 +222,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
218
222
|
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.code), value);
|
|
219
223
|
};
|
|
220
224
|
},
|
|
221
|
-
formatFilterValue: [
|
|
222
|
-
if (value.type ===
|
|
225
|
+
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
226
|
+
if (value.type === "keywords") {
|
|
223
227
|
return value.keywords;
|
|
224
228
|
} else {
|
|
225
229
|
return value;
|
|
@@ -238,7 +242,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
238
242
|
this.isCombinationComponent = false;
|
|
239
243
|
this.canSort = false;
|
|
240
244
|
this.children = [];
|
|
241
|
-
this.dataType =
|
|
245
|
+
this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : "object";
|
|
242
246
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
243
247
|
required: true,
|
|
244
248
|
validator: function validator(_, value) {
|
|
@@ -253,7 +257,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
253
257
|
return Promise.resolve();
|
|
254
258
|
}
|
|
255
259
|
}] : [];
|
|
256
|
-
this.align =
|
|
257
|
-
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type ===
|
|
260
|
+
this.align = "left";
|
|
261
|
+
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS";
|
|
258
262
|
});
|
|
259
263
|
export default CommonMultiStatus;
|
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, 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) => 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 | JstLogistics | JstItemSelect | JstSupply |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsGoods | BsSystemOrder | BsE3Goods | BsE3Reissue | CommonMultiStatus | 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 | JstLogistics | JstItemSelect | JstSupply | 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/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.32",
|
|
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": "af7503e65c74d8151e8cb22b5afe2400cb1f976b",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|