@kmkf-fe-packages/services-components 0.10.3 → 0.11.0-alpha.1
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 +22 -16
- package/dist/esm/components/Common/index.d.ts +1 -1
- package/dist/esm/components/Common/index.js +131 -128
- package/dist/esm/components/CommonSystemOrder/index.js +26 -25
- package/dist/esm/components/JST/JstSendGood/index.js +6 -0
- package/dist/esm/components/WLN/WlnGoods/index.d.ts +33 -0
- package/dist/esm/components/WLN/WlnGoods/index.js +117 -0
- package/dist/esm/factory.d.ts +3 -3
- package/dist/esm/factory.js +92 -87
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +4 -4
|
@@ -63,8 +63,8 @@ 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
|
-
console.log('record', record
|
|
66
|
+
var _typeMap$_this$type, _typeMap$_this$type2;
|
|
67
|
+
console.log('record', 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)]);
|
|
68
68
|
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
69
|
return !isNull(item);
|
|
70
70
|
}) : false;
|
|
@@ -73,13 +73,14 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
73
73
|
label: _this.name,
|
|
74
74
|
value: /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
75
75
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
76
|
-
valueKey: (_typeMap$_this$
|
|
76
|
+
valueKey: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.valueKey
|
|
77
77
|
})
|
|
78
78
|
}) : null;
|
|
79
79
|
});
|
|
80
80
|
_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$
|
|
81
|
+
var _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5;
|
|
82
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.key)];
|
|
83
|
+
console.log('renderPc', typeMap, list);
|
|
83
84
|
//兼容多个商品
|
|
84
85
|
return /*#__PURE__*/React.createElement("span", {
|
|
85
86
|
onClick: function onClick(e) {
|
|
@@ -87,30 +88,30 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
87
88
|
}
|
|
88
89
|
}, /*#__PURE__*/React.createElement(CommonOrderContent, {
|
|
89
90
|
list: list,
|
|
90
|
-
type: (_typeMap$_this$
|
|
91
|
-
valueKey: (_typeMap$_this$
|
|
91
|
+
type: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.type,
|
|
92
|
+
valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey
|
|
92
93
|
}));
|
|
93
94
|
});
|
|
94
95
|
_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$
|
|
96
|
+
var _typeMap$_this$type6;
|
|
97
|
+
var list = 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)];
|
|
97
98
|
if (isNull(list)) return null;
|
|
98
99
|
return _this.renderPc(undefined, r);
|
|
99
100
|
});
|
|
100
101
|
_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$
|
|
102
|
+
var _typeMap$_this$type7;
|
|
103
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
|
|
103
104
|
});
|
|
104
105
|
_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$
|
|
106
|
+
var _typeMap$_this$type8;
|
|
107
|
+
var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)];
|
|
107
108
|
return (list || []).map(function (item) {
|
|
108
|
-
var _typeMap$_this$
|
|
109
|
-
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$
|
|
109
|
+
var _typeMap$_this$type9;
|
|
110
|
+
return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.valueKey];
|
|
110
111
|
}).join(',');
|
|
111
112
|
});
|
|
112
113
|
_defineProperty(this, "editRender", function (p) {
|
|
113
|
-
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$
|
|
114
|
+
var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type10;
|
|
114
115
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
115
116
|
title: _this.name,
|
|
116
117
|
name: _this.id,
|
|
@@ -118,22 +119,22 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
118
119
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
119
120
|
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
121
|
component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
|
|
121
|
-
type: (_typeMap$_this$
|
|
122
|
+
type: (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.type
|
|
122
123
|
}))
|
|
123
124
|
});
|
|
124
125
|
});
|
|
125
126
|
_defineProperty(this, "filterConfig", function (item) {
|
|
126
|
-
var _typeMap$_this$
|
|
127
|
+
var _typeMap$_this$type11;
|
|
127
128
|
return {
|
|
128
129
|
searchDefaultConditions: SYMBOL.like,
|
|
129
130
|
type: item.type,
|
|
130
|
-
id: "".concat(item.id, "_").concat((_typeMap$_this$
|
|
131
|
+
id: "".concat(item.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code),
|
|
131
132
|
name: "".concat(_this.name),
|
|
132
133
|
filterComponentType: 'Input',
|
|
133
134
|
filterFn: function filterFn(value) {
|
|
134
135
|
return function (i) {
|
|
135
|
-
var _typeMap$_this$
|
|
136
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$
|
|
136
|
+
var _typeMap$_this$type12;
|
|
137
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.code), value);
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
140
|
};
|
|
@@ -152,12 +153,12 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
|
|
|
152
153
|
required: true,
|
|
153
154
|
validator: function validator(_, value) {
|
|
154
155
|
var hasNo = (value || []).some(function (item) {
|
|
155
|
-
var _typeMap$_this$
|
|
156
|
-
return item[(_typeMap$_this$
|
|
156
|
+
var _typeMap$_this$type13;
|
|
157
|
+
return item[(_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.valueKey];
|
|
157
158
|
});
|
|
158
159
|
if (!hasNo) {
|
|
159
|
-
var _typeMap$_this$
|
|
160
|
-
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$
|
|
160
|
+
var _typeMap$_this$type14;
|
|
161
|
+
return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.name)));
|
|
161
162
|
}
|
|
162
163
|
return Promise.resolve();
|
|
163
164
|
}
|
|
@@ -26,6 +26,12 @@ var typeMap = {
|
|
|
26
26
|
name: "bs",
|
|
27
27
|
sendId: "bsSendId",
|
|
28
28
|
sendName: "bsSendName"
|
|
29
|
+
},
|
|
30
|
+
WLN_SEND_GOOD: {
|
|
31
|
+
key: "wlnSendGood",
|
|
32
|
+
name: "wln",
|
|
33
|
+
sendId: "wlnSendId",
|
|
34
|
+
sendName: "wlnSendName"
|
|
29
35
|
}
|
|
30
36
|
};
|
|
31
37
|
var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(options) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsHeaderGood } from "../../BS/common/index";
|
|
4
|
+
declare class WlnGoods implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
isCombinationComponent: boolean;
|
|
13
|
+
formField: string;
|
|
14
|
+
canSort: boolean;
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
|
+
wlnGoods: BsHeaderGood;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: () => null;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
22
|
+
getComponentValue: (r: Record) => any;
|
|
23
|
+
renderExport: () => null;
|
|
24
|
+
editRender: (p: any) => React.JSX.Element;
|
|
25
|
+
filterConfig: (item: ColumnConfig) => {
|
|
26
|
+
searchDefaultConditions: "like";
|
|
27
|
+
type: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
filterComponentType: "Input";
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export default WlnGoods;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 "react";
|
|
12
|
+
import GetFormItem from "../../GetFormItem";
|
|
13
|
+
import { BsGoodsTable } from "../../Common";
|
|
14
|
+
import { BsHeaderGood } from "../../BS/common/index";
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { WlnGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { SYMBOL } from "../../../constant";
|
|
19
|
+
var WlnGoods = /*#__PURE__*/_createClass(function WlnGoods(options) {
|
|
20
|
+
var _this = this,
|
|
21
|
+
_this$componentConfig4;
|
|
22
|
+
_classCallCheck(this, WlnGoods);
|
|
23
|
+
_defineProperty(this, "name", void 0);
|
|
24
|
+
_defineProperty(this, "id", void 0);
|
|
25
|
+
_defineProperty(this, "sortField", void 0);
|
|
26
|
+
_defineProperty(this, "type", void 0);
|
|
27
|
+
_defineProperty(this, "rules", void 0);
|
|
28
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "effects", void 0);
|
|
30
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
31
|
+
_defineProperty(this, "formField", void 0);
|
|
32
|
+
_defineProperty(this, "canSort", void 0);
|
|
33
|
+
_defineProperty(this, "children", void 0);
|
|
34
|
+
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "wlnGoods", void 0);
|
|
36
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
37
|
+
var _this$componentConfig;
|
|
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
|
+
id: _this.id,
|
|
40
|
+
label: _this.name,
|
|
41
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
42
|
+
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
43
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
44
|
+
})
|
|
45
|
+
})) : null;
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderPc", function () {
|
|
48
|
+
return null;
|
|
49
|
+
});
|
|
50
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
51
|
+
var _this$componentConfig2;
|
|
52
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wlnGoods")])) return null;
|
|
53
|
+
return /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
54
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wlnGoods")]) || [],
|
|
55
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
59
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wlnGoods")];
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "renderExport", function () {
|
|
62
|
+
return null;
|
|
63
|
+
});
|
|
64
|
+
_defineProperty(this, "editRender", function (p) {
|
|
65
|
+
var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
|
|
66
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
67
|
+
title: _this.name,
|
|
68
|
+
name: _this.id,
|
|
69
|
+
rules: _this.rules,
|
|
70
|
+
required: false,
|
|
71
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
72
|
+
component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
|
|
73
|
+
maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
|
|
74
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
75
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
76
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
77
|
+
width: "90%"
|
|
78
|
+
}))
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
82
|
+
return [{
|
|
83
|
+
searchDefaultConditions: SYMBOL.like,
|
|
84
|
+
type: item.type,
|
|
85
|
+
id: "".concat(item.id, "_wlnGoods"),
|
|
86
|
+
// 过滤组件id
|
|
87
|
+
name: item.name,
|
|
88
|
+
// 过滤组件名称
|
|
89
|
+
filterComponentType: "Input"
|
|
90
|
+
}];
|
|
91
|
+
});
|
|
92
|
+
this.name = options.name;
|
|
93
|
+
this.id = options.id;
|
|
94
|
+
this.sortField = "".concat(options.id, "_wlnGoods");
|
|
95
|
+
this.formField = "".concat(options.id, "_wlnGoods");
|
|
96
|
+
this.type = options.type;
|
|
97
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
98
|
+
this.isCombinationComponent = true;
|
|
99
|
+
this.canSort = false;
|
|
100
|
+
this.wlnGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
101
|
+
id: "".concat(options.id, "_wlnGoods"),
|
|
102
|
+
name: "商品信息"
|
|
103
|
+
}));
|
|
104
|
+
this.children = [this.wlnGoods];
|
|
105
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
106
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
107
|
+
required: true,
|
|
108
|
+
validator: function validator(_, value) {
|
|
109
|
+
if (!(value !== null && value !== void 0 && value.length)) {
|
|
110
|
+
return Promise.reject(new Error("请选择万里牛商品"));
|
|
111
|
+
}
|
|
112
|
+
return Promise.resolve();
|
|
113
|
+
}
|
|
114
|
+
}] : [];
|
|
115
|
+
this.dataType = "object";
|
|
116
|
+
});
|
|
117
|
+
export default WlnGoods;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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 } from
|
|
2
|
-
import { PickOption } from
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
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
|
+
import { PickOption } from "./type";
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsGoods | BsLogistics | CommonSystemOrder | JstSendGood | WlnGoods | 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 | JstSupply | BsSystemOrder | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,168 +1,173 @@
|
|
|
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,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration } from "./index";
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
7
|
-
case
|
|
7
|
+
case "PLATFORM_INPUT":
|
|
8
8
|
return new PlatForm();
|
|
9
|
-
case
|
|
9
|
+
case "SHOP_INPUT":
|
|
10
10
|
return new ShopInput(options);
|
|
11
|
-
case
|
|
11
|
+
case "OPERATOR_INPUT":
|
|
12
12
|
return new Submitter(options);
|
|
13
|
-
case
|
|
13
|
+
case "HANDLER_INPUT":
|
|
14
14
|
return new Handler(options);
|
|
15
|
-
case
|
|
15
|
+
case "COMPLETED_USER_INPUT":
|
|
16
16
|
return new CompletedUser(options);
|
|
17
|
-
case
|
|
17
|
+
case "INPUT":
|
|
18
18
|
return new BasicInput(options);
|
|
19
|
-
case
|
|
19
|
+
case "RADIO":
|
|
20
20
|
return new BasicRadio(options);
|
|
21
|
-
case
|
|
21
|
+
case "TEXTAREA":
|
|
22
22
|
return new BasicTextArea(options);
|
|
23
|
-
case
|
|
23
|
+
case "CHECKBOX":
|
|
24
24
|
return new BasicCheckbox(options);
|
|
25
|
-
case
|
|
25
|
+
case "DATETIME":
|
|
26
26
|
return new BasicDataTime(options);
|
|
27
|
-
case
|
|
28
|
-
case
|
|
27
|
+
case "SELECT":
|
|
28
|
+
case "BUYER_MESSAGE_NOTICE":
|
|
29
29
|
return new BasicSelect(options);
|
|
30
|
-
case
|
|
30
|
+
case "PICTURE":
|
|
31
31
|
return new BasicPicture(options);
|
|
32
|
-
case
|
|
32
|
+
case "BASIC_MULT_SELECT":
|
|
33
33
|
return new BasicMultSelect(options);
|
|
34
|
-
case
|
|
34
|
+
case "MULT_SELECT":
|
|
35
35
|
return new BasicCascader(options);
|
|
36
|
-
case
|
|
36
|
+
case "BASIC_ADDRESS":
|
|
37
37
|
return new BasicAddress(options);
|
|
38
|
-
case
|
|
38
|
+
case "BASIC_GRADE":
|
|
39
39
|
return new BasicGrade(options);
|
|
40
|
-
case
|
|
40
|
+
case "RATE":
|
|
41
41
|
return new BasicRate(options);
|
|
42
|
-
case
|
|
42
|
+
case "FILE":
|
|
43
43
|
return new BasicFile(options);
|
|
44
|
-
case
|
|
44
|
+
case "POSTING":
|
|
45
45
|
return new BasicPosting(options);
|
|
46
|
-
case
|
|
46
|
+
case "SHOP_NAME_INPUT":
|
|
47
47
|
return new ShopName(options);
|
|
48
|
-
case
|
|
48
|
+
case "TRADE_ID_INPUT":
|
|
49
49
|
return options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.erpFlag ? new ErpTradeId(options) : new TradeId(options);
|
|
50
|
-
case
|
|
50
|
+
case "BUYER_NICK_INPUT":
|
|
51
51
|
return new BuyerNick(options);
|
|
52
|
-
case
|
|
52
|
+
case "RECEIVER_NAME_INPUT":
|
|
53
53
|
return new ReceiverName(options);
|
|
54
|
-
case
|
|
54
|
+
case "RECEIVER_MOBILE_INPUT":
|
|
55
55
|
return new ReceiverMobile(options);
|
|
56
|
-
case
|
|
56
|
+
case "RECEIVER_ADDRESS_INPUT":
|
|
57
57
|
return new ReceiverAddress(options);
|
|
58
|
-
case
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
62
|
-
case
|
|
63
|
-
case
|
|
64
|
-
case
|
|
58
|
+
case "TRADE_CREATE_DATETIME":
|
|
59
|
+
case "TRADE_PAYMENT_DATETIME":
|
|
60
|
+
case "TRADE_DELIVERY_DATETIME":
|
|
61
|
+
case "TRADE_CLOSING_DATETIME":
|
|
62
|
+
case "BS_SIGNING_TIME":
|
|
63
|
+
case "BS_SEND_TIME":
|
|
64
|
+
case "BS_TRADE_PAYMENT_TIME":
|
|
65
65
|
return new TradeDateTime(options);
|
|
66
|
-
case
|
|
66
|
+
case "EXPRESS_LOGISTICS_SELECT":
|
|
67
67
|
return new Logistics(options);
|
|
68
|
-
case
|
|
68
|
+
case "RETURN_LOGISTICS_SELECT":
|
|
69
69
|
return new ReturnLogistics(options);
|
|
70
|
-
case
|
|
71
|
-
case
|
|
72
|
-
case
|
|
73
|
-
case
|
|
70
|
+
case "ACTUAL_PAYMENT":
|
|
71
|
+
case "BS_NET_RECEIPTS":
|
|
72
|
+
case "BS_DEPOSIT":
|
|
73
|
+
case "BS_PACKAGE_WEIGHT":
|
|
74
74
|
return new ActualPayment(options);
|
|
75
|
-
case
|
|
75
|
+
case "REMARK_INPUT":
|
|
76
76
|
return new ERemark(options);
|
|
77
|
-
case
|
|
77
|
+
case "ITEM_SELECT":
|
|
78
78
|
return new ItemSelect(options);
|
|
79
|
-
case
|
|
79
|
+
case "ITEM_ID":
|
|
80
80
|
return new ItemId(options);
|
|
81
|
-
case
|
|
81
|
+
case "ITEM_ENCODE":
|
|
82
82
|
return new ItemEnCode(options);
|
|
83
|
-
case
|
|
83
|
+
case "ALI_PAY_INPUT":
|
|
84
84
|
return new AliPay(options);
|
|
85
|
-
case
|
|
85
|
+
case "ORDINARY_INVOICE":
|
|
86
86
|
return new Ordinary(options);
|
|
87
|
-
case
|
|
87
|
+
case "ITEM_SELECT_THIRD":
|
|
88
88
|
return new ThirdItemSelect(options);
|
|
89
|
-
case
|
|
89
|
+
case "ENTERPRISE_PAYMENT":
|
|
90
90
|
return new Payment(options);
|
|
91
|
-
case
|
|
91
|
+
case "SYSTEM_ORDER_NO":
|
|
92
92
|
return new SystemOrderNo(options);
|
|
93
|
-
case
|
|
93
|
+
case "LOGISTICS_INTERCEPTION":
|
|
94
94
|
return new LogisticsInterception(options);
|
|
95
|
-
case
|
|
95
|
+
case "LOGISTICS_TRAJECTORY":
|
|
96
96
|
return new LogisticsTrajectory(options);
|
|
97
|
-
case
|
|
97
|
+
case "WORK_ORDER_ID_INPUT":
|
|
98
98
|
return new WorkOrderId(options);
|
|
99
|
-
case
|
|
99
|
+
case "FLOW_STATUS_SELECT":
|
|
100
100
|
return new FlowStatusSelect(options);
|
|
101
|
-
case
|
|
101
|
+
case "FLOW_MARK_SELECT":
|
|
102
102
|
return new FlowMarkSelect(options);
|
|
103
|
-
case
|
|
103
|
+
case "COMPLETED_DATETIME":
|
|
104
104
|
return new CommonDataTime(options);
|
|
105
|
-
case
|
|
105
|
+
case "CREATED_DATETIME":
|
|
106
106
|
return new CommonDataTime(options);
|
|
107
|
-
case
|
|
107
|
+
case "UPDATE_DATETIME":
|
|
108
108
|
return new CommonDataTime(options);
|
|
109
|
-
case
|
|
109
|
+
case "TEMPLATE_ID_INPUT":
|
|
110
110
|
return new TemplateSelect(options);
|
|
111
|
-
case
|
|
112
|
-
case
|
|
111
|
+
case "JST_LOGISTICS":
|
|
112
|
+
case "REISSUE_LOGISTICS":
|
|
113
113
|
return new JstLogistics(options);
|
|
114
|
-
case
|
|
114
|
+
case "JST_ITEM_SELECT_THIRD":
|
|
115
115
|
return new JstItemSelect(options);
|
|
116
|
-
case
|
|
116
|
+
case "JST_SUPPLY":
|
|
117
117
|
return new JstSupply(options);
|
|
118
|
-
case
|
|
118
|
+
case "BS_SYSTEM_ORDER":
|
|
119
119
|
return new BsSystemOrder(options);
|
|
120
|
-
case
|
|
121
|
-
case
|
|
120
|
+
case "JST_SEND_GOOD":
|
|
121
|
+
case "BS_SEND_GOOD":
|
|
122
|
+
case "WLN_SEND_GOOD":
|
|
122
123
|
return new JstSendGood(options);
|
|
123
|
-
case
|
|
124
|
+
case "BS_POSTING":
|
|
124
125
|
return new BasicPosting(options);
|
|
125
|
-
case
|
|
126
|
+
case "BS_GOODS":
|
|
126
127
|
return new BsGoods(options);
|
|
127
|
-
case
|
|
128
|
+
case "BS_EXCHANGE_GOODS":
|
|
128
129
|
return new BsExchange(options);
|
|
129
|
-
case
|
|
130
|
+
case "BS_REISSUE_GOODS":
|
|
130
131
|
return new BsReissue(options);
|
|
131
|
-
case
|
|
132
|
+
case "BS_RETURN_GOODS":
|
|
132
133
|
return new BsReturn(options);
|
|
133
|
-
case
|
|
134
|
-
case
|
|
135
|
-
case
|
|
136
|
-
case
|
|
134
|
+
case "BS_DELIVERY_NO":
|
|
135
|
+
case "RETURN_GOODS_TRADE_ID":
|
|
136
|
+
case "REISSUE_TRADE_ID":
|
|
137
|
+
case "EXCHANGE_TRADE_ID":
|
|
137
138
|
return new CommonSystemOrder(options);
|
|
138
|
-
case
|
|
139
|
+
case "BS_LOGISTICS":
|
|
140
|
+
case "WLN_LOGISTICS":
|
|
139
141
|
return new BsLogistics(options);
|
|
140
|
-
case
|
|
142
|
+
case "FLOW_WORK_ORDER_ID_INPUT":
|
|
141
143
|
return new FlowWorkOrderId(options);
|
|
142
|
-
case
|
|
144
|
+
case "OUTER_WORK_ORDER_ID_INPUT":
|
|
143
145
|
return new FlowWorkOrderId(options);
|
|
144
|
-
case
|
|
145
|
-
case
|
|
146
|
-
case
|
|
147
|
-
case
|
|
148
|
-
case
|
|
146
|
+
case "REISSUE_STATUS":
|
|
147
|
+
case "EXCHANGE_STATUS":
|
|
148
|
+
case "ADJUST_WORK_ORDER_STATUS":
|
|
149
|
+
case "CREATE_STATUS":
|
|
150
|
+
case "INVOICE_STATUS":
|
|
149
151
|
return new StatusSelect(options);
|
|
150
|
-
case
|
|
152
|
+
case "RETURN_GOODS_STATUS":
|
|
151
153
|
return new CommonMultiStatus(options);
|
|
152
154
|
// case 'REISSUE_TRADE_ID':
|
|
153
155
|
// case 'EXCHANGE_TRADE_ID':
|
|
154
156
|
// return new CommonTradeId(options)
|
|
155
|
-
case
|
|
157
|
+
case "NUMERICAL_CALCULATION":
|
|
156
158
|
return new Calculation(options);
|
|
157
|
-
case
|
|
159
|
+
case "NODE_DEAD_LINE_INPUT":
|
|
158
160
|
// 工单时效
|
|
159
161
|
return new NodeDeadLine(options);
|
|
160
|
-
case
|
|
162
|
+
case "HANDLER_DEAD_LINE_INPUT":
|
|
161
163
|
// 处理人时效
|
|
162
164
|
return new HandlerDeadLine(options);
|
|
163
|
-
case
|
|
165
|
+
case "NODE_STAY_DURATION_INPUT":
|
|
164
166
|
// 工单停留时长
|
|
165
167
|
return new NodeStayDuration(options);
|
|
168
|
+
case "WLN_GOODS":
|
|
169
|
+
// 万里牛商品
|
|
170
|
+
return new WlnGoods(options);
|
|
166
171
|
default:
|
|
167
172
|
return new BasicInput(options);
|
|
168
173
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export { default as CommonMultiStatus } from "./components/CommonMultiStatus";
|
|
|
63
63
|
export { default as NodeDeadLine } from "./components/NodeDeadLine";
|
|
64
64
|
export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
65
65
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
66
|
+
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
66
67
|
export { factory } from "./factory";
|
|
67
68
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
68
69
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/dist/esm/index.js
CHANGED
|
@@ -63,6 +63,7 @@ export { default as CommonMultiStatus } from "./components/CommonMultiStatus";
|
|
|
63
63
|
export { default as NodeDeadLine } from "./components/NodeDeadLine";
|
|
64
64
|
export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
65
65
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
66
|
+
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
66
67
|
export { factory } from "./factory";
|
|
67
68
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
68
69
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-alpha.1",
|
|
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.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.11.0-alpha.0",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.0"
|
|
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": "614c71916a44ee220c0cb036bb401aa2c3224e8f"
|
|
44
44
|
}
|