@kmkf-fe-packages/services-components 1.16.3-beta.1 → 1.16.3-beta.2
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.
|
@@ -4,6 +4,12 @@ declare class JstSupply implements ComponentInterface {
|
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
|
+
sortChildField: {
|
|
8
|
+
name: string;
|
|
9
|
+
key: string;
|
|
10
|
+
dataType: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}[];
|
|
7
13
|
type: string;
|
|
8
14
|
rules: any[];
|
|
9
15
|
componentConfig: ComponentInterface["componentConfig"];
|
|
@@ -14,6 +20,7 @@ declare class JstSupply implements ComponentInterface {
|
|
|
14
20
|
children: ComponentInterface[];
|
|
15
21
|
dataType: ComponentInterface["dataType"];
|
|
16
22
|
constructor(options: PickOption);
|
|
23
|
+
getSortChildFields: (type: string, options: PickOption) => any;
|
|
17
24
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
18
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
26
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -14,13 +14,15 @@ import { JstGoods } from "@kmkf-fe-packages/basic-components";
|
|
|
14
14
|
import ItemView from "../../../commonComponents/ItemView";
|
|
15
15
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { SYMBOL } from "../../../constant";
|
|
17
|
-
var JstSupply = /*#__PURE__*/_createClass(function JstSupply(
|
|
17
|
+
var JstSupply = /*#__PURE__*/_createClass(function JstSupply(_options) {
|
|
18
18
|
var _this = this,
|
|
19
|
-
_this$componentConfig3
|
|
19
|
+
_this$componentConfig3,
|
|
20
|
+
_this$componentConfig4;
|
|
20
21
|
_classCallCheck(this, JstSupply);
|
|
21
22
|
_defineProperty(this, "name", void 0);
|
|
22
23
|
_defineProperty(this, "id", void 0);
|
|
23
24
|
_defineProperty(this, "sortField", void 0);
|
|
25
|
+
_defineProperty(this, "sortChildField", void 0);
|
|
24
26
|
_defineProperty(this, "type", void 0);
|
|
25
27
|
_defineProperty(this, "rules", void 0);
|
|
26
28
|
_defineProperty(this, "componentConfig", void 0);
|
|
@@ -30,6 +32,34 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
30
32
|
_defineProperty(this, "canSort", void 0);
|
|
31
33
|
_defineProperty(this, "children", void 0);
|
|
32
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "getSortChildFields", function (type, options) {
|
|
36
|
+
if (!type) {
|
|
37
|
+
return [{
|
|
38
|
+
name: "jst供销商名称",
|
|
39
|
+
key: "".concat(options.id, "_supplyName"),
|
|
40
|
+
dataType: "string"
|
|
41
|
+
}, {
|
|
42
|
+
name: "jst供销商编码",
|
|
43
|
+
key: "".concat(options.id, "_supplyId"),
|
|
44
|
+
dataType: "string"
|
|
45
|
+
}];
|
|
46
|
+
}
|
|
47
|
+
if (type === "supplyName") {
|
|
48
|
+
return [{
|
|
49
|
+
name: "jst供销商名称",
|
|
50
|
+
key: "".concat(options.id, "_supplyName"),
|
|
51
|
+
dataType: "string"
|
|
52
|
+
}];
|
|
53
|
+
}
|
|
54
|
+
if (type === "supplyId") {
|
|
55
|
+
return [{
|
|
56
|
+
name: "jst供销商编码",
|
|
57
|
+
key: "".concat(options.id, "_supplyId"),
|
|
58
|
+
dataType: "string"
|
|
59
|
+
}];
|
|
60
|
+
}
|
|
61
|
+
return [];
|
|
62
|
+
});
|
|
33
63
|
_defineProperty(this, "renderClient", function (record) {
|
|
34
64
|
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) {
|
|
35
65
|
return !isNull(item);
|
|
@@ -119,21 +149,22 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
|
|
|
119
149
|
}
|
|
120
150
|
}];
|
|
121
151
|
});
|
|
122
|
-
this.name =
|
|
123
|
-
this.id =
|
|
124
|
-
this.sortField = "".concat(
|
|
125
|
-
this.formField = "".concat(
|
|
126
|
-
this.
|
|
127
|
-
this.
|
|
152
|
+
this.name = _options.name;
|
|
153
|
+
this.id = _options.id;
|
|
154
|
+
this.sortField = "".concat(_options.id, "_jstItemList");
|
|
155
|
+
this.formField = "".concat(_options.id, "_jstItemList");
|
|
156
|
+
this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options);
|
|
157
|
+
this.type = _options.type;
|
|
158
|
+
this.componentConfig = _options.componentConfig;
|
|
128
159
|
this.isCombinationComponent = false;
|
|
129
160
|
this.canSort = false;
|
|
130
161
|
this.children = [];
|
|
131
162
|
this.dataType = "object";
|
|
132
|
-
this.rules = (_this$
|
|
163
|
+
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
133
164
|
required: true,
|
|
134
165
|
validator: function validator(_, value) {
|
|
135
|
-
var _this$
|
|
136
|
-
var showField = (_this === null || _this === void 0 ? void 0 : (_this$
|
|
166
|
+
var _this$componentConfig5;
|
|
167
|
+
var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "";
|
|
137
168
|
if (!value || !value.length) {
|
|
138
169
|
return Promise.reject(new Error("请选择宝贝"));
|
|
139
170
|
}
|
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, SubForm, CommonDataTime, TradeId, ShopName, 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, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId } 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) => BasicCascader | StatusSelect | TradeId | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | 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 | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | KmErpSendGood | AfterSalesOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.16.3-beta.
|
|
3
|
+
"version": "1.16.3-beta.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "0062fc826b5ca4fc3ad1d5490991c5eab6c75168",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|