@kmkf-fe-packages/services-components 0.11.0-alpha.1 → 0.11.0-alpha.11
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.d.ts +12 -6
- package/dist/esm/components/BS/BsSystemOrder/index.js +45 -19
- 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;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsSystemOrder 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[
|
|
10
|
-
effects: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
|
+
effects: ComponentInterface['effects'];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
|
-
dataType: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
15
|
children: ComponentInterface[];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -20,6 +20,12 @@ declare class BsSystemOrder implements ComponentInterface {
|
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
21
21
|
renderExport: () => null;
|
|
22
22
|
editRender: (p: any) => React.JSX.Element;
|
|
23
|
-
filterConfig: (item: ColumnConfig) =>
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
searchDefaultConditions: "like";
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
filterComponentType: "Input";
|
|
29
|
+
}[];
|
|
24
30
|
}
|
|
25
31
|
export default BsSystemOrder;
|
|
@@ -8,13 +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
|
|
11
|
+
import React from 'react';
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
|
-
import { isNull } from
|
|
15
|
-
import { BsSystemOrder as
|
|
14
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
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
|
+
import { SYMBOL } from "../../../constant";
|
|
19
|
+
var typeMap = {
|
|
20
|
+
BS_SYSTEM_ORDER: {
|
|
21
|
+
key: 'bsSystemShowOrder',
|
|
22
|
+
name: 'bs',
|
|
23
|
+
typeName: '单据类型',
|
|
24
|
+
tagName: '标签'
|
|
25
|
+
},
|
|
26
|
+
WLN_SYSTEM_ORDER: {
|
|
27
|
+
key: 'wlnSystemShowOrder',
|
|
28
|
+
name: '万里牛',
|
|
29
|
+
typeName: '订单类型',
|
|
30
|
+
tagName: '标记'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
18
33
|
var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
19
34
|
var _this = this,
|
|
20
35
|
_this$componentConfig;
|
|
@@ -36,7 +51,8 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
36
51
|
id: _this.id,
|
|
37
52
|
label: _this.name,
|
|
38
53
|
value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
|
|
39
|
-
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
|
|
54
|
+
value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
|
|
55
|
+
type: _this.type
|
|
40
56
|
})
|
|
41
57
|
})) : null;
|
|
42
58
|
});
|
|
@@ -44,9 +60,10 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
44
60
|
return null;
|
|
45
61
|
});
|
|
46
62
|
_defineProperty(this, "renderLog", function (r) {
|
|
47
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
63
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)])) return null;
|
|
48
64
|
return /*#__PURE__*/React.createElement(BsSystemOrderTable, {
|
|
49
|
-
value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
65
|
+
value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)],
|
|
66
|
+
type: _this.type
|
|
50
67
|
});
|
|
51
68
|
});
|
|
52
69
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
@@ -62,33 +79,42 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
62
79
|
rules: _this.rules,
|
|
63
80
|
required: false,
|
|
64
81
|
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
|
|
82
|
+
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
83
|
+
onChange: p === null || p === void 0 ? void 0 : p.onChange,
|
|
84
|
+
type: _this.type
|
|
67
85
|
}))
|
|
68
86
|
});
|
|
69
87
|
});
|
|
70
88
|
_defineProperty(this, "filterConfig", function (item) {
|
|
71
|
-
return [
|
|
89
|
+
return [{
|
|
90
|
+
searchDefaultConditions: SYMBOL.like,
|
|
91
|
+
type: item.type,
|
|
92
|
+
id: "".concat(item.id, "_").concat(typeMap[_this.type].key),
|
|
93
|
+
// 过滤组件id
|
|
94
|
+
name: item.name,
|
|
95
|
+
// 过滤组件名称
|
|
96
|
+
filterComponentType: 'Input'
|
|
97
|
+
}];
|
|
72
98
|
});
|
|
73
99
|
this.name = options.name;
|
|
74
100
|
this.id = options.id;
|
|
75
|
-
this.sortField = "".concat(options.id, "
|
|
76
|
-
this.formField = "".concat(options.id, "
|
|
101
|
+
this.sortField = "".concat(options.id, "_").concat(typeMap[options.type].key);
|
|
102
|
+
this.formField = "".concat(options.id, "_").concat(typeMap[options.type].key);
|
|
77
103
|
this.type = options.type;
|
|
78
104
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
79
105
|
this.isCombinationComponent = true;
|
|
80
106
|
this.canSort = false;
|
|
81
107
|
this.children = [new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
82
|
-
name:
|
|
83
|
-
id: "".concat(options.id, "
|
|
108
|
+
name: typeMap[options.type].typeName,
|
|
109
|
+
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billType"),
|
|
84
110
|
width: 150
|
|
85
111
|
})), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
86
|
-
name:
|
|
87
|
-
id: "".concat(options.id, "
|
|
112
|
+
name: '系统订单号',
|
|
113
|
+
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billNo"),
|
|
88
114
|
width: 150
|
|
89
115
|
})), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
90
|
-
name:
|
|
91
|
-
id: "".concat(options.id, "
|
|
116
|
+
name: typeMap[options.type].tagName,
|
|
117
|
+
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billTag"),
|
|
92
118
|
width: 150
|
|
93
119
|
}))];
|
|
94
120
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
@@ -97,11 +123,11 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
97
123
|
validator: function validator(_, value) {
|
|
98
124
|
var _value$selectIds;
|
|
99
125
|
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("
|
|
126
|
+
return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat(typeMap[options.type].name, "\u7CFB\u7EDF\u8BA2\u5355\u53F7")));
|
|
101
127
|
}
|
|
102
128
|
return Promise.resolve();
|
|
103
129
|
}
|
|
104
130
|
}] : [];
|
|
105
|
-
this.dataType =
|
|
131
|
+
this.dataType = 'object';
|
|
106
132
|
});
|
|
107
133
|
export default BsSystemOrder;
|
|
@@ -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;
|