@kmkf-fe-packages/services-components 0.6.3-alpha.39 → 0.6.3-alpha.44
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/README.md
CHANGED
|
@@ -54,22 +54,22 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
54
54
|
_defineProperty(this, "filterConfig", function (item) {
|
|
55
55
|
return {
|
|
56
56
|
type: item.type,
|
|
57
|
-
id: "".concat(item.id, "
|
|
58
|
-
name: "".concat(item.name, "-\
|
|
59
|
-
filterComponentType:
|
|
57
|
+
id: "".concat(item.id, "_interceptLogisticsStatus"),
|
|
58
|
+
name: "".concat(item.name, "-\u7269\u6D41\u72B6\u6001"),
|
|
59
|
+
filterComponentType: "MultipleSelect",
|
|
60
60
|
options: _this.expressInterceptInstance.getStatusOptions() || [],
|
|
61
61
|
filterFn: function filterFn(value) {
|
|
62
62
|
return function (i) {
|
|
63
63
|
var _value$map, _value$map$flat;
|
|
64
64
|
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
|
|
65
|
-
return v === null || v === void 0 ? void 0 : v.split(
|
|
66
|
-
})) === null || _value$map === void 0 ? void 0 : (_value$map$flat = _value$map.flat()) === null || _value$map$flat === void 0 ? void 0 : _value$map$flat.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
65
|
+
return v === null || v === void 0 ? void 0 : v.split(",");
|
|
66
|
+
})) === null || _value$map === void 0 ? void 0 : (_value$map$flat = _value$map.flat()) === null || _value$map$flat === void 0 ? void 0 : _value$map$flat.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptLogisticsStatus"));
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
|
-
this.name = "
|
|
72
|
-
this.id = "".concat(options.id, "
|
|
71
|
+
this.name = "物流状态";
|
|
72
|
+
this.id = "".concat(options.id, "_interceptLogisticsStatus");
|
|
73
73
|
this.companyId = "".concat(options.id, "_interceptCompany");
|
|
74
74
|
this.type = options.type;
|
|
75
75
|
this.componentConfig = options.componentConfig;
|
|
@@ -14,13 +14,13 @@ declare class Logistics implements ComponentInterface {
|
|
|
14
14
|
componentConfig: ComponentInterface["componentConfig"];
|
|
15
15
|
interceptAddress: InterceptAddress;
|
|
16
16
|
interceptType: InterceptType;
|
|
17
|
-
|
|
17
|
+
interceptLogisticsStatus: InterceptStatus;
|
|
18
18
|
isCombinationComponent: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
express: Express;
|
|
21
21
|
expressCode: ExpressCode;
|
|
22
22
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
23
|
-
expressInterceptData: ExpressInterceptData
|
|
23
|
+
expressInterceptData: InstanceType<typeof ExpressInterceptData>;
|
|
24
24
|
effects: ComponentInterface["effects"];
|
|
25
25
|
constructor(options: PickOption);
|
|
26
26
|
renderClient: (record: any) => React.JSX.Element;
|
|
@@ -29,7 +29,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
29
29
|
interceptCompany: any;
|
|
30
30
|
interceptCode: any;
|
|
31
31
|
interceptType: any;
|
|
32
|
-
|
|
32
|
+
interceptLogisticsStatus: any;
|
|
33
33
|
interceptRedirectTo: {
|
|
34
34
|
province: any;
|
|
35
35
|
city: any;
|
|
@@ -27,7 +27,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
27
27
|
_defineProperty(this, "componentConfig", void 0);
|
|
28
28
|
_defineProperty(this, "interceptAddress", void 0);
|
|
29
29
|
_defineProperty(this, "interceptType", void 0);
|
|
30
|
-
_defineProperty(this, "
|
|
30
|
+
_defineProperty(this, "interceptLogisticsStatus", void 0);
|
|
31
31
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
32
32
|
_defineProperty(this, "children", void 0);
|
|
33
33
|
_defineProperty(this, "express", void 0);
|
|
@@ -36,17 +36,17 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
36
36
|
_defineProperty(this, "expressInterceptData", void 0);
|
|
37
37
|
_defineProperty(this, "effects", void 0);
|
|
38
38
|
_defineProperty(this, "renderClient", function (record) {
|
|
39
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.
|
|
39
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record));
|
|
40
40
|
});
|
|
41
41
|
_defineProperty(this, "renderLog", function (record) {
|
|
42
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptAddress.name, ": ", _this.interceptAddress.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.
|
|
42
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptAddress.name, ": ", _this.interceptAddress.renderLog(record)), /*#__PURE__*/React.createElement("div", null, _this.interceptLogisticsStatus.name, ": ", _this.interceptLogisticsStatus.renderLog(record)));
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
45
45
|
return {
|
|
46
46
|
interceptCompany: _this.express.getComponentValue(r),
|
|
47
47
|
interceptCode: _this.expressCode.getComponentValue(r),
|
|
48
48
|
interceptType: _this.interceptType.getComponentValue(r),
|
|
49
|
-
|
|
49
|
+
interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
|
|
50
50
|
interceptRedirectTo: _this.interceptAddress.getComponentValue(r)
|
|
51
51
|
};
|
|
52
52
|
});
|
|
@@ -57,7 +57,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
57
57
|
return null;
|
|
58
58
|
});
|
|
59
59
|
_defineProperty(this, "editRender", function () {
|
|
60
|
-
var _this$componentConfig, _this$componentConfig2, _this$effects
|
|
60
|
+
var _this$componentConfig, _this$componentConfig2, _this$effects;
|
|
61
61
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
62
62
|
title: _this.name,
|
|
63
63
|
name: _this.id,
|
|
@@ -66,17 +66,16 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
66
66
|
component: /*#__PURE__*/React.createElement(LogisticsInterception, _extends({}, _this.componentConfig, {
|
|
67
67
|
logisticsOptions: _this.expressDateInstance.getExpressData(),
|
|
68
68
|
expressInterceptData: _this.expressInterceptData.getExpressData(),
|
|
69
|
-
isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
|
|
70
|
-
logisticsInterceptHandleStatus: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : (_this$effects2$workOr = _this$effects2.workOrderDetail) === null || _this$effects2$workOr === void 0 ? void 0 : _this$effects2$workOr.logisticsInterceptHandleStatus) || ""
|
|
69
|
+
isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
|
|
71
70
|
}))
|
|
72
71
|
});
|
|
73
72
|
});
|
|
74
73
|
_defineProperty(this, "filterConfig", function (item) {
|
|
75
74
|
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
76
|
-
subKey:
|
|
75
|
+
subKey: "interceptCompany"
|
|
77
76
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
78
|
-
subKey:
|
|
79
|
-
})), _this.
|
|
77
|
+
subKey: "interceptCode"
|
|
78
|
+
})), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item)];
|
|
80
79
|
});
|
|
81
80
|
this.name = options.name;
|
|
82
81
|
this.id = options.id;
|
|
@@ -87,7 +86,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
87
86
|
this.expressInterceptData = ExpressInterceptData.getInstance();
|
|
88
87
|
this.interceptAddress = new InterceptAddress(options);
|
|
89
88
|
this.interceptType = new InterceptType(options);
|
|
90
|
-
this.
|
|
89
|
+
this.interceptLogisticsStatus = new InterceptStatus(options);
|
|
91
90
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
92
91
|
id: "".concat(options.id, "_interceptCompany"),
|
|
93
92
|
name: "物流信息"
|
|
@@ -97,7 +96,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
97
96
|
name: "物流单号"
|
|
98
97
|
}));
|
|
99
98
|
this.isCombinationComponent = true;
|
|
100
|
-
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.
|
|
99
|
+
this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus];
|
|
101
100
|
this.rules = [{
|
|
102
101
|
validator: function validator(_, value) {
|
|
103
102
|
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre;
|
|
@@ -107,7 +106,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
107
106
|
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.interceptType)) {
|
|
108
107
|
return Promise.reject(new Error("请选择拦截类型"));
|
|
109
108
|
}
|
|
110
|
-
var showAddress = _this.expressInterceptData.getShowNewAddressMap()["".concat(value === null || value === void 0 ? void 0 : value.
|
|
109
|
+
var showAddress = _this.expressInterceptData.getShowNewAddressMap()["".concat(value === null || value === void 0 ? void 0 : value.interceptType)];
|
|
111
110
|
if (showAddress && (!(value !== null && value !== void 0 && (_value$interceptAddre = value.interceptAddress) !== null && _value$interceptAddre !== void 0 && _value$interceptAddre.length) || !(value !== null && value !== void 0 && value.interceptDetail) || !(value !== null && value !== void 0 && value.interceptReceiverName) || !(value !== null && value !== void 0 && value.interceptReceiverMobile))) {
|
|
112
111
|
return Promise.reject(new Error("请填写新派送地"));
|
|
113
112
|
}
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FormInstance } from
|
|
3
|
-
export declare type DataType =
|
|
4
|
-
export declare type ALignType =
|
|
2
|
+
import type { FormInstance } from "antd";
|
|
3
|
+
export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
|
|
4
|
+
export declare type ALignType = "left" | "right" | "center";
|
|
5
5
|
export declare type Record = {
|
|
6
6
|
[props in string]: any;
|
|
7
7
|
};
|
|
@@ -13,7 +13,7 @@ export declare type FilterConfigType = {
|
|
|
13
13
|
filterComponentType: FilterComponentType;
|
|
14
14
|
filterFn?: (p: any) => (r: Record) => unknown;
|
|
15
15
|
};
|
|
16
|
-
export declare type FilterComponentType =
|
|
16
|
+
export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList";
|
|
17
17
|
export interface ComponentInterface {
|
|
18
18
|
id: string;
|
|
19
19
|
name: string;
|
|
@@ -26,7 +26,7 @@ export interface ComponentInterface {
|
|
|
26
26
|
/**
|
|
27
27
|
* @description 组件下标
|
|
28
28
|
* @deprecated 已弃用字段,后续版本不在使用
|
|
29
|
-
|
|
29
|
+
*/
|
|
30
30
|
formItemIndex?: number;
|
|
31
31
|
componentConfig?: {
|
|
32
32
|
/**
|
|
@@ -44,7 +44,7 @@ export interface ComponentInterface {
|
|
|
44
44
|
/**
|
|
45
45
|
* @description 显示字段名称
|
|
46
46
|
*/
|
|
47
|
-
showField?:
|
|
47
|
+
showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "all";
|
|
48
48
|
/**
|
|
49
49
|
* @description 是否选择SKU
|
|
50
50
|
*/
|
|
@@ -64,7 +64,7 @@ export interface ComponentInterface {
|
|
|
64
64
|
/**
|
|
65
65
|
* @description 备注状态
|
|
66
66
|
*/
|
|
67
|
-
associatedType?:
|
|
67
|
+
associatedType?: "APPEND";
|
|
68
68
|
isAssociated?: boolean;
|
|
69
69
|
isShowFlag?: boolean;
|
|
70
70
|
/**
|
|
@@ -97,7 +97,7 @@ export interface ComponentInterface {
|
|
|
97
97
|
* @description 时间初始值
|
|
98
98
|
*/
|
|
99
99
|
dateTime?: string;
|
|
100
|
-
dateType?:
|
|
100
|
+
dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
|
|
101
101
|
maxSize?: number;
|
|
102
102
|
basicGrade?: number;
|
|
103
103
|
range?: number;
|
|
@@ -131,9 +131,6 @@ export interface ComponentInterface {
|
|
|
131
131
|
label: string;
|
|
132
132
|
value: string;
|
|
133
133
|
}[];
|
|
134
|
-
workOrderDetail?: {
|
|
135
|
-
logisticsInterceptHandleStatus: string;
|
|
136
|
-
};
|
|
137
134
|
};
|
|
138
135
|
/**
|
|
139
136
|
* 日志渲染
|
|
@@ -174,12 +171,12 @@ export interface ComponentInterface {
|
|
|
174
171
|
filterConfig: (p: ColumnConfig) => FilterConfigType | FilterConfigType[];
|
|
175
172
|
getComponentValue: (r: Record) => any;
|
|
176
173
|
}
|
|
177
|
-
export declare type PickOption = Pick<ComponentInterface,
|
|
174
|
+
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects">;
|
|
178
175
|
export declare type ColumnConfig = {
|
|
179
176
|
id: string;
|
|
180
177
|
name: string;
|
|
181
178
|
type: string;
|
|
182
179
|
subKey?: string;
|
|
183
|
-
mode?:
|
|
184
|
-
config?: ComponentInterface[
|
|
180
|
+
mode?: "multiple";
|
|
181
|
+
config?: ComponentInterface["componentConfig"];
|
|
185
182
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.6.3-alpha.
|
|
3
|
+
"version": "0.6.3-alpha.44",
|
|
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.6.3-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.6.3-alpha.44",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.44"
|
|
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": "cbdb203dd7951559af410da4c7a1d2339bd45878"
|
|
44
44
|
}
|