@kmkf-fe-packages/services-components 2.9.1-beta.3 → 2.10.0
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.
|
@@ -17,7 +17,6 @@ import { SYMBOL } from "../../../constant";
|
|
|
17
17
|
// import { BsType, BsMemo } from "../../Bs/common";
|
|
18
18
|
import { CommonExchangeGoods } from '@kmkf-fe-packages/basic-components';
|
|
19
19
|
import CommonHeaderGoods from "../../CommonHeaderGood";
|
|
20
|
-
import { erpFormValidator } from "@kmkf-fe-packages/basic-components";
|
|
21
20
|
function toNum(value) {
|
|
22
21
|
if (typeof value === 'string') {
|
|
23
22
|
return value ? +value : void 0;
|
|
@@ -30,11 +29,28 @@ function toNum(value) {
|
|
|
30
29
|
var CONF_MAP = {
|
|
31
30
|
JST_EXCHANGE_GOODS: {
|
|
32
31
|
goodsKey: 'jstExchangeGoods',
|
|
33
|
-
validator: function validator(_rule, value
|
|
32
|
+
validator: function validator(_rule, value) {
|
|
34
33
|
if (!_rule.required) return Promise.resolve();
|
|
35
|
-
var
|
|
36
|
-
if (
|
|
37
|
-
|
|
34
|
+
var goodsName = '';
|
|
35
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
36
|
+
var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
|
|
37
|
+
var res = typeof qty === 'number' ? qty < 1 : true;
|
|
38
|
+
if (res) {
|
|
39
|
+
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
40
|
+
}
|
|
41
|
+
return res;
|
|
42
|
+
})) {
|
|
43
|
+
return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
44
|
+
}
|
|
45
|
+
if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
|
|
46
|
+
var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
|
|
47
|
+
var res = typeof v === 'number' ? v < 0 : true;
|
|
48
|
+
if (res) {
|
|
49
|
+
goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
|
|
50
|
+
}
|
|
51
|
+
return res;
|
|
52
|
+
})) {
|
|
53
|
+
return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
|
|
38
54
|
}
|
|
39
55
|
return Promise.resolve();
|
|
40
56
|
}
|
|
@@ -148,11 +164,8 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
|
|
|
148
164
|
}
|
|
149
165
|
}, {
|
|
150
166
|
required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
|
|
151
|
-
validator: function
|
|
152
|
-
|
|
153
|
-
return ((_CONF_MAP$options$typ = CONF_MAP[options.type]) === null || _CONF_MAP$options$typ === void 0 ? void 0 : (_CONF_MAP$options$typ2 = _CONF_MAP$options$typ.validator) === null || _CONF_MAP$options$typ2 === void 0 ? void 0 : _CONF_MAP$options$typ2.call(_CONF_MAP$options$typ, _rule, value, options.type, _this.componentConfig)) || function () {
|
|
154
|
-
return Promise.resolve();
|
|
155
|
-
};
|
|
167
|
+
validator: this.config.validator || function () {
|
|
168
|
+
return Promise.resolve();
|
|
156
169
|
}
|
|
157
170
|
}];
|
|
158
171
|
this.dataType = 'object';
|
|
@@ -43,11 +43,11 @@ var typeMap = {
|
|
|
43
43
|
typeName: "jstReturnType",
|
|
44
44
|
remark: "jstReturnType_memo",
|
|
45
45
|
systemOrderNo: "jstSystemOrderNo",
|
|
46
|
-
|
|
46
|
+
systemOrderBillType: "jstSystemOrderBillType",
|
|
47
47
|
errMsg: "请选择聚水潭退货商品",
|
|
48
48
|
name: "聚水潭",
|
|
49
49
|
compType: "退货",
|
|
50
|
-
hasSystemOrderType:
|
|
50
|
+
hasSystemOrderType: true,
|
|
51
51
|
validator: function validator(_rule, value, type) {
|
|
52
52
|
if (!_rule.required) return Promise.resolve();
|
|
53
53
|
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
@@ -15,8 +15,8 @@ import React from "react";
|
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
16
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
var componentType = {
|
|
18
|
-
JST_REISSUE_GOODS: "jstSystemOrderBillType"
|
|
19
|
-
|
|
18
|
+
JST_REISSUE_GOODS: "jstSystemOrderBillType",
|
|
19
|
+
JST_RETURN_GOODS: "jstSystemOrderBillType"
|
|
20
20
|
};
|
|
21
21
|
var SystemOrderType = /*#__PURE__*/_createClass(function SystemOrderType(options) {
|
|
22
22
|
var _this = this;
|
package/dist/esm/factory.js
CHANGED
|
@@ -185,7 +185,6 @@ export var factory = function factory(type, options) {
|
|
|
185
185
|
case "KM_RETURN_GOODS":
|
|
186
186
|
case "JY_REISSUE_GOODS":
|
|
187
187
|
case "JKY_REISSUE_GOODS":
|
|
188
|
-
case "JST_RETURN_GOODS":
|
|
189
188
|
return new PublicReissueGoods(options);
|
|
190
189
|
case "BS_E3_REISSUE_GOODS":
|
|
191
190
|
return new BsE3Reissue(options);
|
|
@@ -209,6 +208,8 @@ export var factory = function factory(type, options) {
|
|
|
209
208
|
return new WdtReturn(options);
|
|
210
209
|
case "GY_RETURN_GOODS":
|
|
211
210
|
return new GyReturn(options);
|
|
211
|
+
case "JST_RETURN_GOODS":
|
|
212
|
+
return new PublicReissueGoods(options);
|
|
212
213
|
case "REISSUE_TRADE_ID":
|
|
213
214
|
case "SWAP_OUT_TRADE_ID":
|
|
214
215
|
case "ERP_AFTER_SALE_TRADE_ID":
|
package/dist/esm/service/api.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
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.9.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.9.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.9.0",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.9.0",
|
|
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": "
|
|
44
|
+
"gitHead": "7d9711d7dce733298bdd632e730c7af7d16416d8",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|