@kmkf-fe-packages/services-components 1.0.6-wzg.5 → 1.0.7
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/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +3 -2
- package/dist/esm/components/Cascader/index.d.ts +1 -0
- package/dist/esm/components/Cascader/index.js +6 -3
- package/dist/esm/components/JST/JstItemSelect/index.d.ts +11 -1
- package/dist/esm/components/JST/JstItemSelect/index.js +16 -6
- package/dist/esm/components/JST/ReissueLogistics/index.d.ts +14 -0
- package/dist/esm/components/JST/ReissueLogistics/index.js +25 -8
- package/dist/esm/components/Label/index.d.ts +58 -0
- package/dist/esm/components/Label/index.js +163 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +3 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +20 -1
- package/package.json +6 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData";
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
|
|
3
3
|
declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
17
|
import { Skeleton, Result, Button } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
|
|
19
19
|
import { servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
20
|
var Global = function Global(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
@@ -39,8 +39,9 @@ var Global = function Global(_ref) {
|
|
|
39
39
|
queryExpressInterceptData: queryExpressInterceptData,
|
|
40
40
|
queryLogisticsAddressData: queryLogisticsAddressData,
|
|
41
41
|
queryPlatData: queryPlatData,
|
|
42
|
-
queryWdtAddressData: servers.queryWdtAddressData,
|
|
43
42
|
queryAllLogisticsCompany: queryAllLogisticsCompany,
|
|
43
|
+
queryLabel: queryLabel,
|
|
44
|
+
queryWdtAddressData: servers.queryWdtAddressData,
|
|
44
45
|
queryWdtLogisticsCompany: queryWdtLogisticsCompany,
|
|
45
46
|
queryWdtSendData: queryWdtSendData
|
|
46
47
|
};
|
|
@@ -13,6 +13,7 @@ declare class BasicCascader implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
dataType: ComponentInterface["dataType"];
|
|
15
15
|
format: ComponentInterface["format"];
|
|
16
|
+
options: ComponentInterface['options'];
|
|
16
17
|
static group: string;
|
|
17
18
|
static configSchema: {
|
|
18
19
|
componentConfig: {
|
|
@@ -15,7 +15,8 @@ import ItemView from "../../commonComponents/ItemView";
|
|
|
15
15
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
17
|
var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
18
|
-
var _this = this
|
|
18
|
+
var _this = this,
|
|
19
|
+
_this$componentConfig7;
|
|
19
20
|
_classCallCheck(this, BasicCascader);
|
|
20
21
|
_defineProperty(this, "name", void 0);
|
|
21
22
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,6 +30,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
29
30
|
_defineProperty(this, "children", void 0);
|
|
30
31
|
_defineProperty(this, "dataType", void 0);
|
|
31
32
|
_defineProperty(this, "format", void 0);
|
|
33
|
+
_defineProperty(this, "options", void 0);
|
|
32
34
|
_defineProperty(this, "getValues", function (value) {
|
|
33
35
|
var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
|
|
34
36
|
return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
|
|
@@ -145,8 +147,9 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
145
147
|
this.children = [];
|
|
146
148
|
this.isCombinationComponent = false;
|
|
147
149
|
this.canSort = true;
|
|
148
|
-
this.dataType =
|
|
149
|
-
this.format =
|
|
150
|
+
this.dataType = 'array';
|
|
151
|
+
this.format = 'cascader';
|
|
152
|
+
this.options = ((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.options) || [];
|
|
150
153
|
}
|
|
151
154
|
|
|
152
155
|
/**
|
|
@@ -18,8 +18,10 @@ declare class JstItemSelect implements ComponentInterface {
|
|
|
18
18
|
static group: string;
|
|
19
19
|
static configSchema: {
|
|
20
20
|
componentConfig: {
|
|
21
|
-
|
|
21
|
+
enableItemId: boolean;
|
|
22
|
+
enableSupplierName: boolean;
|
|
22
23
|
maxLength: number;
|
|
24
|
+
required: boolean;
|
|
23
25
|
};
|
|
24
26
|
name: string;
|
|
25
27
|
uniqueKey: string;
|
|
@@ -28,6 +30,14 @@ declare class JstItemSelect implements ComponentInterface {
|
|
|
28
30
|
title: string;
|
|
29
31
|
type: string;
|
|
30
32
|
};
|
|
33
|
+
enableItemId: {
|
|
34
|
+
title: string;
|
|
35
|
+
type: string;
|
|
36
|
+
};
|
|
37
|
+
enableSupplierName: {
|
|
38
|
+
title: string;
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
31
41
|
};
|
|
32
42
|
};
|
|
33
43
|
static type: string;
|
|
@@ -153,15 +153,25 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
|
|
|
153
153
|
_defineProperty(JstItemSelect, "group", "THIRD_COMPONENT");
|
|
154
154
|
_defineProperty(JstItemSelect, "configSchema", {
|
|
155
155
|
componentConfig: {
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
enableItemId: false,
|
|
157
|
+
enableSupplierName: false,
|
|
158
|
+
maxLength: 20,
|
|
159
|
+
required: false
|
|
158
160
|
},
|
|
159
|
-
name:
|
|
160
|
-
uniqueKey:
|
|
161
|
+
name: 'jst供应商编码/名称',
|
|
162
|
+
uniqueKey: 'xyR3wBznuc',
|
|
161
163
|
schema: {
|
|
162
164
|
required: {
|
|
163
|
-
title:
|
|
164
|
-
type:
|
|
165
|
+
title: '必填',
|
|
166
|
+
type: 'boolean'
|
|
167
|
+
},
|
|
168
|
+
enableItemId: {
|
|
169
|
+
title: '供应商编码',
|
|
170
|
+
type: 'boolean'
|
|
171
|
+
},
|
|
172
|
+
enableSupplierName: {
|
|
173
|
+
title: '供应商名称',
|
|
174
|
+
type: 'boolean'
|
|
165
175
|
}
|
|
166
176
|
}
|
|
167
177
|
});
|
|
@@ -15,6 +15,7 @@ declare class ReissueLogistics extends JstLogistics {
|
|
|
15
15
|
static configSchema: {
|
|
16
16
|
componentConfig: {
|
|
17
17
|
required: boolean;
|
|
18
|
+
logistics: string;
|
|
18
19
|
};
|
|
19
20
|
belongs: string[];
|
|
20
21
|
name: string;
|
|
@@ -32,6 +33,19 @@ declare class ReissueLogistics extends JstLogistics {
|
|
|
32
33
|
upgrade: number;
|
|
33
34
|
};
|
|
34
35
|
};
|
|
36
|
+
logistics: {
|
|
37
|
+
type: string;
|
|
38
|
+
widget: string;
|
|
39
|
+
props: {
|
|
40
|
+
style: {
|
|
41
|
+
width: number;
|
|
42
|
+
};
|
|
43
|
+
options: {
|
|
44
|
+
label: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
35
49
|
};
|
|
36
50
|
};
|
|
37
51
|
static type: string;
|
|
@@ -106,23 +106,40 @@ var ReissueLogistics = /*#__PURE__*/function (_JstLogistics) {
|
|
|
106
106
|
_defineProperty(ReissueLogistics, "group", "THIRD_SPECIAL_COMPONENT");
|
|
107
107
|
_defineProperty(ReissueLogistics, "configSchema", {
|
|
108
108
|
componentConfig: {
|
|
109
|
-
required: false
|
|
109
|
+
required: false,
|
|
110
|
+
logistics: 'default'
|
|
110
111
|
},
|
|
111
|
-
belongs: [
|
|
112
|
-
name:
|
|
113
|
-
uniqueKey:
|
|
112
|
+
belongs: ['bs', 'wdt'],
|
|
113
|
+
name: '补发物流信息(单号勿填)',
|
|
114
|
+
uniqueKey: 'd04d1d30a3',
|
|
114
115
|
schema: {
|
|
115
116
|
required: {
|
|
116
|
-
title:
|
|
117
|
-
type:
|
|
117
|
+
title: '必填',
|
|
118
|
+
type: 'boolean'
|
|
118
119
|
},
|
|
119
120
|
status: {
|
|
120
|
-
widget:
|
|
121
|
-
type:
|
|
121
|
+
widget: 'StatusConfig',
|
|
122
|
+
type: 'object',
|
|
122
123
|
default: {
|
|
123
124
|
created: SHOW_WRITE,
|
|
124
125
|
upgrade: SHOW_WRITE
|
|
125
126
|
}
|
|
127
|
+
},
|
|
128
|
+
logistics: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
widget: 'select',
|
|
131
|
+
props: {
|
|
132
|
+
style: {
|
|
133
|
+
width: 120
|
|
134
|
+
},
|
|
135
|
+
options: [{
|
|
136
|
+
label: '系统物流',
|
|
137
|
+
value: 'default'
|
|
138
|
+
}, {
|
|
139
|
+
label: '旺店通物流',
|
|
140
|
+
value: 'wdt'
|
|
141
|
+
}]
|
|
142
|
+
}
|
|
126
143
|
}
|
|
127
144
|
}
|
|
128
145
|
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { LabelData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
declare class Label implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
options: ComponentInterface["options"];
|
|
17
|
+
labelDateInstance: InstanceType<typeof LabelData>;
|
|
18
|
+
static type: string;
|
|
19
|
+
static group: string;
|
|
20
|
+
static configSchema: {
|
|
21
|
+
componentConfig: {
|
|
22
|
+
status: {
|
|
23
|
+
created: number;
|
|
24
|
+
upgrade: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
name: string;
|
|
28
|
+
uniqueKey: string;
|
|
29
|
+
schema: {
|
|
30
|
+
status: {
|
|
31
|
+
widget: string;
|
|
32
|
+
type: string;
|
|
33
|
+
default: {
|
|
34
|
+
created: number;
|
|
35
|
+
upgrade: number;
|
|
36
|
+
};
|
|
37
|
+
props: {
|
|
38
|
+
showOptionsKey: number[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
constructor(options: PickOption);
|
|
44
|
+
getComponentValue: (r: Record) => any;
|
|
45
|
+
editRender: (p: any) => React.JSX.Element;
|
|
46
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
47
|
+
showDetail: (value: Array<{
|
|
48
|
+
labelId: string;
|
|
49
|
+
labelName: string;
|
|
50
|
+
labelShowName: string;
|
|
51
|
+
openId: string;
|
|
52
|
+
}>) => React.JSX.Element;
|
|
53
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
54
|
+
renderLog: (r: Record) => React.JSX.Element;
|
|
55
|
+
renderExport: (value: any, record: Record) => any;
|
|
56
|
+
filterConfig: (item: ColumnConfig) => never[];
|
|
57
|
+
}
|
|
58
|
+
export default Label;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
8
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Tag, Select, Space } from 'antd';
|
|
11
|
+
import { LabelData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
+
import { SHOW_NOT_WRITE } from "../../constant";
|
|
13
|
+
import GetFormItem from "../GetFormItem";
|
|
14
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
+
var EditRenderItem = function EditRenderItem(props) {
|
|
16
|
+
var value = props.value;
|
|
17
|
+
var tagRender = function tagRender(prop) {
|
|
18
|
+
var _props$options, _props$options$find;
|
|
19
|
+
var label = prop.label,
|
|
20
|
+
closable = prop.closable,
|
|
21
|
+
onClose = prop.onClose,
|
|
22
|
+
value = prop.value;
|
|
23
|
+
var color = props === null || props === void 0 ? void 0 : (_props$options = props.options) === null || _props$options === void 0 ? void 0 : (_props$options$find = _props$options.find(function (item) {
|
|
24
|
+
return item.value === value;
|
|
25
|
+
})) === null || _props$options$find === void 0 ? void 0 : _props$options$find.color;
|
|
26
|
+
var onPreventMouseDown = function onPreventMouseDown(event) {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
31
|
+
color: color,
|
|
32
|
+
onMouseDown: onPreventMouseDown,
|
|
33
|
+
closable: closable,
|
|
34
|
+
onClose: onClose,
|
|
35
|
+
style: {
|
|
36
|
+
marginRight: 3
|
|
37
|
+
}
|
|
38
|
+
}, label);
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/React.createElement(Select, _extends({}, props, {
|
|
41
|
+
value: Array.from(new Set(value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
42
|
+
return item === null || item === void 0 ? void 0 : item.labelShowName;
|
|
43
|
+
}))),
|
|
44
|
+
mode: "multiple",
|
|
45
|
+
showArrow: true,
|
|
46
|
+
tagRender: tagRender
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
50
|
+
var _this = this;
|
|
51
|
+
_classCallCheck(this, Label);
|
|
52
|
+
_defineProperty(this, "name", void 0);
|
|
53
|
+
_defineProperty(this, "id", void 0);
|
|
54
|
+
_defineProperty(this, "sortField", void 0);
|
|
55
|
+
_defineProperty(this, "type", void 0);
|
|
56
|
+
_defineProperty(this, "rules", void 0);
|
|
57
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
58
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
59
|
+
_defineProperty(this, "formField", void 0);
|
|
60
|
+
_defineProperty(this, "canSort", void 0);
|
|
61
|
+
_defineProperty(this, "children", void 0);
|
|
62
|
+
_defineProperty(this, "dataType", void 0);
|
|
63
|
+
_defineProperty(this, "options", void 0);
|
|
64
|
+
_defineProperty(this, "labelDateInstance", void 0);
|
|
65
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
66
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_label")];
|
|
67
|
+
});
|
|
68
|
+
_defineProperty(this, "editRender", function (p) {
|
|
69
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
70
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
71
|
+
title: _this.name,
|
|
72
|
+
name: _this.id,
|
|
73
|
+
rules: _this.rules,
|
|
74
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
75
|
+
display: p === null || p === void 0 ? void 0 : p.display,
|
|
76
|
+
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,
|
|
77
|
+
component: /*#__PURE__*/React.createElement(EditRenderItem, _extends({}, _this.componentConfig, {
|
|
78
|
+
placeholder: "\u7CFB\u7EDF\u81EA\u52A8\u751F\u6210",
|
|
79
|
+
showSearch: true,
|
|
80
|
+
onChange: p === null || p === void 0 ? void 0 : p.onChange,
|
|
81
|
+
options: _this.labelDateInstance.labelData,
|
|
82
|
+
optionFilterProp: "label"
|
|
83
|
+
}))
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
87
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
88
|
+
id: _this.id,
|
|
89
|
+
label: _this.name,
|
|
90
|
+
value: _this.showDetail(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])
|
|
91
|
+
}) : null;
|
|
92
|
+
});
|
|
93
|
+
_defineProperty(this, "showDetail", function (value) {
|
|
94
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
95
|
+
style: {
|
|
96
|
+
flexWrap: 'wrap'
|
|
97
|
+
}
|
|
98
|
+
}, Array.isArray(value) ? value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
99
|
+
var _this$labelDateInstan;
|
|
100
|
+
var label = ((_this$labelDateInstan = _this.labelDateInstance.labelData) === null || _this$labelDateInstan === void 0 ? void 0 : _this$labelDateInstan.find(function (item) {
|
|
101
|
+
return item.value === (v === null || v === void 0 ? void 0 : v.labelShowName);
|
|
102
|
+
})) || {};
|
|
103
|
+
if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
|
|
104
|
+
color: label === null || label === void 0 ? void 0 : label.color
|
|
105
|
+
}, label === null || label === void 0 ? void 0 : label.label);
|
|
106
|
+
return null;
|
|
107
|
+
}) : "--");
|
|
108
|
+
});
|
|
109
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
110
|
+
return _this.showDetail(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_label")]);
|
|
111
|
+
});
|
|
112
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
113
|
+
return _this.renderPc(undefined, r);
|
|
114
|
+
});
|
|
115
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
116
|
+
var _record, _record$map;
|
|
117
|
+
return record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : (_record$map = _record.map(function (item) {
|
|
118
|
+
return item === null || item === void 0 ? void 0 : item.labelShowName;
|
|
119
|
+
})) === null || _record$map === void 0 ? void 0 : _record$map.join('、');
|
|
120
|
+
});
|
|
121
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
122
|
+
return [];
|
|
123
|
+
});
|
|
124
|
+
this.name = options.name;
|
|
125
|
+
this.id = options.id;
|
|
126
|
+
this.sortField = options.id;
|
|
127
|
+
this.formField = "".concat(options.id, "_label");
|
|
128
|
+
this.type = options.type;
|
|
129
|
+
this.componentConfig = options.componentConfig;
|
|
130
|
+
this.rules = [];
|
|
131
|
+
this.isCombinationComponent = false;
|
|
132
|
+
this.canSort = false;
|
|
133
|
+
this.children = [];
|
|
134
|
+
this.dataType = "array";
|
|
135
|
+
this.labelDateInstance = LabelData.getInstance();
|
|
136
|
+
this.options = this.labelDateInstance.labelData || [];
|
|
137
|
+
});
|
|
138
|
+
_defineProperty(Label, "type", "LABEL");
|
|
139
|
+
_defineProperty(Label, "group", "SPECIAL_COMPONENT");
|
|
140
|
+
_defineProperty(Label, "configSchema", {
|
|
141
|
+
componentConfig: {
|
|
142
|
+
status: {
|
|
143
|
+
created: SHOW_NOT_WRITE,
|
|
144
|
+
upgrade: SHOW_NOT_WRITE
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
name: '标签(勿填)',
|
|
148
|
+
uniqueKey: '4i9IZhYqx7',
|
|
149
|
+
schema: {
|
|
150
|
+
status: {
|
|
151
|
+
widget: 'StatusConfig',
|
|
152
|
+
type: 'object',
|
|
153
|
+
default: {
|
|
154
|
+
created: SHOW_NOT_WRITE,
|
|
155
|
+
upgrade: SHOW_NOT_WRITE
|
|
156
|
+
},
|
|
157
|
+
props: {
|
|
158
|
+
showOptionsKey: [2, 0]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
export default Label;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BsSendGood, WdtSendGood, WlnSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CompletedDateTime, CreatedDateTime, FlowCreatedDateTime, FlowUpdateDateTime, UpdateDateTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, 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, OutFlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, WlnSystemOrder, WdtSystemOrder, BsLogistics, WlnLogistics, WdtLogistics, AdjustWorkOrderStatus, CreateStatus, InvoiceStatus, InvoicingStatus, ReissueStatus, DeliveryNoList, ExchangeTradeId, ReturnGoodsTradeItemList, TradeItemList, WareHousingStatus, ReturnGoodsStatus, ExchangeStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, BusinessOrderNo, PaymentVoucherCode, WdtReissue, BsSendTime, BsSigningTime, BsTradePaymentTime, TradeClosingDateTime, TradeCreateDateTime, TradeDeliveryDateTime, TradePaymentDateTime } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BsSendGood, WdtSendGood, WlnSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CompletedDateTime, CreatedDateTime, FlowCreatedDateTime, FlowUpdateDateTime, UpdateDateTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, 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, OutFlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, WlnSystemOrder, WdtSystemOrder, BsLogistics, WlnLogistics, WdtLogistics, AdjustWorkOrderStatus, CreateStatus, InvoiceStatus, InvoicingStatus, ReissueStatus, DeliveryNoList, ExchangeTradeId, ReturnGoodsTradeItemList, TradeItemList, WareHousingStatus, ReturnGoodsStatus, ExchangeStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, BusinessOrderNo, PaymentVoucherCode, WdtReissue, BsSendTime, BsSigningTime, BsTradePaymentTime, TradeClosingDateTime, TradeCreateDateTime, TradeDeliveryDateTime, TradePaymentDateTime, Label } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSendGood | BsSystemOrder | BusinessOrderNo | BasicSelect | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CompletedDateTime | CreatedDateTime | FlowCreatedDateTime | FlowUpdateDateTime | UpdateDateTime | ExchangeStatus | ReturnGoodsStatus | WareHousingStatus | DeliveryNoList | ExchangeTradeId | ReturnGoodsTradeItemList | TradeItemList | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicFile | FlowCreator | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | FlowWorkOrderStatus | BasicGrade | Handler | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | NodeDeadLine | NodeInput | NodeStayDuration | Ordinary | OutFlowWorkOrderId | Payment | PaymentVoucherCode | BasicPicture | PlatForm | BasicPosting | PrevSubmitter | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | ShopInput | ShopName | AdjustWorkOrderStatus | CreateStatus | InvoiceStatus | InvoicingStatus | ReissueStatus | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | BsSendTime | BsSigningTime | BsTradePaymentTime | TradeClosingDateTime | TradeCreateDateTime | TradeDeliveryDateTime | TradePaymentDateTime | TradeId | WdtGoods | WdtLogistics | WdtReissue | WdtSendGood | WdtSystemOrder | WlnGoods | WlnLogistics | WlnSendGood | WlnSystemOrder | WorkOrderId;
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSendGood | BsSystemOrder | BusinessOrderNo | BasicSelect | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CompletedDateTime | CreatedDateTime | FlowCreatedDateTime | FlowUpdateDateTime | UpdateDateTime | ExchangeStatus | ReturnGoodsStatus | WareHousingStatus | DeliveryNoList | ExchangeTradeId | ReturnGoodsTradeItemList | TradeItemList | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicFile | FlowCreator | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | FlowWorkOrderStatus | BasicGrade | Handler | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Label | Logistics | LogisticsInterception | LogisticsMoreInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | NodeDeadLine | NodeInput | NodeStayDuration | Ordinary | OutFlowWorkOrderId | Payment | PaymentVoucherCode | BasicPicture | PlatForm | BasicPosting | PrevSubmitter | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | ShopInput | ShopName | AdjustWorkOrderStatus | CreateStatus | InvoiceStatus | InvoicingStatus | ReissueStatus | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | BsSendTime | BsSigningTime | BsTradePaymentTime | TradeClosingDateTime | TradeCreateDateTime | TradeDeliveryDateTime | TradePaymentDateTime | TradeId | WdtGoods | WdtLogistics | WdtReissue | WdtSendGood | WdtSystemOrder | WlnGoods | WlnLogistics | WlnSendGood | WlnSystemOrder | WorkOrderId;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BsSendGood, WdtSendGood, WlnSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CompletedDateTime, CreatedDateTime, FlowCreatedDateTime, FlowUpdateDateTime, UpdateDateTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, Logistics, ReturnLogistics, ActualPayment, BsNetReceipts, BsPackageWeight, BsDeposit, 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, OutFlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, WlnSystemOrder, WdtSystemOrder, BsLogistics, WlnLogistics, WdtLogistics, AdjustWorkOrderStatus, CreateStatus, InvoiceStatus, InvoicingStatus, ReissueStatus, DeliveryNoList, ExchangeTradeId, ReturnGoodsTradeItemList, TradeItemList, WareHousingStatus, ReturnGoodsStatus, ExchangeStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, BusinessOrderNo, PaymentVoucherCode, WdtReissue, BuyerMessageNotice, NewPaymentStatus, BsSendTime, BsSigningTime, BsTradePaymentTime, TradeClosingDateTime, TradeCreateDateTime, TradeDeliveryDateTime, TradePaymentDateTime, ReissueLogistics } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BsSendGood, WdtSendGood, WlnSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CompletedDateTime, CreatedDateTime, FlowCreatedDateTime, FlowUpdateDateTime, UpdateDateTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, Logistics, ReturnLogistics, ActualPayment, BsNetReceipts, BsPackageWeight, BsDeposit, 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, OutFlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, WlnSystemOrder, WdtSystemOrder, BsLogistics, WlnLogistics, WdtLogistics, AdjustWorkOrderStatus, CreateStatus, InvoiceStatus, InvoicingStatus, ReissueStatus, DeliveryNoList, ExchangeTradeId, ReturnGoodsTradeItemList, TradeItemList, WareHousingStatus, ReturnGoodsStatus, ExchangeStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, BusinessOrderNo, PaymentVoucherCode, WdtReissue, BuyerMessageNotice, NewPaymentStatus, BsSendTime, BsSigningTime, BsTradePaymentTime, TradeClosingDateTime, TradeCreateDateTime, TradeDeliveryDateTime, TradePaymentDateTime, ReissueLogistics, Label } from "./index";
|
|
2
2
|
export var factory = function factory(type, options) {
|
|
3
3
|
var _options$componentCon;
|
|
4
4
|
switch (type) {
|
|
@@ -230,6 +230,8 @@ export var factory = function factory(type, options) {
|
|
|
230
230
|
return new BusinessOrderNo(options);
|
|
231
231
|
case "PAYMENT_VOUCHER_CODE":
|
|
232
232
|
return new PaymentVoucherCode(options);
|
|
233
|
+
case "LABEL":
|
|
234
|
+
return new Label(options);
|
|
233
235
|
default:
|
|
234
236
|
return new BasicInput(options);
|
|
235
237
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -110,6 +110,7 @@ export { default as TradePaymentDateTime } from "./components/TradeDateTime/Trad
|
|
|
110
110
|
export { default as ReissueLogistics } from "./components/JST/ReissueLogistics";
|
|
111
111
|
export { default as WlnSystemOrder } from "./components/WLN/WlnSystemOrder";
|
|
112
112
|
export { default as WdtSystemOrder } from "./components/WDT/WdtSystemOrder";
|
|
113
|
+
export { default as Label } from "./components/Label";
|
|
113
114
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
114
115
|
export { factory } from "./factory";
|
|
115
116
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
package/dist/esm/index.js
CHANGED
|
@@ -110,6 +110,7 @@ export { default as TradePaymentDateTime } from "./components/TradeDateTime/Trad
|
|
|
110
110
|
export { default as ReissueLogistics } from "./components/JST/ReissueLogistics";
|
|
111
111
|
export { default as WlnSystemOrder } from "./components/WLN/WlnSystemOrder";
|
|
112
112
|
export { default as WdtSystemOrder } from "./components/WDT/WdtSystemOrder";
|
|
113
|
+
export { default as Label } from "./components/Label";
|
|
113
114
|
// TODO: ERP 打款工单使用
|
|
114
115
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
115
116
|
export { factory } from "./factory";
|
|
@@ -9,3 +9,4 @@ export declare const queryAllLogisticsCompany: () => Promise<void>;
|
|
|
9
9
|
export declare const queryWdtLogisticsCompany: () => Promise<void>;
|
|
10
10
|
export declare const queryWdtSendData: () => Promise<void>;
|
|
11
11
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
12
|
+
export declare const queryLabel: () => Promise<any>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
-
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, WdtSendData, servers, WDT } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, LabelData, WdtSendData, servers, WDT } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import get from "lodash/get";
|
|
15
15
|
import request from "./request";
|
|
16
16
|
// 重复校验
|
|
@@ -267,4 +267,23 @@ export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
|
267
267
|
method: "post",
|
|
268
268
|
data: data
|
|
269
269
|
});
|
|
270
|
+
};
|
|
271
|
+
export var queryLabel = function queryLabel() {
|
|
272
|
+
return request({
|
|
273
|
+
url: "/qy/diamond/getConfigInfo",
|
|
274
|
+
method: "get",
|
|
275
|
+
data: {
|
|
276
|
+
key: 'RISK_WARING_LABEL_LIST'
|
|
277
|
+
}
|
|
278
|
+
}).then(function (res) {
|
|
279
|
+
var data = res.data;
|
|
280
|
+
var instance = LabelData.getInstance();
|
|
281
|
+
try {
|
|
282
|
+
var finalData = JSON.parse(data);
|
|
283
|
+
instance.labelData = finalData;
|
|
284
|
+
} catch (e) {
|
|
285
|
+
console.error('转换标签数据数据异常');
|
|
286
|
+
instance.labelData = [];
|
|
287
|
+
}
|
|
288
|
+
});
|
|
270
289
|
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
|
-
"
|
|
10
|
+
"async": "yarn build && yalc push",
|
|
11
|
+
"build": "father build",
|
|
11
12
|
"lint": "eslint '**/*.{ts,tsx}'",
|
|
12
13
|
"lint:fix": "eslint --fix '**/*.{ts,tsx}'"
|
|
13
14
|
},
|
|
@@ -20,8 +21,8 @@
|
|
|
20
21
|
]
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^1.0.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^1.0.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "^1.0.7",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "^1.0.7"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
"publishConfig": {
|
|
38
39
|
"access": "public"
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "a53983471f6fe85f518221f0486059c7af0a7869",
|
|
41
42
|
"gitHooks": {
|
|
42
43
|
"pre-commit": "lint-staged"
|
|
43
44
|
}
|