@kmkf-fe-packages/services-components 0.11.0-alpha.1 → 0.11.0-alpha.10
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/BS/BsLogistics/index.d.ts +7 -7
- package/dist/esm/components/BS/BsLogistics/index.js +30 -26
- package/dist/esm/components/BS/BsSystemOrder/index.js +31 -14
- package/dist/esm/components/BS/common/expressCode.d.ts +1 -0
- package/dist/esm/components/BS/common/expressCode.js +13 -3
- package/dist/esm/components/BS/common/expressCompany.d.ts +7 -6
- package/dist/esm/components/BS/common/expressCompany.js +24 -13
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +13 -4
- package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -4
- package/dist/esm/components/CommonMultiStatus/index.js +50 -31
- package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
- package/dist/esm/components/CommonSystemOrder/index.js +48 -50
- package/dist/esm/components/CompletedUser/index.js +1 -1
- package/dist/esm/components/FlowMarkSelect/index.js +1 -1
- package/dist/esm/components/Handler/index.js +1 -1
- package/dist/esm/components/Input/index.js +18 -0
- package/dist/esm/components/PlatForm/index.d.ts +2 -2
- package/dist/esm/components/PlatForm/index.js +2 -2
- package/dist/esm/components/ShopInput/index.js +1 -1
- package/dist/esm/components/StatusSelect/index.d.ts +5 -5
- package/dist/esm/components/StatusSelect/index.js +37 -51
- package/dist/esm/components/Submitter/index.js +1 -1
- package/dist/esm/components/WLN/WlnGoods/index.js +4 -3
- package/dist/esm/factory.d.ts +3 -3
- package/dist/esm/factory.js +91 -90
- package/dist/esm/type.d.ts +2 -0
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
4
|
-
import ExpressCompany from
|
|
5
|
-
import ExpressCode from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
|
+
import ExpressCompany from '../common/expressCompany';
|
|
5
|
+
import ExpressCode from '../common/expressCode';
|
|
6
6
|
declare class BsLogistics implements ComponentInterface {
|
|
7
7
|
name: string;
|
|
8
8
|
id: string;
|
|
@@ -15,13 +15,13 @@ declare class BsLogistics implements ComponentInterface {
|
|
|
15
15
|
}[];
|
|
16
16
|
type: string;
|
|
17
17
|
rules: any[];
|
|
18
|
-
componentConfig: ComponentInterface[
|
|
18
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
19
19
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
20
20
|
isCombinationComponent: boolean;
|
|
21
21
|
formField: string;
|
|
22
22
|
canSort: boolean;
|
|
23
23
|
children: ComponentInterface[];
|
|
24
|
-
dataType: ComponentInterface[
|
|
24
|
+
dataType: ComponentInterface['dataType'];
|
|
25
25
|
expressCompany: ExpressCompany;
|
|
26
26
|
expressCode: ExpressCode;
|
|
27
27
|
constructor(options: PickOption);
|
|
@@ -8,28 +8,28 @@ 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 { ExpressData } from
|
|
13
|
-
import some from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import some from 'lodash/some';
|
|
14
14
|
import GetFormItem from "../../GetFormItem";
|
|
15
15
|
import { JstGoodImage } from "../../Common";
|
|
16
|
-
import { JstGoods } from
|
|
16
|
+
import { JstGoods } from '@kmkf-fe-packages/basic-components';
|
|
17
17
|
import ItemView from "../../../commonComponents/ItemView";
|
|
18
|
-
import { isNull } from
|
|
18
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
19
19
|
import ExpressCompany from "../common/expressCompany";
|
|
20
20
|
import ExpressCode from "../common/expressCode";
|
|
21
21
|
var typeMap = {
|
|
22
22
|
BS_LOGISTICS: {
|
|
23
|
-
key:
|
|
24
|
-
name:
|
|
25
|
-
company:
|
|
26
|
-
code:
|
|
23
|
+
key: 'bsLogisticsList',
|
|
24
|
+
name: 'bs',
|
|
25
|
+
company: 'bsLogisticsCompany',
|
|
26
|
+
code: 'bsLogisticsCode'
|
|
27
27
|
},
|
|
28
28
|
WLN_LOGISTICS: {
|
|
29
|
-
key:
|
|
30
|
-
name:
|
|
31
|
-
company:
|
|
32
|
-
code:
|
|
29
|
+
key: 'wlnLogisticsList',
|
|
30
|
+
name: '万里牛',
|
|
31
|
+
company: 'wlnLogisticsCompany',
|
|
32
|
+
code: 'wlnLogisticsCode'
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
@@ -40,9 +40,11 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
|
40
40
|
_typeMap$options$type4,
|
|
41
41
|
_typeMap$options$type5,
|
|
42
42
|
_typeMap$options$type6,
|
|
43
|
-
_this$componentConfig3,
|
|
44
43
|
_typeMap$options$type7,
|
|
45
|
-
_typeMap$options$type8
|
|
44
|
+
_typeMap$options$type8,
|
|
45
|
+
_this$componentConfig3,
|
|
46
|
+
_typeMap$options$type9,
|
|
47
|
+
_typeMap$options$type10;
|
|
46
48
|
_classCallCheck(this, BsLogistics);
|
|
47
49
|
_defineProperty(this, "name", void 0);
|
|
48
50
|
_defineProperty(this, "id", void 0);
|
|
@@ -129,17 +131,19 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
|
129
131
|
this.isCombinationComponent = true;
|
|
130
132
|
this.canSort = false;
|
|
131
133
|
this.expressCompany = new ExpressCompany(_objectSpread(_objectSpread({}, options), {}, {
|
|
132
|
-
name:
|
|
133
|
-
|
|
134
|
+
name: '物流公司',
|
|
135
|
+
parentName: (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.name,
|
|
136
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.company),
|
|
134
137
|
width: 200
|
|
135
138
|
}));
|
|
136
139
|
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
137
|
-
name:
|
|
138
|
-
|
|
140
|
+
name: '物流单号',
|
|
141
|
+
parentName: (_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.name,
|
|
142
|
+
id: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.key, "_").concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.code),
|
|
139
143
|
width: 200
|
|
140
144
|
}));
|
|
141
145
|
this.children = [this.expressCompany, this.expressCode];
|
|
142
|
-
this.dataType =
|
|
146
|
+
this.dataType = 'object';
|
|
143
147
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
144
148
|
required: true,
|
|
145
149
|
validator: function validator(_, value) {
|
|
@@ -154,14 +158,14 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
|
|
|
154
158
|
}] : [];
|
|
155
159
|
this.expressDateInstance = ExpressData.getInstance();
|
|
156
160
|
this.sortChildField = [{
|
|
157
|
-
name:
|
|
158
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$
|
|
161
|
+
name: '物流公司',
|
|
162
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.company),
|
|
159
163
|
options: this.expressDateInstance.getExpressData(),
|
|
160
|
-
dataType:
|
|
164
|
+
dataType: 'string'
|
|
161
165
|
}, {
|
|
162
|
-
name:
|
|
163
|
-
key: "".concat(options.id, "_").concat((_typeMap$options$
|
|
164
|
-
dataType:
|
|
166
|
+
name: '物流单号',
|
|
167
|
+
key: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.code),
|
|
168
|
+
dataType: 'string'
|
|
165
169
|
}];
|
|
166
170
|
});
|
|
167
171
|
export default BsLogistics;
|
|
@@ -12,9 +12,23 @@ import React from "react";
|
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
14
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
-
import { BsSystemOrder as
|
|
15
|
+
import { BsSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import { BsSystemOrderTable } from "../../Common";
|
|
17
17
|
import { BsHeaderChild } from "../common/index";
|
|
18
|
+
var typeMap = {
|
|
19
|
+
BS_SYSTEM_ORDER: {
|
|
20
|
+
key: "bsSystemShowOrder",
|
|
21
|
+
name: "bs",
|
|
22
|
+
typeName: "单据类型",
|
|
23
|
+
tagName: "标签"
|
|
24
|
+
},
|
|
25
|
+
WLN_SYSTEM_ORDER: {
|
|
26
|
+
key: "wlnSystemShowOrder",
|
|
27
|
+
name: "万里牛",
|
|
28
|
+
typeName: "订单类型",
|
|
29
|
+
tagName: "标记"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
18
32
|
var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
19
33
|
var _this = this,
|
|
20
34
|
_this$componentConfig;
|
|
@@ -36,7 +50,8 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
36
50
|
id: _this.id,
|
|
37
51
|
label: _this.name,
|
|
38
52
|
value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
|
|
39
|
-
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
53
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
|
|
54
|
+
type: _this.type
|
|
40
55
|
})
|
|
41
56
|
})) : null;
|
|
42
57
|
});
|
|
@@ -44,9 +59,10 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
44
59
|
return null;
|
|
45
60
|
});
|
|
46
61
|
_defineProperty(this, "renderLog", function (r) {
|
|
47
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
62
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)])) return null;
|
|
48
63
|
return /*#__PURE__*/React.createElement(BsSystemOrderTable, {
|
|
49
|
-
value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
64
|
+
value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)],
|
|
65
|
+
type: _this.type
|
|
50
66
|
});
|
|
51
67
|
});
|
|
52
68
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
@@ -62,8 +78,9 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
62
78
|
rules: _this.rules,
|
|
63
79
|
required: false,
|
|
64
80
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
65
|
-
component: /*#__PURE__*/React.createElement(
|
|
66
|
-
onChange: p === null || p === void 0 ? void 0 : p.onChange
|
|
81
|
+
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
82
|
+
onChange: p === null || p === void 0 ? void 0 : p.onChange,
|
|
83
|
+
type: _this.type
|
|
67
84
|
}))
|
|
68
85
|
});
|
|
69
86
|
});
|
|
@@ -72,23 +89,23 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
72
89
|
});
|
|
73
90
|
this.name = options.name;
|
|
74
91
|
this.id = options.id;
|
|
75
|
-
this.sortField = "".concat(options.id, "
|
|
76
|
-
this.formField = "".concat(options.id, "
|
|
92
|
+
this.sortField = "".concat(options.id, "_").concat(typeMap[options.type].key);
|
|
93
|
+
this.formField = "".concat(options.id, "_").concat(typeMap[options.type].key);
|
|
77
94
|
this.type = options.type;
|
|
78
95
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
79
96
|
this.isCombinationComponent = true;
|
|
80
97
|
this.canSort = false;
|
|
81
98
|
this.children = [new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
82
|
-
name:
|
|
83
|
-
id: "".concat(options.id, "
|
|
99
|
+
name: typeMap[options.type].typeName,
|
|
100
|
+
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billType"),
|
|
84
101
|
width: 150
|
|
85
102
|
})), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
86
103
|
name: "系统订单号",
|
|
87
|
-
id: "".concat(options.id, "
|
|
104
|
+
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billNo"),
|
|
88
105
|
width: 150
|
|
89
106
|
})), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
90
|
-
name:
|
|
91
|
-
id: "".concat(options.id, "
|
|
107
|
+
name: typeMap[options.type].tagName,
|
|
108
|
+
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billTag"),
|
|
92
109
|
width: 150
|
|
93
110
|
}))];
|
|
94
111
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
@@ -97,7 +114,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
97
114
|
validator: function validator(_, value) {
|
|
98
115
|
var _value$selectIds;
|
|
99
116
|
if (!value || !(value !== null && value !== void 0 && (_value$selectIds = value.selectIds) !== null && _value$selectIds !== void 0 && _value$selectIds.length)) {
|
|
100
|
-
return Promise.reject(new Error("
|
|
117
|
+
return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat(typeMap[options.type].name, "\u7CFB\u7EDF\u8BA2\u5355\u53F7")));
|
|
101
118
|
}
|
|
102
119
|
return Promise.resolve();
|
|
103
120
|
}
|
|
@@ -14,6 +14,7 @@ declare class ExpressCode implements ComponentInterface {
|
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
16
|
dataType: ComponentInterface['dataType'];
|
|
17
|
+
parentName: string;
|
|
17
18
|
constructor(options: PickOption);
|
|
18
19
|
renderClient: () => null;
|
|
19
20
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
@@ -15,6 +15,14 @@ import React from 'react';
|
|
|
15
15
|
import { BsExpressRender } from "../../Common";
|
|
16
16
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
17
|
import { SYMBOL } from "../../../constant";
|
|
18
|
+
var typeMap = {
|
|
19
|
+
BS_LOGISTICS: {
|
|
20
|
+
key: 'bsLogisticsItem'
|
|
21
|
+
},
|
|
22
|
+
WLN_LOGISTICS: {
|
|
23
|
+
key: 'wlnLogisticsItem'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
18
26
|
var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
19
27
|
var _this = this,
|
|
20
28
|
_this$componentConfig;
|
|
@@ -32,6 +40,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
32
40
|
_defineProperty(this, "canSort", void 0);
|
|
33
41
|
_defineProperty(this, "children", void 0);
|
|
34
42
|
_defineProperty(this, "dataType", void 0);
|
|
43
|
+
_defineProperty(this, "parentName", void 0);
|
|
35
44
|
_defineProperty(this, "renderClient", function () {
|
|
36
45
|
return null;
|
|
37
46
|
});
|
|
@@ -41,11 +50,11 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
41
50
|
key = _this$id$split2[0],
|
|
42
51
|
parentKey = _this$id$split2[1],
|
|
43
52
|
childKey = _this$id$split2[2];
|
|
44
|
-
if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "
|
|
53
|
+
if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)])) {
|
|
45
54
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
46
55
|
}
|
|
47
56
|
return /*#__PURE__*/React.createElement(BsExpressRender, {
|
|
48
|
-
list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "
|
|
57
|
+
list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
|
|
49
58
|
showField: 'code'
|
|
50
59
|
});
|
|
51
60
|
});
|
|
@@ -69,7 +78,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
69
78
|
searchDefaultConditions: SYMBOL.like,
|
|
70
79
|
type: item.type,
|
|
71
80
|
id: "".concat(item.id, "_").concat(subKey),
|
|
72
|
-
name: "".concat(_this.
|
|
81
|
+
name: "".concat(_this.parentName, "\u7269\u6D41\u5355\u53F7"),
|
|
73
82
|
filterComponentType: 'Input',
|
|
74
83
|
filterFn: function filterFn(value) {
|
|
75
84
|
return function (i) {
|
|
@@ -98,5 +107,6 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
98
107
|
this.canSort = false;
|
|
99
108
|
this.dataType = 'string';
|
|
100
109
|
this.children = [];
|
|
110
|
+
this.parentName = options === null || options === void 0 ? void 0 : options.parentName;
|
|
101
111
|
});
|
|
102
112
|
export default ExpressCode;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
4
|
declare class Express implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
6
6
|
id: string;
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
11
|
align: ALignType;
|
|
12
12
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
13
13
|
width: number;
|
|
@@ -15,8 +15,9 @@ declare class Express implements ComponentInterface {
|
|
|
15
15
|
formField: string;
|
|
16
16
|
canSort: boolean;
|
|
17
17
|
children: ComponentInterface[];
|
|
18
|
-
dataType: ComponentInterface[
|
|
19
|
-
options: ComponentInterface[
|
|
18
|
+
dataType: ComponentInterface["dataType"];
|
|
19
|
+
options: ComponentInterface["options"];
|
|
20
|
+
parentName: string;
|
|
20
21
|
constructor(options: PickOption);
|
|
21
22
|
renderClient: () => null;
|
|
22
23
|
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
@@ -11,11 +11,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
15
|
-
import { ExpressData } from
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { BsExpressRender } from "../../Common";
|
|
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
|
+
var typeMap = {
|
|
20
|
+
BS_LOGISTICS: {
|
|
21
|
+
key: "bsLogisticsItem"
|
|
22
|
+
},
|
|
23
|
+
WLN_LOGISTICS: {
|
|
24
|
+
key: "wlnLogisticsItem"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
19
27
|
var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
20
28
|
var _this = this;
|
|
21
29
|
_classCallCheck(this, Express);
|
|
@@ -34,21 +42,23 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
34
42
|
_defineProperty(this, "children", void 0);
|
|
35
43
|
_defineProperty(this, "dataType", void 0);
|
|
36
44
|
_defineProperty(this, "options", void 0);
|
|
45
|
+
_defineProperty(this, "parentName", void 0);
|
|
37
46
|
_defineProperty(this, "renderClient", function () {
|
|
38
47
|
return null;
|
|
39
48
|
});
|
|
40
49
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
|
-
var _this$
|
|
50
|
+
var _typeMap$_this$type, _typeMap$_this$type2;
|
|
51
|
+
var _this$id$split = _this.id.split("_"),
|
|
42
52
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
43
53
|
key = _this$id$split2[0],
|
|
44
54
|
parentKey = _this$id$split2[1],
|
|
45
55
|
childKey = _this$id$split2[2];
|
|
46
|
-
if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "
|
|
56
|
+
if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)])) {
|
|
47
57
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
48
58
|
}
|
|
49
59
|
return /*#__PURE__*/React.createElement(BsExpressRender, {
|
|
50
|
-
list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "
|
|
51
|
-
showField:
|
|
60
|
+
list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)],
|
|
61
|
+
showField: "company"
|
|
52
62
|
});
|
|
53
63
|
});
|
|
54
64
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -59,7 +69,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
59
69
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
60
70
|
});
|
|
61
71
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
62
|
-
return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ||
|
|
72
|
+
return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || "--";
|
|
63
73
|
});
|
|
64
74
|
_defineProperty(this, "editRender", function () {
|
|
65
75
|
return null;
|
|
@@ -70,15 +80,15 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
70
80
|
searchDefaultConditions: SYMBOL.in,
|
|
71
81
|
type: item.type,
|
|
72
82
|
id: "".concat(item.id, "_").concat(subKey),
|
|
73
|
-
name: "".concat(_this.
|
|
74
|
-
filterComponentType:
|
|
83
|
+
name: "".concat(_this.parentName, "\u7269\u6D41\u516C\u53F8"),
|
|
84
|
+
filterComponentType: "MultipleSelect",
|
|
75
85
|
props: {
|
|
76
86
|
options: _this.expressDateInstance.getExpressData() || []
|
|
77
87
|
},
|
|
78
88
|
filterFn: function filterFn(value) {
|
|
79
89
|
return function (i) {
|
|
80
90
|
var _ref;
|
|
81
|
-
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
91
|
+
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
|
|
82
92
|
var _String;
|
|
83
93
|
var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
84
94
|
return logisticsCompany;
|
|
@@ -94,13 +104,14 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
94
104
|
this.type = options.type;
|
|
95
105
|
this.componentConfig = options.componentConfig;
|
|
96
106
|
this.rules = [];
|
|
97
|
-
this.align =
|
|
107
|
+
this.align = "left";
|
|
98
108
|
this.expressDateInstance = ExpressData.getInstance();
|
|
99
109
|
this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
|
|
100
110
|
this.isCombinationComponent = false;
|
|
101
111
|
this.canSort = false;
|
|
102
112
|
this.children = [];
|
|
103
|
-
this.dataType =
|
|
113
|
+
this.dataType = "string";
|
|
104
114
|
this.options = this.expressDateInstance.getExpressData() || [];
|
|
115
|
+
this.parentName = options === null || options === void 0 ? void 0 : options.parentName;
|
|
105
116
|
});
|
|
106
117
|
export default Express;
|
|
@@ -29,5 +29,5 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
|
29
29
|
text?: string | undefined;
|
|
30
30
|
}) => React.JSX.Element;
|
|
31
31
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
32
|
-
export declare const BsSystemOrderTable: ({ value }: any) => React.JSX.Element;
|
|
32
|
+
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
33
33
|
export {};
|
|
@@ -258,7 +258,6 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
258
258
|
failValue = _ref8.failValue,
|
|
259
259
|
_ref8$options = _ref8.options,
|
|
260
260
|
options = _ref8$options === void 0 ? [] : _ref8$options;
|
|
261
|
-
console.log('CommonOrderContent', list);
|
|
262
261
|
var orderContent = function orderContent(item, index) {
|
|
263
262
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
264
263
|
style: {
|
|
@@ -286,7 +285,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
286
285
|
style: {
|
|
287
286
|
color: color
|
|
288
287
|
}
|
|
289
|
-
}, (item === null || item === void 0 ? void 0 : item[valueKey]) || '')), item.reason && /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
}, (item === null || item === void 0 ? void 0 : item[valueKey]) || '')), item.reason && (item === null || item === void 0 ? void 0 : item[valueKey]) !== "成功" && /*#__PURE__*/React.createElement("div", {
|
|
290
289
|
className: "c-red"
|
|
291
290
|
}, item.reason));
|
|
292
291
|
}) : null;
|
|
@@ -572,8 +571,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
572
571
|
})));
|
|
573
572
|
};
|
|
574
573
|
export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
575
|
-
var value = _ref13.value
|
|
576
|
-
|
|
574
|
+
var value = _ref13.value,
|
|
575
|
+
type = _ref13.type;
|
|
576
|
+
var columns = type === 'WLN_SYSTEM_ORDER' ? [{
|
|
577
577
|
dataIndex: 'billType',
|
|
578
578
|
title: '单据类型'
|
|
579
579
|
}, {
|
|
@@ -582,6 +582,15 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
582
582
|
}, {
|
|
583
583
|
dataIndex: 'billTag',
|
|
584
584
|
title: '标签'
|
|
585
|
+
}] : [{
|
|
586
|
+
dataIndex: 'billType',
|
|
587
|
+
title: '订单类型'
|
|
588
|
+
}, {
|
|
589
|
+
dataIndex: 'billNo',
|
|
590
|
+
title: '系统订单号'
|
|
591
|
+
}, {
|
|
592
|
+
dataIndex: 'billTag',
|
|
593
|
+
title: '标记'
|
|
585
594
|
}];
|
|
586
595
|
var rowSelection = {
|
|
587
596
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
@@ -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
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -8,31 +8,50 @@ 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
|
-
|
|
34
|
+
valueKey: 'status',
|
|
35
|
+
idKey: 'systemOrderId',
|
|
36
|
+
failValue: '失败'
|
|
37
|
+
},
|
|
38
|
+
EXCHANGE_STATUS: {
|
|
39
|
+
options: [{
|
|
40
|
+
value: '成功',
|
|
41
|
+
label: '成功',
|
|
42
|
+
color: '#52c41a'
|
|
43
|
+
}, {
|
|
44
|
+
value: '失败',
|
|
45
|
+
label: '失败',
|
|
46
|
+
color: '#ff4d4f'
|
|
47
|
+
}],
|
|
48
|
+
key: 'bsExchangeReason',
|
|
49
|
+
code: 'bsExchangeStatusValue',
|
|
50
|
+
name: '退货状态',
|
|
51
|
+
type: 1,
|
|
52
|
+
valueKey: 'status',
|
|
53
|
+
idKey: 'systemOrderId',
|
|
54
|
+
failValue: '失败'
|
|
36
55
|
}
|
|
37
56
|
};
|
|
38
57
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -98,12 +117,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
98
117
|
var _typeMap$_this$type10;
|
|
99
118
|
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
|
|
100
119
|
return (list || []).map(function (item) {
|
|
101
|
-
var _typeMap$_this$type11;
|
|
102
|
-
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.valueKey];
|
|
103
|
-
}).join(
|
|
120
|
+
var _typeMap$_this$type11, _typeMap$_this$type12;
|
|
121
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.idKey], ":").concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey]);
|
|
122
|
+
}).join(',');
|
|
104
123
|
});
|
|
105
124
|
_defineProperty(this, "editRender", function (p) {
|
|
106
|
-
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$
|
|
125
|
+
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type13;
|
|
107
126
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
108
127
|
title: _this.name,
|
|
109
128
|
name: _this.id,
|
|
@@ -111,23 +130,23 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
111
130
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
112
131
|
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,
|
|
113
132
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
114
|
-
type: (_typeMap$_this$
|
|
133
|
+
type: (_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.type,
|
|
115
134
|
failValue: typeMap[_this.type].failValue
|
|
116
135
|
}))
|
|
117
136
|
});
|
|
118
137
|
});
|
|
119
138
|
_defineProperty(this, "filterConfig", function (item) {
|
|
120
|
-
var _typeMap$_this$
|
|
139
|
+
var _typeMap$_this$type14;
|
|
121
140
|
return {
|
|
122
141
|
searchDefaultConditions: SYMBOL.like,
|
|
123
142
|
type: item.type,
|
|
124
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
143
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.code),
|
|
125
144
|
name: "".concat(_this.name),
|
|
126
|
-
filterComponentType:
|
|
145
|
+
filterComponentType: 'Input',
|
|
127
146
|
filterFn: function filterFn(value) {
|
|
128
147
|
return function (i) {
|
|
129
|
-
var _typeMap$_this$
|
|
130
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
148
|
+
var _typeMap$_this$type15;
|
|
149
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.code), value);
|
|
131
150
|
};
|
|
132
151
|
}
|
|
133
152
|
};
|
|
@@ -143,21 +162,21 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
143
162
|
this.isCombinationComponent = false;
|
|
144
163
|
this.canSort = false;
|
|
145
164
|
this.children = [];
|
|
146
|
-
this.dataType =
|
|
165
|
+
this.dataType = 'object';
|
|
147
166
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
148
167
|
required: true,
|
|
149
168
|
validator: function validator(_, value) {
|
|
150
169
|
var hasNo = (value || []).some(function (item) {
|
|
151
|
-
var _typeMap$_this$
|
|
152
|
-
return item[(_typeMap$_this$
|
|
170
|
+
var _typeMap$_this$type16;
|
|
171
|
+
return item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey];
|
|
153
172
|
});
|
|
154
173
|
if (!hasNo) {
|
|
155
|
-
var _typeMap$_this$
|
|
156
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
174
|
+
var _typeMap$_this$type17;
|
|
175
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.name)));
|
|
157
176
|
}
|
|
158
177
|
return Promise.resolve();
|
|
159
178
|
}
|
|
160
179
|
}] : [];
|
|
161
|
-
this.align =
|
|
180
|
+
this.align = 'left';
|
|
162
181
|
});
|
|
163
182
|
export default CommonMultiStatus;
|