@kmkf-fe-packages/services-components 1.16.3-beta.1 → 1.16.3-beta.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.
@@ -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(options) {
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,38 @@ 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: "array",
41
+ format: "input"
42
+ }, {
43
+ name: "jst供销商编码",
44
+ key: "".concat(options.id, "_supplyId"),
45
+ dataType: "array",
46
+ format: "input"
47
+ }];
48
+ }
49
+ if (type === "supplyName") {
50
+ return [{
51
+ name: "jst供销商名称",
52
+ key: "".concat(options.id, "_supplyName"),
53
+ dataType: "array",
54
+ format: "input"
55
+ }];
56
+ }
57
+ if (type === "supplyId") {
58
+ return [{
59
+ name: "jst供销商编码",
60
+ key: "".concat(options.id, "_supplyId"),
61
+ dataType: "array",
62
+ format: "input"
63
+ }];
64
+ }
65
+ return [];
66
+ });
33
67
  _defineProperty(this, "renderClient", function (record) {
34
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) {
35
69
  return !isNull(item);
@@ -119,21 +153,22 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
119
153
  }
120
154
  }];
121
155
  });
122
- this.name = options.name;
123
- this.id = options.id;
124
- this.sortField = "".concat(options.id, "_jstItemList");
125
- this.formField = "".concat(options.id, "_jstItemList");
126
- this.type = options.type;
127
- this.componentConfig = options.componentConfig;
156
+ this.name = _options.name;
157
+ this.id = _options.id;
158
+ this.sortField = "".concat(_options.id, "_jstItemList");
159
+ this.formField = "".concat(_options.id, "_jstItemList");
160
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options);
161
+ this.type = _options.type;
162
+ this.componentConfig = _options.componentConfig;
128
163
  this.isCombinationComponent = false;
129
164
  this.canSort = false;
130
165
  this.children = [];
131
166
  this.dataType = "object";
132
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
167
+ this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
133
168
  required: true,
134
169
  validator: function validator(_, value) {
135
- var _this$componentConfig4;
136
- var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "";
170
+ var _this$componentConfig5;
171
+ var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "";
137
172
  if (!value || !value.length) {
138
173
  return Promise.reject(new Error("请选择宝贝"));
139
174
  }
@@ -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) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | TradeId | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
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.1",
3
+ "version": "1.16.3-beta.3",
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": "9dd3f1567722b45b10e73ea4200848b731b76106",
44
+ "gitHead": "603fa707e401bc9efe4ede16c13f49d329d3ddde",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }