@kmkf-fe-packages/services-components 2.7.7-beta.11 → 2.7.7-beta.12
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,6 +17,7 @@ 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";
|
|
20
21
|
function toNum(value) {
|
|
21
22
|
if (typeof value === 'string') {
|
|
22
23
|
return value ? +value : void 0;
|
|
@@ -29,28 +30,11 @@ function toNum(value) {
|
|
|
29
30
|
var CONF_MAP = {
|
|
30
31
|
JST_EXCHANGE_GOODS: {
|
|
31
32
|
goodsKey: 'jstExchangeGoods',
|
|
32
|
-
validator: function validator(_rule, value) {
|
|
33
|
+
validator: function validator(_rule, value, type) {
|
|
33
34
|
if (!_rule.required) return Promise.resolve();
|
|
34
|
-
var
|
|
35
|
-
if (
|
|
36
|
-
|
|
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"));
|
|
35
|
+
var validatorFlag = erpFormValidator(_rule, value, type);
|
|
36
|
+
if (validatorFlag) {
|
|
37
|
+
return validatorFlag;
|
|
54
38
|
}
|
|
55
39
|
return Promise.resolve();
|
|
56
40
|
}
|
|
@@ -164,8 +148,11 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
|
|
|
164
148
|
}
|
|
165
149
|
}, {
|
|
166
150
|
required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
|
|
167
|
-
validator:
|
|
168
|
-
|
|
151
|
+
validator: function validator(_rule, value) {
|
|
152
|
+
var _CONF_MAP$options$typ, _CONF_MAP$options$typ2;
|
|
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
|
+
};
|
|
169
156
|
}
|
|
170
157
|
}];
|
|
171
158
|
this.dataType = 'object';
|
|
@@ -43,11 +43,11 @@ var typeMap = {
|
|
|
43
43
|
typeName: "jstReturnType",
|
|
44
44
|
remark: "jstReturnType_memo",
|
|
45
45
|
systemOrderNo: "jstSystemOrderNo",
|
|
46
|
-
systemOrderBillType: "jstSystemOrderBillType",
|
|
46
|
+
// systemOrderBillType: "jstSystemOrderBillType",
|
|
47
47
|
errMsg: "请选择聚水潭退货商品",
|
|
48
48
|
name: "聚水潭",
|
|
49
49
|
compType: "退货",
|
|
50
|
-
hasSystemOrderType:
|
|
50
|
+
hasSystemOrderType: false,
|
|
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
|
-
JST_RETURN_GOODS: "jstSystemOrderBillType"
|
|
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.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, 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, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect, ReturnWarehouse, KmExchange } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BsSystemOrder | CommonSystemOrder | LogisticsInterception | StatusSelect | TradeId | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | 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 | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsE3Goods | PublicGoods |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsSystemOrder | CommonSystemOrder | LogisticsInterception | PublicExchange | PublicReissueGoods | StatusSelect | TradeId | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | 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 | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsE3Goods | PublicGoods | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
|
package/dist/esm/factory.js
CHANGED
|
@@ -185,6 +185,7 @@ 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":
|
|
188
189
|
return new PublicReissueGoods(options);
|
|
189
190
|
case "BS_E3_REISSUE_GOODS":
|
|
190
191
|
return new BsE3Reissue(options);
|
|
@@ -208,8 +209,6 @@ export var factory = function factory(type, options) {
|
|
|
208
209
|
return new WdtReturn(options);
|
|
209
210
|
case "GY_RETURN_GOODS":
|
|
210
211
|
return new GyReturn(options);
|
|
211
|
-
case "JST_RETURN_GOODS":
|
|
212
|
-
return new PublicReissueGoods(options);
|
|
213
212
|
case "REISSUE_TRADE_ID":
|
|
214
213
|
case "SWAP_OUT_TRADE_ID":
|
|
215
214
|
case "ERP_AFTER_SALE_TRADE_ID":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.7.7-beta.
|
|
3
|
+
"version": "2.7.7-beta.12",
|
|
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.7.7-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.7.7-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.7.7-beta.12",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.7.7-beta.12",
|
|
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": "8d0c1e9dd97c19700b86a22e901524cf6393e9df",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|