@kmkf-fe-packages/services-components 0.26.0-alpha.0 → 0.26.0-alpha.3
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.js +10 -6
- package/dist/esm/components/BS/BsReissue/index.d.ts +9 -9
- package/dist/esm/components/BS/BsReissue/index.js +64 -34
- package/dist/esm/components/BS/BsSystemOrder/index.js +7 -0
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +16 -15
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +14 -13
- package/dist/esm/components/BS/common/expressCode.js +4 -1
- package/dist/esm/components/BS/common/expressCompany.js +4 -1
- package/dist/esm/components/Common/index.d.ts +1 -7
- package/dist/esm/components/Common/index.js +300 -182
- package/dist/esm/components/CommonHeaderGood/index.d.ts +27 -0
- package/dist/esm/components/CommonHeaderGood/index.js +193 -0
- package/dist/esm/components/EItemEnCode/index.js +3 -2
- package/dist/esm/components/JST/JstSendGood/index.js +6 -0
- package/dist/esm/components/PostIng/index.js +7 -2
- package/dist/esm/components/WDT/WdtGoods/index.d.ts +33 -0
- package/dist/esm/components/WDT/WdtGoods/index.js +121 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +13 -6
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,193 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
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); } }
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
import React from "react";
|
|
21
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
22
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
|
+
import { BsHeaderPic, BsHeaderChild } from "../BS/common";
|
|
24
|
+
var GoodHeaderMap = {
|
|
25
|
+
"WDT_GOODS": {
|
|
26
|
+
headerMap: {
|
|
27
|
+
goodId: {
|
|
28
|
+
component: BsHeaderChild,
|
|
29
|
+
name: "SPUID",
|
|
30
|
+
key: "goodId",
|
|
31
|
+
width: 140
|
|
32
|
+
},
|
|
33
|
+
goodNo: {
|
|
34
|
+
component: BsHeaderChild,
|
|
35
|
+
name: "商品SPU编码",
|
|
36
|
+
key: "goodNo",
|
|
37
|
+
width: 180
|
|
38
|
+
},
|
|
39
|
+
imgUrl: {
|
|
40
|
+
component: BsHeaderPic,
|
|
41
|
+
name: "图片",
|
|
42
|
+
key: "imgUrl",
|
|
43
|
+
width: 70
|
|
44
|
+
},
|
|
45
|
+
goodName: {
|
|
46
|
+
component: BsHeaderChild,
|
|
47
|
+
name: "商品名称",
|
|
48
|
+
key: "goodName",
|
|
49
|
+
width: 100
|
|
50
|
+
},
|
|
51
|
+
specId: {
|
|
52
|
+
component: BsHeaderChild,
|
|
53
|
+
name: "SKUID",
|
|
54
|
+
key: "specId",
|
|
55
|
+
width: 200
|
|
56
|
+
},
|
|
57
|
+
specNo: {
|
|
58
|
+
component: BsHeaderChild,
|
|
59
|
+
name: "商品SKU编码",
|
|
60
|
+
key: "specNo",
|
|
61
|
+
width: 180
|
|
62
|
+
},
|
|
63
|
+
specName: {
|
|
64
|
+
component: BsHeaderChild,
|
|
65
|
+
name: "商品SKU名称",
|
|
66
|
+
key: "specName",
|
|
67
|
+
width: 140
|
|
68
|
+
},
|
|
69
|
+
orderPrice: {
|
|
70
|
+
component: BsHeaderChild,
|
|
71
|
+
name: "实付总金额",
|
|
72
|
+
key: "orderPrice",
|
|
73
|
+
width: 100
|
|
74
|
+
},
|
|
75
|
+
num: {
|
|
76
|
+
component: BsHeaderChild,
|
|
77
|
+
name: "数量",
|
|
78
|
+
key: "num",
|
|
79
|
+
width: 100
|
|
80
|
+
},
|
|
81
|
+
sharePrice: {
|
|
82
|
+
component: BsHeaderChild,
|
|
83
|
+
name: "分摊价",
|
|
84
|
+
key: "sharePrice",
|
|
85
|
+
width: 120
|
|
86
|
+
},
|
|
87
|
+
giftType: {
|
|
88
|
+
component: BsHeaderChild,
|
|
89
|
+
name: "赠品方式",
|
|
90
|
+
key: "giftType",
|
|
91
|
+
width: 150
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
itemKey: {
|
|
95
|
+
goodId: "SPUID",
|
|
96
|
+
goodNo: "商品SPU编码",
|
|
97
|
+
goodName: "商品名称",
|
|
98
|
+
specId: "SKUID",
|
|
99
|
+
specNo: "商品SKU编码",
|
|
100
|
+
specName: "商品SKU名称",
|
|
101
|
+
orderPrice: "实付总金额",
|
|
102
|
+
num: "数量",
|
|
103
|
+
sharePrice: "分摊价",
|
|
104
|
+
giftType: "赠品方式"
|
|
105
|
+
},
|
|
106
|
+
moneyKey: "orderPrice"
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
GoodHeaderMap['WDT_REISSUE_GOODS'] = GoodHeaderMap['WDT_GOODS'];
|
|
110
|
+
var CommonHeaderGoods = /*#__PURE__*/_createClass(function CommonHeaderGoods(options) {
|
|
111
|
+
var _this = this,
|
|
112
|
+
_GoodHeaderMap$this$t;
|
|
113
|
+
_classCallCheck(this, CommonHeaderGoods);
|
|
114
|
+
_defineProperty(this, "name", void 0);
|
|
115
|
+
_defineProperty(this, "id", void 0);
|
|
116
|
+
_defineProperty(this, "sortField", void 0);
|
|
117
|
+
_defineProperty(this, "type", void 0);
|
|
118
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
119
|
+
_defineProperty(this, "align", void 0);
|
|
120
|
+
_defineProperty(this, "width", void 0);
|
|
121
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
122
|
+
_defineProperty(this, "formField", void 0);
|
|
123
|
+
_defineProperty(this, "canSort", void 0);
|
|
124
|
+
_defineProperty(this, "children", void 0);
|
|
125
|
+
_defineProperty(this, "dataType", void 0);
|
|
126
|
+
_defineProperty(this, "itemKey", void 0);
|
|
127
|
+
_defineProperty(this, "getParentId", function () {
|
|
128
|
+
var _this$id$split = _this.id.split("_"),
|
|
129
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
130
|
+
key = _this$id$split2[0],
|
|
131
|
+
name = _this$id$split2[1],
|
|
132
|
+
code = _this$id$split2[2];
|
|
133
|
+
return "".concat(key, "_").concat(name);
|
|
134
|
+
});
|
|
135
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
136
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
137
|
+
id: _this.id,
|
|
138
|
+
label: _this.name,
|
|
139
|
+
value: _this.getComponentValue(record)
|
|
140
|
+
}) : null;
|
|
141
|
+
});
|
|
142
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
143
|
+
var _this$getComponentVal;
|
|
144
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
145
|
+
});
|
|
146
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
147
|
+
var id = _this.getParentId();
|
|
148
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
149
|
+
return _this.renderPc(undefined, r);
|
|
150
|
+
});
|
|
151
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
152
|
+
var id = _this.getParentId();
|
|
153
|
+
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
154
|
+
next[GoodHeaderMap[_this.type].moneyKey] && prv.push(next[GoodHeaderMap[_this.type].moneyKey]);
|
|
155
|
+
return prv;
|
|
156
|
+
}, []);
|
|
157
|
+
return list.join(",");
|
|
158
|
+
});
|
|
159
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
160
|
+
var _this$getComponentVal2;
|
|
161
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
162
|
+
});
|
|
163
|
+
_defineProperty(this, "editRender", function () {
|
|
164
|
+
return null;
|
|
165
|
+
});
|
|
166
|
+
_defineProperty(this, "filterConfig", function () {
|
|
167
|
+
return [];
|
|
168
|
+
});
|
|
169
|
+
this.name = options.name;
|
|
170
|
+
this.id = options.id;
|
|
171
|
+
this.sortField = options.id;
|
|
172
|
+
this.formField = options.id;
|
|
173
|
+
this.type = options.type;
|
|
174
|
+
this.componentConfig = options.componentConfig;
|
|
175
|
+
this.align = "left";
|
|
176
|
+
this.width = 200;
|
|
177
|
+
this.isCombinationComponent = true;
|
|
178
|
+
this.canSort = false;
|
|
179
|
+
this.dataType = "string";
|
|
180
|
+
this.itemKey = (_GoodHeaderMap$this$t = GoodHeaderMap[this.type]) === null || _GoodHeaderMap$this$t === void 0 ? void 0 : _GoodHeaderMap$this$t.itemKey;
|
|
181
|
+
this.children = _toConsumableArray(Object.keys(GoodHeaderMap[this.type].headerMap).reduce(function (prv, key) {
|
|
182
|
+
var _options$componentCon, _options$componentCon2;
|
|
183
|
+
if (options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.showHeader) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes(key)) {
|
|
184
|
+
prv.push(new GoodHeaderMap[_this.type].headerMap[key].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
185
|
+
name: _this.itemKey[key],
|
|
186
|
+
id: "".concat(options.id, "_").concat(GoodHeaderMap[_this.type].headerMap[key].key),
|
|
187
|
+
width: GoodHeaderMap[_this.type].headerMap[key].width
|
|
188
|
+
})));
|
|
189
|
+
}
|
|
190
|
+
return prv;
|
|
191
|
+
}, []));
|
|
192
|
+
});
|
|
193
|
+
export default CommonHeaderGoods;
|
|
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
11
|
import React from "react";
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
13
|
import ItemEncode from "./ItemEncode";
|
|
14
|
-
import { GoodImage,
|
|
14
|
+
import { GoodImage, BsGoodsTable } from "../Common";
|
|
15
15
|
import { BsHeaderGood } from "../BS/common/index";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
17
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
@@ -52,7 +52,8 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
52
52
|
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
53
53
|
id: _this.id,
|
|
54
54
|
label: _this.name,
|
|
55
|
-
value: /*#__PURE__*/React.createElement(
|
|
55
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
56
|
+
type: _this.type,
|
|
56
57
|
list: (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [],
|
|
57
58
|
showHeader: _this.showHeader
|
|
58
59
|
})
|
|
@@ -32,6 +32,12 @@ var typeMap = {
|
|
|
32
32
|
name: "wln",
|
|
33
33
|
sendId: "wlnSendId",
|
|
34
34
|
sendName: "wlnSendName"
|
|
35
|
+
},
|
|
36
|
+
WDT_SEND_GOOD: {
|
|
37
|
+
key: "wdtSendGood",
|
|
38
|
+
name: "wdt",
|
|
39
|
+
sendId: "wdtSendId",
|
|
40
|
+
sendName: "wdtSendName"
|
|
35
41
|
}
|
|
36
42
|
};
|
|
37
43
|
var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
@@ -13,7 +13,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
|
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
15
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
-
import { AddressData, BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { AddressData, BsAddressData, WdtAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
import Province from "../BS/BsPosting/components/Province";
|
|
18
18
|
import City from "../BS/BsPosting/components//City";
|
|
19
19
|
import District from "../BS/BsPosting/components//District";
|
|
@@ -187,7 +187,12 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
|
|
|
187
187
|
this.isCombinationComponent = this.isSplitColumns;
|
|
188
188
|
this.canSort = false;
|
|
189
189
|
this.dataType = "string";
|
|
190
|
-
|
|
190
|
+
var showField = (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField;
|
|
191
|
+
this.addressDateInstance = (showField && {
|
|
192
|
+
bs: BsAddressData,
|
|
193
|
+
wdt: WdtAddressData,
|
|
194
|
+
workOrder: AddressData
|
|
195
|
+
}[showField] || AddressData).getInstance();
|
|
191
196
|
this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
|
|
192
197
|
id: "".concat(options.id, "_postingProvince"),
|
|
193
198
|
name: "省",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
4
|
+
declare class WdtGoods 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
|
+
wdtGoods: CommonHeaderGoods;
|
|
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 WdtGoods;
|
|
@@ -0,0 +1,121 @@
|
|
|
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 CommonHeaderGoods from "../../CommonHeaderGood";
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { SYMBOL } from "../../../constant";
|
|
19
|
+
var WdtGoods = /*#__PURE__*/_createClass(function WdtGoods(options) {
|
|
20
|
+
var _this = this,
|
|
21
|
+
_this$componentConfig4;
|
|
22
|
+
_classCallCheck(this, WdtGoods);
|
|
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, "wdtGoods", void 0);
|
|
36
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
37
|
+
var _record, _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
|
+
type: _this.type,
|
|
43
|
+
list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.wdtGoods) || [],
|
|
44
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
45
|
+
})
|
|
46
|
+
})) : null;
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderPc", function () {
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
+
var _this$componentConfig2;
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtGoods")])) return null;
|
|
54
|
+
return /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
55
|
+
type: _this.type,
|
|
56
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtGoods")]) || [],
|
|
57
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
61
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtGoods")];
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "renderExport", function () {
|
|
64
|
+
return null;
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "editRender", function (p) {
|
|
67
|
+
var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
|
|
68
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
69
|
+
title: _this.name,
|
|
70
|
+
name: _this.id,
|
|
71
|
+
rules: _this.rules,
|
|
72
|
+
required: false,
|
|
73
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
74
|
+
component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
|
|
75
|
+
maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
|
|
76
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
77
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
78
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
79
|
+
type: _this.type,
|
|
80
|
+
width: "90%"
|
|
81
|
+
}))
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
85
|
+
return [{
|
|
86
|
+
searchDefaultConditions: SYMBOL.like,
|
|
87
|
+
type: item.type,
|
|
88
|
+
id: "".concat(item.id, "_wdtGoods"),
|
|
89
|
+
// 过滤组件id
|
|
90
|
+
name: item.name,
|
|
91
|
+
// 过滤组件名称
|
|
92
|
+
filterComponentType: "Input"
|
|
93
|
+
}];
|
|
94
|
+
});
|
|
95
|
+
this.name = options.name;
|
|
96
|
+
this.id = options.id;
|
|
97
|
+
this.sortField = "".concat(options.id, "_wdtGoods");
|
|
98
|
+
this.formField = "".concat(options.id, "_wdtGoods");
|
|
99
|
+
this.type = options.type;
|
|
100
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
101
|
+
this.isCombinationComponent = true;
|
|
102
|
+
this.canSort = false;
|
|
103
|
+
this.wdtGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
|
|
104
|
+
id: "".concat(options.id, "_wdtGoods"),
|
|
105
|
+
name: "商品信息"
|
|
106
|
+
}));
|
|
107
|
+
this.children = [this.wdtGoods];
|
|
108
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
109
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
110
|
+
required: true,
|
|
111
|
+
validator: function validator(_, value) {
|
|
112
|
+
var _value$wdtGoods;
|
|
113
|
+
if (!value || !(value !== null && value !== void 0 && (_value$wdtGoods = value.wdtGoods) !== null && _value$wdtGoods !== void 0 && _value$wdtGoods.length)) {
|
|
114
|
+
return Promise.reject(new Error("请选择旺店通商品"));
|
|
115
|
+
}
|
|
116
|
+
return Promise.resolve();
|
|
117
|
+
}
|
|
118
|
+
}] : [];
|
|
119
|
+
this.dataType = "object";
|
|
120
|
+
});
|
|
121
|
+
export default WdtGoods;
|
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, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } from "./index";
|
|
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, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, WdtGoods } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonMultiStatus | CommonSystemOrder |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | BasicGrade | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | Ordinary | Payment | BasicPicture | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopName | StatusSelect | SystemOrderNo | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WdtGoods | WlnGoods | WorkOrderId | CommonDataTime | TemplateSelect | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | NodeDeadLine | HandlerDeadLine | NodeStayDuration;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } from "./index";
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, WdtGoods } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -125,10 +125,12 @@ export var factory = function factory(type, options) {
|
|
|
125
125
|
return new JstSupply(options);
|
|
126
126
|
case "BS_SYSTEM_ORDER":
|
|
127
127
|
case "WLN_SYSTEM_ORDER":
|
|
128
|
+
case "WDT_SYSTEM_ORDER":
|
|
128
129
|
return new BsSystemOrder(options);
|
|
129
130
|
case "JST_SEND_GOOD":
|
|
130
131
|
case "BS_SEND_GOOD":
|
|
131
132
|
case "WLN_SEND_GOOD":
|
|
133
|
+
case "WDT_SEND_GOOD":
|
|
132
134
|
return new JstSendGood(options);
|
|
133
135
|
case "BS_POSTING":
|
|
134
136
|
return new BsPosting(options);
|
|
@@ -137,6 +139,7 @@ export var factory = function factory(type, options) {
|
|
|
137
139
|
case "BS_EXCHANGE_GOODS":
|
|
138
140
|
return new BsExchange(options);
|
|
139
141
|
case "BS_REISSUE_GOODS":
|
|
142
|
+
case "WDT_REISSUE_GOODS":
|
|
140
143
|
return new BsReissue(options);
|
|
141
144
|
case "BS_RETURN_GOODS":
|
|
142
145
|
return new BsReturn(options);
|
|
@@ -147,6 +150,7 @@ export var factory = function factory(type, options) {
|
|
|
147
150
|
return new CommonSystemOrder(options);
|
|
148
151
|
case "BS_LOGISTICS":
|
|
149
152
|
case "WLN_LOGISTICS":
|
|
153
|
+
case "WDT_LOGISTICS":
|
|
150
154
|
return new BsLogistics(options);
|
|
151
155
|
case "FLOW_WORK_ORDER_ID_INPUT":
|
|
152
156
|
return new FlowWorkOrderId(options);
|
|
@@ -167,20 +171,23 @@ export var factory = function factory(type, options) {
|
|
|
167
171
|
// case "REISSUE_TRADE_ID":
|
|
168
172
|
// case 'EXCHANGE_TRADE_ID':
|
|
169
173
|
// return new CommonTradeId(options);
|
|
170
|
-
case
|
|
174
|
+
case 'NUMERICAL_CALCULATION':
|
|
171
175
|
return new Calculation(options);
|
|
172
|
-
case
|
|
176
|
+
case 'NODE_DEAD_LINE_INPUT':
|
|
173
177
|
// 工单时效
|
|
174
178
|
return new NodeDeadLine(options);
|
|
175
|
-
case
|
|
179
|
+
case 'HANDLER_DEAD_LINE_INPUT':
|
|
176
180
|
// 处理人时效
|
|
177
181
|
return new HandlerDeadLine(options);
|
|
178
|
-
case
|
|
182
|
+
case 'NODE_STAY_DURATION_INPUT':
|
|
179
183
|
// 工单停留时长
|
|
180
184
|
return new NodeStayDuration(options);
|
|
181
|
-
case
|
|
185
|
+
case 'WLN_GOODS':
|
|
182
186
|
// 万里牛商品
|
|
183
187
|
return new WlnGoods(options);
|
|
188
|
+
case 'WDT_GOODS':
|
|
189
|
+
// 万里牛商品
|
|
190
|
+
return new WdtGoods(options);
|
|
184
191
|
default:
|
|
185
192
|
return new BasicInput(options);
|
|
186
193
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -69,7 +69,8 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
69
69
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
70
70
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
71
71
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
72
|
-
export { default as MsgStatus } from
|
|
72
|
+
export { default as MsgStatus } from './components/MsgStatus';
|
|
73
|
+
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
73
74
|
export { factory } from "./factory";
|
|
74
75
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
75
76
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/dist/esm/index.js
CHANGED
|
@@ -70,6 +70,7 @@ export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
|
70
70
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
71
71
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
72
72
|
export { default as MsgStatus } from "./components/MsgStatus";
|
|
73
|
+
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
73
74
|
export { factory } from "./factory";
|
|
74
75
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
75
76
|
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.26.0-alpha.
|
|
3
|
+
"version": "0.26.0-alpha.3",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.26.0-alpha.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.26.0-alpha.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.26.0-alpha.3",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.26.0-alpha.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "9424ac24583b226832383f26ca4da2ec597e2d76",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|