@kmkf-fe-packages/services-components 1.17.8-beta.14 → 1.17.8-beta.15

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.
@@ -15,6 +15,12 @@ declare class JstItemSelect implements ComponentInterface {
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
17
  dataType: ComponentInterface["dataType"];
18
+ sortChildField: {
19
+ name: string;
20
+ key: string;
21
+ dataType: string;
22
+ [key: string]: any;
23
+ }[];
18
24
  constructor(options: PickOption);
19
25
  renderClient: (record: Record) => React.JSX.Element | null;
20
26
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -22,6 +28,7 @@ declare class JstItemSelect implements ComponentInterface {
22
28
  getComponentValue: (r: Record) => any;
23
29
  renderExport: (value: any, record: any) => any;
24
30
  editRender: (p: any) => React.JSX.Element;
31
+ getSortChildFields: () => any;
25
32
  filterConfig: (item: ColumnConfig) => {
26
33
  searchDefaultConditions: "like";
27
34
  type: string;
@@ -16,7 +16,7 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
18
18
  var _this = this,
19
- _this$componentConfig3;
19
+ _this$componentConfig5;
20
20
  _classCallCheck(this, JstItemSelect);
21
21
  _defineProperty(this, "name", void 0);
22
22
  _defineProperty(this, "id", void 0);
@@ -31,6 +31,7 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
31
31
  _defineProperty(this, "canSort", void 0);
32
32
  _defineProperty(this, "children", void 0);
33
33
  _defineProperty(this, "dataType", void 0);
34
+ _defineProperty(this, "sortChildField", void 0);
34
35
  _defineProperty(this, "renderClient", function (record) {
35
36
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
36
37
  id: _this.id,
@@ -82,6 +83,27 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
82
83
  }))
83
84
  });
84
85
  });
86
+ _defineProperty(this, "getSortChildFields", function () {
87
+ var _this$componentConfig3, _this$componentConfig4;
88
+ var list = [];
89
+ if ((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.enableSupplierName) {
90
+ list.push({
91
+ name: "jst供应商名称",
92
+ key: "".concat(_this.id, "_supplierName"),
93
+ dataType: "array",
94
+ format: "input"
95
+ });
96
+ }
97
+ if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.enableItemId) {
98
+ list.push({
99
+ name: "jst供应商编码",
100
+ key: "".concat(_this.id, "_itemId"),
101
+ dataType: "array",
102
+ format: "input"
103
+ });
104
+ }
105
+ return list;
106
+ });
85
107
  _defineProperty(this, "filterConfig", function (item) {
86
108
  return [{
87
109
  searchDefaultConditions: SYMBOL.like,
@@ -127,23 +149,23 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
127
149
  this.canSort = false;
128
150
  this.children = [];
129
151
  this.dataType = "object";
130
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
152
+ this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
131
153
  required: true,
132
154
  validator: function validator(_, value) {
133
- var _this$componentConfig4, _this$componentConfig5;
155
+ var _this$componentConfig6, _this$componentConfig7;
134
156
  if (!value || !value.length) {
135
157
  return Promise.reject(new Error("请选择宝贝"));
136
158
  }
137
159
  var hasNotId = (value || []).some(function (item) {
138
160
  return !item.itemId;
139
161
  });
140
- if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.enableItemId && hasNotId) {
162
+ if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.enableItemId && hasNotId) {
141
163
  return Promise.reject(new Error("请输入供应商编码"));
142
164
  }
143
165
  var hasNotName = (value || []).some(function (item) {
144
166
  return !item.supplierName;
145
167
  });
146
- if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.enableSupplierName && hasNotName) {
168
+ if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.enableSupplierName && hasNotName) {
147
169
  return Promise.reject(new Error("请输入供应商名称"));
148
170
  }
149
171
  return Promise.resolve();
@@ -151,5 +173,6 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
151
173
  }] : [];
152
174
  this.align = "left";
153
175
  this.expressDateInstance = ExpressData.getInstance();
176
+ this.sortChildField = this.getSortChildFields();
154
177
  });
155
178
  export default JstItemSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.17.8-beta.14",
3
+ "version": "1.17.8-beta.15",
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": "8a675d395ded7f94e38f3700d146950349210088",
44
+ "gitHead": "cb1852441ec0a5c5b58f6b84f32030f3a55d4957",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }