@kmkf-fe-packages/services-components 2.2.44-beta.81 → 2.2.44-beta.82

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.
@@ -28,24 +28,13 @@ declare class ReturnWarehouse implements ComponentInterface {
28
28
  getComponentValue: (r: Record) => any;
29
29
  renderExport: (value: any, record: any) => any;
30
30
  editRender: (p: any) => React.JSX.Element;
31
- filterConfig: (item: ColumnConfig) => ({
32
- searchDefaultConditions: "in";
33
- type: string;
34
- id: string;
35
- name: string;
36
- filterComponentType: "MultipleSelect";
37
- props: {
38
- options: any[];
39
- };
40
- filterFn: (value: string) => (i: Record) => any;
41
- } | {
31
+ filterConfig: (item: ColumnConfig) => {
42
32
  searchDefaultConditions: "like";
43
33
  type: string;
44
34
  id: string;
45
35
  name: string;
46
36
  filterComponentType: "Input";
47
37
  filterFn: (value: string) => (i: Record) => any;
48
- props?: undefined;
49
- })[];
38
+ }[];
50
39
  }
51
40
  export default ReturnWarehouse;
@@ -21,7 +21,8 @@ var typeMap = {
21
21
  returnWarehouseId: "kmReturnWarehouseId",
22
22
  returnWarehouseName: "kmReturnWarehouseName",
23
23
  platformType: "km",
24
- dataType: "weakenArray"
24
+ dataType: "weakenArray",
25
+ placeholder: "请选择快麦退货仓"
25
26
  }
26
27
  };
27
28
  var ReturnWarehouse = /*#__PURE__*/_createClass(function ReturnWarehouse(_options) {
@@ -127,36 +128,33 @@ var ReturnWarehouse = /*#__PURE__*/_createClass(function ReturnWarehouse(_option
127
128
  });
128
129
  });
129
130
  _defineProperty(this, "filterConfig", function (item) {
130
- var _typeMap$_this$type8, _typeMap$_this$type9;
131
+ var _typeMap$_this$type8, _typeMap$_this$type10;
131
132
  return [{
132
- searchDefaultConditions: SYMBOL.in,
133
+ searchDefaultConditions: SYMBOL.like,
133
134
  type: item.type,
134
135
  id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.returnWarehouseName),
135
136
  name: "".concat(_this.name, "-\u540D\u79F0"),
136
- filterComponentType: "MultipleSelect",
137
- props: {
138
- options: SendDataCenter.getInstance(item.type).getSendData()
139
- },
137
+ filterComponentType: "Input",
140
138
  filterFn: function filterFn(value) {
141
139
  return function (i) {
142
- var _ref;
143
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "returnWarehouseName").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
140
+ var _ref, _typeMap$_this$type9;
141
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key) || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
144
142
  var _String;
145
- var returnWarehouseName = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
146
- return returnWarehouseName;
143
+ var name = item !== null && item !== void 0 && item.returnWarehouseName ? (_String = String(item === null || item === void 0 ? void 0 : item.returnWarehouseName)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
144
+ return name;
147
145
  });
148
146
  };
149
147
  }
150
148
  }, {
151
149
  searchDefaultConditions: SYMBOL.like,
152
150
  type: item.type,
153
- id: "".concat(item.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.returnWarehouseId),
151
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.returnWarehouseId),
154
152
  name: "".concat(_this.name, "-\u7F16\u7801"),
155
153
  filterComponentType: "Input",
156
154
  filterFn: function filterFn(value) {
157
155
  return function (i) {
158
- var _ref2, _typeMap$_this$type10;
159
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
156
+ var _ref2, _typeMap$_this$type11;
157
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
160
158
  var _String2;
161
159
  var id = item !== null && item !== void 0 && item.returnWarehouseId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.returnWarehouseId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
162
160
  return id;
@@ -177,7 +175,8 @@ var ReturnWarehouse = /*#__PURE__*/_createClass(function ReturnWarehouse(_option
177
175
  required: true,
178
176
  validator: function validator(_, value) {
179
177
  if (!value || !value.length) {
180
- return Promise.reject(new Error("请选择宝贝"));
178
+ var _typeMap$_options$typ4;
179
+ return Promise.reject(new Error((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.placeholder));
181
180
  }
182
181
  var hasNo = (value || []).some(function (item) {
183
182
  var _this$componentConfig5, _this$componentConfig6;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.2.44-beta.81",
3
+ "version": "2.2.44-beta.82",
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": "f5e50ceae82f6f3958cd3641db9588e5653744ba",
44
+ "gitHead": "f132d919770a3cd98eebf67c7ddc7915b125043a",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }