@kmkf-fe-packages/services-components 1.17.7 → 1.17.8-beta.0
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/components/EItemEnCode/index.d.ts +7 -0
- package/dist/esm/components/EItemEnCode/index.js +23 -1
- package/dist/esm/components/JST/JstSendGood/index.d.ts +3 -0
- package/dist/esm/components/JST/JstSendGood/index.js +9 -1
- package/dist/esm/components/MsgStatus/index.js +13 -9
- package/dist/esm/components/ThirdItemSelect/index.d.ts +7 -0
- package/dist/esm/components/ThirdItemSelect/index.js +30 -9
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -17,7 +17,14 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
17
17
|
dataType: ComponentInterface["dataType"];
|
|
18
18
|
showHeader: string[];
|
|
19
19
|
platform?: ComponentInterface["platform"];
|
|
20
|
+
sortChildField: {
|
|
21
|
+
name: string;
|
|
22
|
+
key: string;
|
|
23
|
+
dataType: string;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}[];
|
|
20
26
|
constructor(options: PickOption);
|
|
27
|
+
getSortChildFields: () => any;
|
|
21
28
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
29
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
23
30
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -36,6 +36,27 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
36
36
|
_defineProperty(this, "dataType", void 0);
|
|
37
37
|
_defineProperty(this, "showHeader", void 0);
|
|
38
38
|
_defineProperty(this, "platform", void 0);
|
|
39
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
40
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
41
|
+
var _this$showHeader, _this$showHeader$filt;
|
|
42
|
+
var mapping = {
|
|
43
|
+
title: '商品名称',
|
|
44
|
+
outerId: '商品编码',
|
|
45
|
+
numIid: '商品id',
|
|
46
|
+
skuId: 'skuId',
|
|
47
|
+
outerSkuId: 'sku编码',
|
|
48
|
+
propertiesName: 'sku信息'
|
|
49
|
+
};
|
|
50
|
+
return (_this$showHeader = _this.showHeader) === null || _this$showHeader === void 0 ? void 0 : (_this$showHeader$filt = _this$showHeader.filter(function (item) {
|
|
51
|
+
return !!mapping[item];
|
|
52
|
+
})) === null || _this$showHeader$filt === void 0 ? void 0 : _this$showHeader$filt.map(function (item) {
|
|
53
|
+
return {
|
|
54
|
+
name: mapping[item],
|
|
55
|
+
key: "".concat(_this.id, "_").concat(item),
|
|
56
|
+
dataType: "string"
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
});
|
|
39
60
|
_defineProperty(this, "renderClient", function (record) {
|
|
40
61
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
41
62
|
return /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -153,6 +174,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
153
174
|
return Promise.resolve();
|
|
154
175
|
}
|
|
155
176
|
}] : [];
|
|
156
|
-
this.dataType = "
|
|
177
|
+
this.dataType = "array";
|
|
178
|
+
this.sortChildField = this.getSortChildFields();
|
|
157
179
|
});
|
|
158
180
|
export default EItemEncode;
|
|
@@ -202,6 +202,14 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
202
202
|
}
|
|
203
203
|
}];
|
|
204
204
|
});
|
|
205
|
+
_defineProperty(this, "formDataTransform", function (v) {
|
|
206
|
+
var _v$map;
|
|
207
|
+
return v === null || v === void 0 ? void 0 : (_v$map = v.map(function (item) {
|
|
208
|
+
return item.sendName;
|
|
209
|
+
})) === null || _v$map === void 0 ? void 0 : _v$map.filter(function (item) {
|
|
210
|
+
return !isNull(item);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
205
213
|
this.name = _options.name;
|
|
206
214
|
this.id = _options.id;
|
|
207
215
|
this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
|
|
@@ -209,7 +217,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
209
217
|
this.componentConfig = _options.componentConfig;
|
|
210
218
|
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
|
|
211
219
|
this.type = _options.type;
|
|
212
|
-
this.dataType = "
|
|
220
|
+
this.dataType = "array";
|
|
213
221
|
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
214
222
|
required: true,
|
|
215
223
|
validator: function validator(_, value) {
|
|
@@ -19,25 +19,29 @@ import { SYMBOL } from "../../constant";
|
|
|
19
19
|
var typeMap = {
|
|
20
20
|
MSG_STATUS: {
|
|
21
21
|
options: [{
|
|
22
|
-
value: '
|
|
23
|
-
label: '
|
|
22
|
+
value: '执行成功',
|
|
23
|
+
label: '执行成功',
|
|
24
24
|
color: '#52c41a'
|
|
25
25
|
}, {
|
|
26
|
-
value: '
|
|
27
|
-
label: '
|
|
26
|
+
value: '执行中',
|
|
27
|
+
label: '执行中',
|
|
28
28
|
color: '#52c41a'
|
|
29
29
|
}, {
|
|
30
|
-
value: '
|
|
31
|
-
label: '
|
|
30
|
+
value: '执行失败',
|
|
31
|
+
label: '执行失败',
|
|
32
32
|
color: '#ff4d4f'
|
|
33
33
|
}, {
|
|
34
|
-
value: '
|
|
35
|
-
label: '
|
|
34
|
+
value: '等待执行',
|
|
35
|
+
label: '等待执行',
|
|
36
36
|
color: '#e7780f'
|
|
37
|
+
}, {
|
|
38
|
+
value: '不满足条件,无需执行',
|
|
39
|
+
label: '不满足条件,无需执行',
|
|
40
|
+
color: '#8A8A8A'
|
|
37
41
|
}],
|
|
38
42
|
key: 'msgStatusValues',
|
|
39
43
|
code: 'msgStatus4Search',
|
|
40
|
-
name: '
|
|
44
|
+
name: '任务状态',
|
|
41
45
|
type: 1,
|
|
42
46
|
valueKey: 'status',
|
|
43
47
|
idKey: 'systemOrderId',
|
|
@@ -13,7 +13,14 @@ declare class ThirdItemSelect implements ComponentInterface {
|
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface['dataType'];
|
|
16
|
+
sortChildField: {
|
|
17
|
+
name: string;
|
|
18
|
+
key: string;
|
|
19
|
+
dataType: string;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}[];
|
|
16
22
|
constructor(options: PickOption);
|
|
23
|
+
getSortChildFields: () => any;
|
|
17
24
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
18
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
26
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -15,7 +15,7 @@ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options) {
|
|
17
17
|
var _this = this,
|
|
18
|
-
_this$
|
|
18
|
+
_this$componentConfig6;
|
|
19
19
|
_classCallCheck(this, ThirdItemSelect);
|
|
20
20
|
_defineProperty(this, "name", void 0);
|
|
21
21
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,6 +29,26 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
29
29
|
_defineProperty(this, "canSort", void 0);
|
|
30
30
|
_defineProperty(this, "children", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
33
|
+
_defineProperty(this, "getSortChildFields", function () {
|
|
34
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
35
|
+
var list = [];
|
|
36
|
+
if ((_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.enableItemId) {
|
|
37
|
+
list.push({
|
|
38
|
+
name: '供应商编码',
|
|
39
|
+
key: "".concat(_this.id, "_itemId"),
|
|
40
|
+
dataType: "string"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if ((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.enableSupplierName) {
|
|
44
|
+
list.push({
|
|
45
|
+
name: '供应商名称',
|
|
46
|
+
key: "".concat(_this.id, "_supplierName"),
|
|
47
|
+
dataType: "string"
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return list;
|
|
51
|
+
});
|
|
32
52
|
_defineProperty(this, "renderClient", function (record) {
|
|
33
53
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
34
54
|
id: _this.id,
|
|
@@ -68,7 +88,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
68
88
|
});
|
|
69
89
|
});
|
|
70
90
|
_defineProperty(this, "editRender", function (p) {
|
|
71
|
-
var _this$
|
|
91
|
+
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2;
|
|
72
92
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
73
93
|
title: _this.name,
|
|
74
94
|
name: _this.id,
|
|
@@ -76,9 +96,9 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
76
96
|
required: false,
|
|
77
97
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
78
98
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
79
|
-
tooltip: (_this$
|
|
99
|
+
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 : '',
|
|
80
100
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
81
|
-
maxLength: ((_this$
|
|
101
|
+
maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
|
|
82
102
|
type: 4,
|
|
83
103
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
84
104
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
@@ -118,28 +138,29 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
118
138
|
this.isCombinationComponent = false;
|
|
119
139
|
this.canSort = false;
|
|
120
140
|
this.children = [];
|
|
121
|
-
this.dataType = '
|
|
122
|
-
this.rules = (_this$
|
|
141
|
+
this.dataType = 'array';
|
|
142
|
+
this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
|
|
123
143
|
required: true,
|
|
124
144
|
validator: function validator(_, value) {
|
|
125
|
-
var _this$
|
|
145
|
+
var _this$componentConfig7, _this$componentConfig8;
|
|
126
146
|
if (!value || !value.length) {
|
|
127
147
|
return Promise.reject(new Error('请选择宝贝'));
|
|
128
148
|
}
|
|
129
149
|
var hasNotId = (value || []).some(function (item) {
|
|
130
150
|
return !item.itemId && !item.supplierItemOuterId;
|
|
131
151
|
});
|
|
132
|
-
if ((_this$
|
|
152
|
+
if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableItemId && hasNotId) {
|
|
133
153
|
return Promise.reject(new Error('请输入供应商编码'));
|
|
134
154
|
}
|
|
135
155
|
var hasNotName = (value || []).some(function (item) {
|
|
136
156
|
return !item.supplierName;
|
|
137
157
|
});
|
|
138
|
-
if ((_this$
|
|
158
|
+
if ((_this$componentConfig8 = _this.componentConfig) !== null && _this$componentConfig8 !== void 0 && _this$componentConfig8.enableSupplierName && hasNotName) {
|
|
139
159
|
return Promise.reject(new Error('请输入供应商名称'));
|
|
140
160
|
}
|
|
141
161
|
return Promise.resolve();
|
|
142
162
|
}
|
|
143
163
|
}] : [];
|
|
164
|
+
this.sortChildField = this.getSortChildFields();
|
|
144
165
|
});
|
|
145
166
|
export default ThirdItemSelect;
|
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, KmErpSendGood, AfterSalesOrderId } 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) => BasicCascader | StatusSelect | TradeId | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | 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 | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | KmErpSendGood | AfterSalesOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.8-beta.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "1.17.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.17.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.17.8-beta.0",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.17.8-beta.0",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "9ea02095293fdcb64d6537a00710cced14554c31",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|