@kmkf-fe-packages/services-components 2.0.76 → 2.0.78
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/Public/AsyncSelect/index.d.ts +3 -0
- package/dist/esm/components/Public/AsyncSelect/index.js +80 -15
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +2 -0
- package/package.json +4 -4
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __assign = this && this.__assign || function () {
|
|
4
|
-
__assign = Object.assign || function (t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
exports.__esModule = true;
|
|
14
|
-
var react_1 = require("react");
|
|
15
|
-
var GetFormItem_1 = require("../../GetFormItem");
|
|
16
|
-
var Common_1 = require("../../Common");
|
|
17
|
-
var index_1 = require("../common/index");
|
|
18
|
-
var ItemView_1 = require("../../../commonComponents/ItemView");
|
|
19
|
-
var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
|
|
20
|
-
var basic_components_1 = require("@kmkf-fe-packages/basic-components");
|
|
21
|
-
var constant_1 = require("../../../constant");
|
|
22
|
-
var BsGoods = /** @class */function () {
|
|
23
|
-
function BsGoods(options) {
|
|
24
|
-
var _this = this;
|
|
25
|
-
var _a;
|
|
26
|
-
this.renderClient = function (record) {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
console.log("in renderclient");
|
|
29
|
-
return !kmkf_utils_1.isNull(record === null || record === void 0 ? void 0 : record["" + _this.id]) ? react_1["default"].createElement(react_1["default"].Fragment, null, react_1["default"].createElement(ItemView_1["default"], {
|
|
30
|
-
id: _this.id,
|
|
31
|
-
label: _this.name,
|
|
32
|
-
value: react_1["default"].createElement(Common_1.BsGoodsTable, {
|
|
33
|
-
list: ((_a = record === null || record === void 0 ? void 0 : record["" + _this.id]) === null || _a === void 0 ? void 0 : _a.bsGoods) || [],
|
|
34
|
-
showHeader: ((_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.showHeader) || []
|
|
35
|
-
})
|
|
36
|
-
})) : null;
|
|
37
|
-
};
|
|
38
|
-
this.renderPc = function () {
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
|
-
this.renderLog = function (r) {
|
|
42
|
-
var _a;
|
|
43
|
-
console.log("in renderclient");
|
|
44
|
-
if (kmkf_utils_1.isNull(r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"])) return null;
|
|
45
|
-
return react_1["default"].createElement(Common_1.BsGoodsTable, {
|
|
46
|
-
list: (r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"]) || [],
|
|
47
|
-
showHeader: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showHeader) || []
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
this.getComponentValue = function (r) {
|
|
51
|
-
return r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"];
|
|
52
|
-
};
|
|
53
|
-
this.renderExport = function () {
|
|
54
|
-
return null;
|
|
55
|
-
};
|
|
56
|
-
this.editRender = function (p) {
|
|
57
|
-
var _a, _b, _c, _d, _e, _f;
|
|
58
|
-
console.log("in renderclient");
|
|
59
|
-
return react_1["default"].createElement(GetFormItem_1["default"], {
|
|
60
|
-
title: _this.name,
|
|
61
|
-
name: _this.id,
|
|
62
|
-
rules: _this.rules,
|
|
63
|
-
required: false,
|
|
64
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
65
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
66
|
-
tooltip: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showTooltip) ? (_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.tooltip : "",
|
|
67
|
-
component: react_1["default"].createElement(basic_components_1.BsGoods, __assign({}, _this.componentConfig, {
|
|
68
|
-
maxLength: ((_c = _this.componentConfig) === null || _c === void 0 ? void 0 : _c.maxLength) || 20,
|
|
69
|
-
shopId: (_d = _this.effects) === null || _d === void 0 ? void 0 : _d.shopId,
|
|
70
|
-
shopList: ((_e = _this.effects) === null || _e === void 0 ? void 0 : _e.shopList) || [],
|
|
71
|
-
companyKey: (_f = _this.effects) === null || _f === void 0 ? void 0 : _f.companyKey,
|
|
72
|
-
width: "90%"
|
|
73
|
-
}))
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
this.filterConfig = function (item) {
|
|
77
|
-
return [{
|
|
78
|
-
searchDefaultConditions: constant_1.SYMBOL.like,
|
|
79
|
-
type: item.type,
|
|
80
|
-
id: item.id + "_bsGoods",
|
|
81
|
-
name: item.name,
|
|
82
|
-
filterComponentType: "Input"
|
|
83
|
-
}];
|
|
84
|
-
};
|
|
85
|
-
this.name = options.name;
|
|
86
|
-
this.id = options.id;
|
|
87
|
-
this.sortField = options.id + "_bsGoods";
|
|
88
|
-
this.formField = options.id + "_bsGoods";
|
|
89
|
-
this.type = options.type;
|
|
90
|
-
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
91
|
-
this.isCombinationComponent = true;
|
|
92
|
-
this.canSort = false;
|
|
93
|
-
this.bsGoods = new index_1.BsHeaderGood(__assign(__assign({}, options), {
|
|
94
|
-
id: options.id + "_bsGoods",
|
|
95
|
-
name: "商品信息"
|
|
96
|
-
}));
|
|
97
|
-
this.children = [this.bsGoods];
|
|
98
|
-
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
99
|
-
this.rules = ((_a = this === null || this === void 0 ? void 0 : this.componentConfig) === null || _a === void 0 ? void 0 : _a.required) ? [{
|
|
100
|
-
required: true,
|
|
101
|
-
validator: function validator(_, value) {
|
|
102
|
-
var _a;
|
|
103
|
-
if (!value || !((_a = value === null || value === void 0 ? void 0 : value.bsGoods) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
104
|
-
return Promise.reject(new Error("请选择bs商品"));
|
|
105
|
-
}
|
|
106
|
-
return Promise.resolve();
|
|
107
|
-
}
|
|
108
|
-
}] : [];
|
|
109
|
-
this.dataType = "object";
|
|
110
|
-
}
|
|
111
|
-
return BsGoods;
|
|
112
|
-
}();
|
|
113
|
-
exports["default"] = BsGoods;
|