@kmkf-fe-packages/services-components 2.0.54-beta.1 → 2.0.54-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.
@@ -12,7 +12,7 @@ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
14
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
- import { GyReissue as Reissue, erpColumnsMap } from "@kmkf-fe-packages/basic-components";
15
+ import { GyReissue as Reissue, erpFormValidator } from "@kmkf-fe-packages/basic-components";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common/index";
18
18
  import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
@@ -25,13 +25,11 @@ var typeMap = {
25
25
  remark: "gyReissueType_memo",
26
26
  systemOrderNo: "gySystemOrderNo",
27
27
  errMsg: "请选择管易补发商品",
28
- validator: function validator(_rule, value) {
28
+ validator: function validator(_rule, value, type) {
29
29
  if (!_rule.required) return Promise.resolve();
30
- var qtyValidator = erpColumnsMap["GY_REISSUE_GOODS"].find(function (column) {
31
- return column.dataIndex === "qty";
32
- }).validator(_rule, value);
33
- if (qtyValidator) {
34
- return qtyValidator;
30
+ var validatorFlag = erpFormValidator(_rule, value, type);
31
+ if (validatorFlag) {
32
+ return validatorFlag;
35
33
  }
36
34
  return Promise.resolve();
37
35
  }
@@ -43,8 +41,7 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
43
41
  _typeMap$options$type2,
44
42
  _typeMap$options$type3,
45
43
  _typeMap$options$type4,
46
- _this$componentConfig6,
47
- _typeMap$options$type7;
44
+ _this$componentConfig6;
48
45
  _classCallCheck(this, GyReissue);
49
46
  _defineProperty(this, "name", void 0);
50
47
  _defineProperty(this, "id", void 0);
@@ -197,8 +194,11 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
197
194
  }
198
195
  }, {
199
196
  required: isRequired,
200
- validator: ((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.validator) || function () {
201
- return Promise.resolve();
197
+ validator: function validator(_rule, value) {
198
+ var _typeMap$options$type7, _typeMap$options$type8;
199
+ return ((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : (_typeMap$options$type8 = _typeMap$options$type7.validator) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.call(_typeMap$options$type7, _rule, value, options.type)) || function () {
200
+ return Promise.resolve();
201
+ };
202
202
  }
203
203
  }];
204
204
  this.dataType = "object";
@@ -15,7 +15,7 @@ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import { SYMBOL } from "../../../constant";
16
16
  import { BsGoodsTable } from "../../Common";
17
17
  import CommonHeaderGoods from "../../CommonHeaderGood";
18
- import { GyReturn as Return, erpColumnsMap } from "@kmkf-fe-packages/basic-components";
18
+ import { GyReturn as Return, erpFormValidator } from "@kmkf-fe-packages/basic-components";
19
19
  import { BsType, SystemOrderNo } from "../../BS/common/index";
20
20
  var typeMap = {
21
21
  GY_RETURN_GOODS: {
@@ -24,13 +24,11 @@ var typeMap = {
24
24
  typeName: "gyReturnType",
25
25
  systemOrderNo: "gySystemOrderNo",
26
26
  errMsg: "请选择管易退货商品",
27
- validator: function validator(_rule, value) {
27
+ validator: function validator(_rule, value, type) {
28
28
  if (!_rule.required) return Promise.resolve();
29
- var qtyValidator = erpColumnsMap["GY_RETURN_GOODS"].find(function (column) {
30
- return column.dataIndex === "qty";
31
- }).validator(_rule, value);
32
- if (qtyValidator) {
33
- return qtyValidator;
29
+ var validatorFlag = erpFormValidator(_rule, value, type);
30
+ if (validatorFlag) {
31
+ return validatorFlag;
34
32
  }
35
33
  return Promise.resolve();
36
34
  }
@@ -41,8 +39,7 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
41
39
  _typeMap$options$type,
42
40
  _typeMap$options$type2,
43
41
  _typeMap$options$type3,
44
- _this$componentConfig6,
45
- _typeMap$options$type6;
42
+ _this$componentConfig6;
46
43
  _classCallCheck(this, GyReturn);
47
44
  _defineProperty(this, "name", void 0);
48
45
  _defineProperty(this, "id", void 0);
@@ -189,8 +186,11 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
189
186
  }
190
187
  }, {
191
188
  required: isRequired,
192
- validator: ((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.validator) || function () {
193
- return Promise.resolve();
189
+ validator: function validator(_rule, value) {
190
+ var _typeMap$options$type6, _typeMap$options$type7;
191
+ return ((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : (_typeMap$options$type7 = _typeMap$options$type6.validator) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.call(_typeMap$options$type6, _rule, value, options.type)) || function () {
192
+ return Promise.resolve();
193
+ };
194
194
  }
195
195
  }];
196
196
  this.dataType = "object";
@@ -12,7 +12,7 @@ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
14
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
- import { PublicReissue as Reissue, erpColumnsMap } from "@kmkf-fe-packages/basic-components";
15
+ import { PublicReissue as Reissue, erpFormValidator } from "@kmkf-fe-packages/basic-components";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common/index";
18
18
  import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
@@ -28,19 +28,11 @@ var typeMap = {
28
28
  errMsg: "请选择聚水潭补发商品",
29
29
  name: "聚水潭",
30
30
  compType: "补发",
31
- validator: function validator(_rule, value) {
31
+ validator: function validator(_rule, value, type) {
32
32
  if (!_rule.required) return Promise.resolve();
33
- var qtyValidator = erpColumnsMap["JST_REISSUE_GOODS"].find(function (column) {
34
- return column.dataIndex === "qty";
35
- }).validator(_rule, value);
36
- if (qtyValidator) {
37
- return qtyValidator;
38
- }
39
- var salePriceValidator = erpColumnsMap["JST_REISSUE_GOODS"].find(function (column) {
40
- return column.dataIndex === "salePrice";
41
- }).validator(_rule, value);
42
- if (salePriceValidator) {
43
- return salePriceValidator;
33
+ var validatorFlag = erpFormValidator(_rule, value, type);
34
+ if (validatorFlag) {
35
+ return validatorFlag;
44
36
  }
45
37
  return Promise.resolve();
46
38
  }
@@ -54,19 +46,11 @@ var typeMap = {
54
46
  errMsg: "请选择聚水潭退货商品",
55
47
  name: "聚水潭",
56
48
  compType: "退货",
57
- validator: function validator(_rule, value) {
49
+ validator: function validator(_rule, value, type) {
58
50
  if (!_rule.required) return Promise.resolve();
59
- var qtyValidator = erpColumnsMap["JST_RETURN_GOODS"].find(function (column) {
60
- return column.dataIndex === "qty";
61
- }).validator(_rule, value);
62
- if (qtyValidator) {
63
- return qtyValidator;
64
- }
65
- var salePriceValidator = erpColumnsMap["JST_RETURN_GOODS"].find(function (column) {
66
- return column.dataIndex === "salePrice";
67
- }).validator(_rule, value);
68
- if (salePriceValidator) {
69
- return salePriceValidator;
51
+ var validatorFlag = erpFormValidator(_rule, value, type);
52
+ if (validatorFlag) {
53
+ return validatorFlag;
70
54
  }
71
55
  return Promise.resolve();
72
56
  }
@@ -86,8 +70,7 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
86
70
  _typeMap$options$type10,
87
71
  _typeMap$options$type11,
88
72
  _typeMap$options$type12,
89
- _this$componentConfig6,
90
- _typeMap$options$type15;
73
+ _this$componentConfig6;
91
74
  _classCallCheck(this, PublicReissue);
92
75
  _defineProperty(this, "name", void 0);
93
76
  _defineProperty(this, "id", void 0);
@@ -245,8 +228,11 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
245
228
  }
246
229
  }, {
247
230
  required: isRequired,
248
- validator: ((_typeMap$options$type15 = typeMap[options.type]) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.validator) || function () {
249
- return Promise.resolve();
231
+ validator: function validator(_rule, value) {
232
+ var _typeMap$options$type15, _typeMap$options$type16;
233
+ return ((_typeMap$options$type15 = typeMap[options.type]) === null || _typeMap$options$type15 === void 0 ? void 0 : (_typeMap$options$type16 = _typeMap$options$type15.validator) === null || _typeMap$options$type16 === void 0 ? void 0 : _typeMap$options$type16.call(_typeMap$options$type15, _rule, value, options.type)) || function () {
234
+ return Promise.resolve();
235
+ };
250
236
  }
251
237
  }];
252
238
  this.dataType = "object";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.54-beta.1",
3
+ "version": "2.0.54-beta.3",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.0.54-beta.1",
25
- "@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.1",
24
+ "@kmkf-fe-packages/basic-components": "2.0.54-beta.3",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.2",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "8a017f7ef5b96fcb7b4de05cdca949e0a7250623",
44
+ "gitHead": "589761f1e797ee16bb6ffe7c973181646609e556",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }