@kmkf-fe-packages/services-components 0.11.0-alpha.5 → 0.11.0-alpha.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/components/BS/common/expressCompany.d.ts +7 -6
- package/dist/esm/components/BS/common/expressCompany.js +15 -13
- package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
- package/dist/esm/components/CommonSystemOrder/index.js +48 -49
- package/dist/esm/components/WLN/WlnGoods/index.js +4 -3
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -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,17 +11,17 @@ 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
19
|
var typeMap = {
|
|
20
20
|
BS_LOGISTICS: {
|
|
21
|
-
key:
|
|
21
|
+
key: "bsLogisticsItem"
|
|
22
22
|
},
|
|
23
23
|
WLN_LOGISTICS: {
|
|
24
|
-
key:
|
|
24
|
+
key: "wlnLogisticsItem"
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
@@ -42,13 +42,14 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
42
42
|
_defineProperty(this, "children", void 0);
|
|
43
43
|
_defineProperty(this, "dataType", void 0);
|
|
44
44
|
_defineProperty(this, "options", void 0);
|
|
45
|
+
_defineProperty(this, "parentName", void 0);
|
|
45
46
|
_defineProperty(this, "renderClient", function () {
|
|
46
47
|
return null;
|
|
47
48
|
});
|
|
48
49
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
49
50
|
var _typeMap$_this$type, _typeMap$_this$type2;
|
|
50
51
|
console.log(_this.type);
|
|
51
|
-
var _this$id$split = _this.id.split(
|
|
52
|
+
var _this$id$split = _this.id.split("_"),
|
|
52
53
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
53
54
|
key = _this$id$split2[0],
|
|
54
55
|
parentKey = _this$id$split2[1],
|
|
@@ -58,7 +59,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
58
59
|
}
|
|
59
60
|
return /*#__PURE__*/React.createElement(BsExpressRender, {
|
|
60
61
|
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:
|
|
62
|
+
showField: "company"
|
|
62
63
|
});
|
|
63
64
|
});
|
|
64
65
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -69,7 +70,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
69
70
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
70
71
|
});
|
|
71
72
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
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)]) ||
|
|
73
|
+
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)]) || "--";
|
|
73
74
|
});
|
|
74
75
|
_defineProperty(this, "editRender", function () {
|
|
75
76
|
return null;
|
|
@@ -80,15 +81,15 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
80
81
|
searchDefaultConditions: SYMBOL.in,
|
|
81
82
|
type: item.type,
|
|
82
83
|
id: "".concat(item.id, "_").concat(subKey),
|
|
83
|
-
name: "".concat(_this.
|
|
84
|
-
filterComponentType:
|
|
84
|
+
name: "".concat(_this.parentName, "\u7269\u6D41\u516C\u53F8"),
|
|
85
|
+
filterComponentType: "MultipleSelect",
|
|
85
86
|
props: {
|
|
86
87
|
options: _this.expressDateInstance.getExpressData() || []
|
|
87
88
|
},
|
|
88
89
|
filterFn: function filterFn(value) {
|
|
89
90
|
return function (i) {
|
|
90
91
|
var _ref;
|
|
91
|
-
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
92
|
+
return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
|
|
92
93
|
var _String;
|
|
93
94
|
var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
94
95
|
return logisticsCompany;
|
|
@@ -104,13 +105,14 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
|
|
|
104
105
|
this.type = options.type;
|
|
105
106
|
this.componentConfig = options.componentConfig;
|
|
106
107
|
this.rules = [];
|
|
107
|
-
this.align =
|
|
108
|
+
this.align = "left";
|
|
108
109
|
this.expressDateInstance = ExpressData.getInstance();
|
|
109
110
|
this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
|
|
110
111
|
this.isCombinationComponent = false;
|
|
111
112
|
this.canSort = false;
|
|
112
113
|
this.children = [];
|
|
113
|
-
this.dataType =
|
|
114
|
+
this.dataType = "string";
|
|
114
115
|
this.options = this.expressDateInstance.getExpressData() || [];
|
|
116
|
+
this.parentName = options === null || options === void 0 ? void 0 : options.parentName;
|
|
115
117
|
});
|
|
116
118
|
export default Express;
|
|
@@ -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 CommonSystemOrder 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;
|
|
@@ -6,42 +6,42 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import some from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import some from "lodash/some";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import { CommonOrderContent } from "../Common";
|
|
13
|
-
import { CommonSystemOrder as SystemOrder } from
|
|
13
|
+
import { CommonSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn } from
|
|
15
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
17
|
var typeMap = {
|
|
18
18
|
BS_DELIVERY_NO: {
|
|
19
|
-
key:
|
|
20
|
-
code:
|
|
21
|
-
name:
|
|
19
|
+
key: "deliveryNoList",
|
|
20
|
+
code: "deliveryNoIds",
|
|
21
|
+
name: "出库单",
|
|
22
22
|
type: 1,
|
|
23
|
-
valueKey:
|
|
23
|
+
valueKey: "deliveryNo"
|
|
24
24
|
},
|
|
25
25
|
RETURN_GOODS_TRADE_ID: {
|
|
26
|
-
key:
|
|
27
|
-
code:
|
|
28
|
-
name:
|
|
26
|
+
key: "returnGoodsTradeItemList",
|
|
27
|
+
code: "returnGoodsTradeIdList",
|
|
28
|
+
name: "退货单id",
|
|
29
29
|
type: 2,
|
|
30
|
-
valueKey:
|
|
30
|
+
valueKey: "returnGoodsTradeId"
|
|
31
31
|
},
|
|
32
32
|
REISSUE_TRADE_ID: {
|
|
33
|
-
key:
|
|
34
|
-
code:
|
|
35
|
-
name:
|
|
33
|
+
key: "tradeItemList",
|
|
34
|
+
code: "tradeIdList",
|
|
35
|
+
name: "补发单id",
|
|
36
36
|
type: 3,
|
|
37
|
-
valueKey:
|
|
37
|
+
valueKey: "billNo"
|
|
38
38
|
},
|
|
39
39
|
EXCHANGE_TRADE_ID: {
|
|
40
|
-
key:
|
|
41
|
-
code:
|
|
42
|
-
name:
|
|
40
|
+
key: "tradeItemList",
|
|
41
|
+
code: "tradeIdList",
|
|
42
|
+
name: "换货单id",
|
|
43
43
|
type: 4,
|
|
44
|
-
valueKey:
|
|
44
|
+
valueKey: "billNo"
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(options) {
|
|
@@ -63,8 +63,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
63
63
|
_defineProperty(this, "children", void 0);
|
|
64
64
|
_defineProperty(this, "dataType", void 0);
|
|
65
65
|
_defineProperty(this, "renderClient", function (record) {
|
|
66
|
-
var _typeMap$_this$type
|
|
67
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)];
|
|
66
|
+
var _typeMap$_this$type;
|
|
68
67
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
69
68
|
return !isNull(item);
|
|
70
69
|
}) : false;
|
|
@@ -73,13 +72,13 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
73
72
|
label: _this.name,
|
|
74
73
|
value: /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
75
74
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
76
|
-
valueKey: (_typeMap$_this$
|
|
75
|
+
valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey
|
|
77
76
|
})
|
|
78
77
|
}) : null;
|
|
79
78
|
});
|
|
80
79
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
81
|
-
var _typeMap$_this$
|
|
82
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
80
|
+
var _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
|
|
81
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
|
|
83
82
|
//兼容多个商品
|
|
84
83
|
return /*#__PURE__*/React.createElement("span", {
|
|
85
84
|
onClick: function onClick(e) {
|
|
@@ -87,30 +86,30 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
87
86
|
}
|
|
88
87
|
}, /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
89
88
|
list: list,
|
|
90
|
-
type: (_typeMap$_this$
|
|
91
|
-
valueKey: (_typeMap$_this$
|
|
89
|
+
type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type,
|
|
90
|
+
valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey
|
|
92
91
|
}));
|
|
93
92
|
});
|
|
94
93
|
_defineProperty(this, "renderLog", function (r) {
|
|
95
|
-
var _typeMap$_this$
|
|
96
|
-
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
94
|
+
var _typeMap$_this$type5;
|
|
95
|
+
var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
|
|
97
96
|
if (isNull(list)) return null;
|
|
98
97
|
return _this.renderPc(undefined, r);
|
|
99
98
|
});
|
|
100
99
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
101
|
-
var _typeMap$_this$
|
|
102
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
100
|
+
var _typeMap$_this$type6;
|
|
101
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
|
|
103
102
|
});
|
|
104
103
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
105
|
-
var _typeMap$_this$
|
|
106
|
-
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$
|
|
104
|
+
var _typeMap$_this$type7;
|
|
105
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
|
|
107
106
|
return (list || []).map(function (item) {
|
|
108
|
-
var _typeMap$_this$
|
|
109
|
-
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
110
|
-
}).join(
|
|
107
|
+
var _typeMap$_this$type8;
|
|
108
|
+
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.valueKey];
|
|
109
|
+
}).join(",");
|
|
111
110
|
});
|
|
112
111
|
_defineProperty(this, "editRender", function (p) {
|
|
113
|
-
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$
|
|
112
|
+
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type9;
|
|
114
113
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
115
114
|
title: _this.name,
|
|
116
115
|
name: _this.id,
|
|
@@ -118,22 +117,22 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
118
117
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
119
118
|
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,
|
|
120
119
|
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
121
|
-
type: (_typeMap$_this$
|
|
120
|
+
type: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.type
|
|
122
121
|
}))
|
|
123
122
|
});
|
|
124
123
|
});
|
|
125
124
|
_defineProperty(this, "filterConfig", function (item) {
|
|
126
|
-
var _typeMap$_this$
|
|
125
|
+
var _typeMap$_this$type10;
|
|
127
126
|
return {
|
|
128
127
|
searchDefaultConditions: SYMBOL.like,
|
|
129
128
|
type: item.type,
|
|
130
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
129
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
|
|
131
130
|
name: "".concat(_this.name),
|
|
132
|
-
filterComponentType:
|
|
131
|
+
filterComponentType: "Input",
|
|
133
132
|
filterFn: function filterFn(value) {
|
|
134
133
|
return function (i) {
|
|
135
|
-
var _typeMap$_this$
|
|
136
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
134
|
+
var _typeMap$_this$type11;
|
|
135
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code), value);
|
|
137
136
|
};
|
|
138
137
|
}
|
|
139
138
|
};
|
|
@@ -147,21 +146,21 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
147
146
|
this.isCombinationComponent = false;
|
|
148
147
|
this.canSort = false;
|
|
149
148
|
this.children = [];
|
|
150
|
-
this.dataType =
|
|
149
|
+
this.dataType = "object";
|
|
151
150
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
152
151
|
required: true,
|
|
153
152
|
validator: function validator(_, value) {
|
|
154
153
|
var hasNo = (value || []).some(function (item) {
|
|
155
|
-
var _typeMap$_this$
|
|
156
|
-
return item[(_typeMap$_this$
|
|
154
|
+
var _typeMap$_this$type12;
|
|
155
|
+
return item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey];
|
|
157
156
|
});
|
|
158
157
|
if (!hasNo) {
|
|
159
|
-
var _typeMap$_this$
|
|
160
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
158
|
+
var _typeMap$_this$type13;
|
|
159
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.name)));
|
|
161
160
|
}
|
|
162
161
|
return Promise.resolve();
|
|
163
162
|
}
|
|
164
163
|
}] : [];
|
|
165
|
-
this.align =
|
|
164
|
+
this.align = "left";
|
|
166
165
|
});
|
|
167
166
|
export default CommonSystemOrder;
|
|
@@ -34,12 +34,12 @@ var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
|
|
|
34
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
35
|
_defineProperty(this, "wlnGoods", void 0);
|
|
36
36
|
_defineProperty(this, "renderClient", function (record) {
|
|
37
|
-
var _this$componentConfig;
|
|
37
|
+
var _record, _this$componentConfig;
|
|
38
38
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
39
39
|
id: _this.id,
|
|
40
40
|
label: _this.name,
|
|
41
41
|
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
42
|
-
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
42
|
+
list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.wlnGoods) || [],
|
|
43
43
|
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
44
44
|
})
|
|
45
45
|
})) : null;
|
|
@@ -106,7 +106,8 @@ var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
|
|
|
106
106
|
this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
107
107
|
required: true,
|
|
108
108
|
validator: function validator(_, value) {
|
|
109
|
-
|
|
109
|
+
var _value$wlnGoods;
|
|
110
|
+
if (!value || !(value !== null && value !== void 0 && (_value$wlnGoods = value.wlnGoods) !== null && _value$wlnGoods !== void 0 && _value$wlnGoods.length)) {
|
|
110
111
|
return Promise.reject(new Error("请选择万里牛商品"));
|
|
111
112
|
}
|
|
112
113
|
return Promise.resolve();
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from './index';
|
|
2
2
|
import { PickOption } from './type';
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | CommonSystemOrder | StatusSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.11.0-alpha.
|
|
3
|
+
"version": "0.11.0-alpha.7",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.11.0-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.11.0-alpha.7",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.7"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3626759bc859606abaf861180734e1e79b4058c9"
|
|
44
44
|
}
|