@kmkf-fe-packages/services-components 1.17.8-beta.2 → 1.17.8
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 +0 -7
- package/dist/esm/components/EItemEnCode/index.js +1 -23
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/index.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +1 -1
- package/dist/esm/components/ThirdItemSelect/index.d.ts +0 -7
- package/dist/esm/components/ThirdItemSelect/index.js +9 -30
- package/package.json +4 -4
|
@@ -17,14 +17,7 @@ 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
|
-
}[];
|
|
26
20
|
constructor(options: PickOption);
|
|
27
|
-
getSortChildFields: () => any;
|
|
28
21
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
29
22
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
30
23
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -36,27 +36,6 @@ 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
|
-
});
|
|
60
39
|
_defineProperty(this, "renderClient", function (record) {
|
|
61
40
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
62
41
|
return /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -174,7 +153,6 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
174
153
|
return Promise.resolve();
|
|
175
154
|
}
|
|
176
155
|
}] : [];
|
|
177
|
-
this.dataType = "
|
|
178
|
-
this.sortChildField = this.getSortChildFields();
|
|
156
|
+
this.dataType = "object";
|
|
179
157
|
});
|
|
180
158
|
export default EItemEncode;
|
|
@@ -34,7 +34,7 @@ var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
|
34
34
|
var addressText = (_item$interceptAddres = item.interceptAddress) === null || _item$interceptAddres === void 0 ? void 0 : _item$interceptAddres.map(function (suffix) {
|
|
35
35
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
36
36
|
}).join('');
|
|
37
|
-
return
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), addressText || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, addressText, item.interceptDetail, item.interceptReceiverName, item.interceptReceiverMobile) : "--");
|
|
38
38
|
}));
|
|
39
39
|
});
|
|
40
40
|
_defineProperty(this, "renderClient", function () {
|
|
@@ -67,7 +67,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
67
67
|
}).join("");
|
|
68
68
|
return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", item.interceptCompany ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u516C\u53F8\uFF1A", _this.expressDateInstance.getExpressNameByCode(item.interceptCompany) || item.interceptCompany) : null, item.interceptCode ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u5355\u53F7\uFF1A", /*#__PURE__*/React.createElement(CopyText, {
|
|
69
69
|
text: item.interceptCode
|
|
70
|
-
})) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName,
|
|
70
|
+
})) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName, item.interceptReceiverMobile) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
|
|
71
71
|
modelWidth: 500,
|
|
72
72
|
interceptCompany: item.interceptCompany,
|
|
73
73
|
interceptCode: item.interceptCode,
|
|
@@ -28,7 +28,7 @@ var InterceptSnapshot = /*#__PURE__*/_createClass(function InterceptSnapshot(opt
|
|
|
28
28
|
_defineProperty(this, "renderSnapshot", function (record) {
|
|
29
29
|
var snapshotList = record[_this.id] || [];
|
|
30
30
|
return /*#__PURE__*/React.createElement(React.Fragment, null, snapshotList.map(function (item, index) {
|
|
31
|
-
return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), item);
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), item ? item : "--");
|
|
32
32
|
}));
|
|
33
33
|
});
|
|
34
34
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
@@ -13,14 +13,7 @@ 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
|
-
}[];
|
|
22
16
|
constructor(options: PickOption);
|
|
23
|
-
getSortChildFields: () => any;
|
|
24
17
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
25
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
26
19
|
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$componentConfig4;
|
|
19
19
|
_classCallCheck(this, ThirdItemSelect);
|
|
20
20
|
_defineProperty(this, "name", void 0);
|
|
21
21
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,26 +29,6 @@ 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
|
-
});
|
|
52
32
|
_defineProperty(this, "renderClient", function (record) {
|
|
53
33
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
54
34
|
id: _this.id,
|
|
@@ -88,7 +68,7 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
88
68
|
});
|
|
89
69
|
});
|
|
90
70
|
_defineProperty(this, "editRender", function (p) {
|
|
91
|
-
var _this$
|
|
71
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$effects, _this$effects2;
|
|
92
72
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
93
73
|
title: _this.name,
|
|
94
74
|
name: _this.id,
|
|
@@ -96,9 +76,9 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
96
76
|
required: false,
|
|
97
77
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
98
78
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
99
|
-
tooltip: (_this$
|
|
79
|
+
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : '',
|
|
100
80
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
101
|
-
maxLength: ((_this$
|
|
81
|
+
maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
|
|
102
82
|
type: 4,
|
|
103
83
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
104
84
|
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
@@ -138,29 +118,28 @@ var ThirdItemSelect = /*#__PURE__*/_createClass(function ThirdItemSelect(options
|
|
|
138
118
|
this.isCombinationComponent = false;
|
|
139
119
|
this.canSort = false;
|
|
140
120
|
this.children = [];
|
|
141
|
-
this.dataType = '
|
|
142
|
-
this.rules = (_this$
|
|
121
|
+
this.dataType = 'object';
|
|
122
|
+
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
143
123
|
required: true,
|
|
144
124
|
validator: function validator(_, value) {
|
|
145
|
-
var _this$
|
|
125
|
+
var _this$componentConfig5, _this$componentConfig6;
|
|
146
126
|
if (!value || !value.length) {
|
|
147
127
|
return Promise.reject(new Error('请选择宝贝'));
|
|
148
128
|
}
|
|
149
129
|
var hasNotId = (value || []).some(function (item) {
|
|
150
130
|
return !item.itemId && !item.supplierItemOuterId;
|
|
151
131
|
});
|
|
152
|
-
if ((_this$
|
|
132
|
+
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.enableItemId && hasNotId) {
|
|
153
133
|
return Promise.reject(new Error('请输入供应商编码'));
|
|
154
134
|
}
|
|
155
135
|
var hasNotName = (value || []).some(function (item) {
|
|
156
136
|
return !item.supplierName;
|
|
157
137
|
});
|
|
158
|
-
if ((_this$
|
|
138
|
+
if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.enableSupplierName && hasNotName) {
|
|
159
139
|
return Promise.reject(new Error('请输入供应商名称'));
|
|
160
140
|
}
|
|
161
141
|
return Promise.resolve();
|
|
162
142
|
}
|
|
163
143
|
}] : [];
|
|
164
|
-
this.sortChildField = this.getSortChildFields();
|
|
165
144
|
});
|
|
166
145
|
export default ThirdItemSelect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.17.8
|
|
3
|
+
"version": "1.17.8",
|
|
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.8
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.17.8
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.17.8",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.17.8",
|
|
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": "012abad5304ff59390a953bda58278e1ebc25b0d",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|