@kmkf-fe-packages/services-components 0.13.0-alpha.1 → 0.13.0-alpha.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.
- package/dist/esm/components/Address/index.d.ts +5 -5
- package/dist/esm/components/Address/index.js +31 -25
- package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +29 -0
- package/dist/esm/components/BS/BsPosting/components/City/index.js +76 -0
- package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +27 -0
- package/dist/esm/components/BS/BsPosting/components/Detail/index.js +70 -0
- package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +29 -0
- package/dist/esm/components/BS/BsPosting/components/District/index.js +76 -0
- package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +29 -0
- package/dist/esm/components/BS/BsPosting/components/Province/index.js +76 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +27 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +70 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +27 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +70 -0
- package/dist/esm/components/BS/BsPosting/index.d.ts +43 -0
- package/dist/esm/components/BS/BsPosting/index.js +106 -0
- package/dist/esm/components/Common/img/reject.png +0 -0
- package/dist/esm/components/Common/img/reminder.png +0 -0
- package/dist/esm/components/FlowTag/index.js +15 -3
- package/dist/esm/components/GetFormItem/index.d.ts +1 -1
- package/dist/esm/components/GetFormItem/index.js +4 -2
- package/dist/esm/components/Input/index.d.ts +5 -4
- package/dist/esm/components/Input/index.js +63 -9
- package/dist/esm/components/ReceiverAddress/index.d.ts +5 -5
- package/dist/esm/components/ReceiverAddress/index.js +27 -19
- package/dist/esm/factory.d.ts +3 -3
- package/dist/esm/factory.js +95 -93
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +9 -0
- package/dist/esm/service/request.d.ts +17 -0
- package/dist/esm/service/request.js +56 -0
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
|
@@ -5,13 +5,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
import React from
|
|
9
|
-
import { Address } from
|
|
10
|
-
import { AddressData } from
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { Address } from "@kmkf-fe-packages/basic-components";
|
|
10
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull } from
|
|
14
|
-
import every from
|
|
13
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import every from "lodash/every";
|
|
15
15
|
var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
16
16
|
var _this = this,
|
|
17
17
|
_this$componentConfig3;
|
|
@@ -35,7 +35,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
35
35
|
className: "pointer"
|
|
36
36
|
}, value === null || value === void 0 ? void 0 : (_value$address = value.address) === null || _value$address === void 0 ? void 0 : _value$address.map(function (suffix) {
|
|
37
37
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
38
|
-
}).join(
|
|
38
|
+
}).join(""), value === null || value === void 0 ? void 0 : value.detail);
|
|
39
39
|
});
|
|
40
40
|
_defineProperty(this, "transTextToNumber", function (value) {
|
|
41
41
|
return value ? +value : value;
|
|
@@ -54,17 +54,25 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
54
54
|
className: "pointer",
|
|
55
55
|
onClick: function onClick(e) {
|
|
56
56
|
var _this$effects, _this$effects2;
|
|
57
|
-
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) ===
|
|
57
|
+
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
|
|
58
58
|
e.stopPropagation();
|
|
59
59
|
}
|
|
60
60
|
}, (_address = address) === null || _address === void 0 ? void 0 : _address.map(function () {
|
|
61
|
-
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
61
|
+
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
62
62
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
63
|
-
}).join(
|
|
63
|
+
}).join(""), detail);
|
|
64
64
|
});
|
|
65
65
|
_defineProperty(this, "renderLog", function (r) {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
var _address2;
|
|
67
|
+
var address = [_this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_province")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_city")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_district")])];
|
|
68
|
+
address = every(address, function (item) {
|
|
69
|
+
return !item;
|
|
70
|
+
}) ? [] : address;
|
|
71
|
+
var detail = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_address")];
|
|
72
|
+
return "".concat((_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
|
|
73
|
+
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
74
|
+
return _this.addressDateInstance.getNameByCode(suffix);
|
|
75
|
+
}).join(""), " ").concat(detail || "");
|
|
68
76
|
});
|
|
69
77
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
70
78
|
return {
|
|
@@ -73,19 +81,19 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
73
81
|
};
|
|
74
82
|
});
|
|
75
83
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
76
|
-
var
|
|
84
|
+
var _address3;
|
|
77
85
|
if (record["".concat(_this.id, "_province")] === undefined) {
|
|
78
|
-
return
|
|
86
|
+
return "--";
|
|
79
87
|
}
|
|
80
88
|
var address = [_this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_province")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_city")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_district")])];
|
|
81
89
|
address = every(address, function (item) {
|
|
82
90
|
return !item;
|
|
83
91
|
}) ? [] : address;
|
|
84
92
|
var detail = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_address")];
|
|
85
|
-
return "".concat((
|
|
86
|
-
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
93
|
+
return "".concat((_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.map(function () {
|
|
94
|
+
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
87
95
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
88
|
-
}).join(
|
|
96
|
+
}).join(""), " ").concat(detail || "");
|
|
89
97
|
});
|
|
90
98
|
_defineProperty(this, "renderClient", function (record) {
|
|
91
99
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -121,16 +129,16 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
121
129
|
validator: function validator(_, value) {
|
|
122
130
|
var _value$address2;
|
|
123
131
|
if (!(value !== null && value !== void 0 && (_value$address2 = value.address) !== null && _value$address2 !== void 0 && _value$address2.length)) {
|
|
124
|
-
return Promise.reject(new Error(
|
|
132
|
+
return Promise.reject(new Error("请选择地址"));
|
|
125
133
|
}
|
|
126
134
|
if (!(value !== null && value !== void 0 && value.detail)) {
|
|
127
|
-
return Promise.reject(new Error(
|
|
135
|
+
return Promise.reject(new Error("请填写详细地址"));
|
|
128
136
|
}
|
|
129
137
|
return Promise.resolve();
|
|
130
138
|
}
|
|
131
139
|
}] : [];
|
|
132
140
|
this.effects = options.effects;
|
|
133
141
|
this.addressDateInstance = AddressData.getInstance();
|
|
134
|
-
this.dataType =
|
|
142
|
+
this.dataType = "object";
|
|
135
143
|
});
|
|
136
144
|
export default BasicInput;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from
|
|
2
|
-
import { PickOption } from
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BsExchange | BsReissue | BsSystemOrder | BasicCascader | ERemark | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | CommonTradeId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, 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, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
|
|
2
|
+
import { PickOption } from "./type";
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsExchange | BsPosting | BsReissue | BsSystemOrder | BasicCascader | FlowTag | ERemark | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | CommonTradeId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,171 +1,173 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, 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, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
|
|
2
2
|
export var factory = function factory(type, options) {
|
|
3
3
|
var _options$componentCon;
|
|
4
4
|
switch (type) {
|
|
5
|
-
case
|
|
5
|
+
case "PLATFORM_INPUT":
|
|
6
6
|
return new PlatForm(options);
|
|
7
|
-
case
|
|
7
|
+
case "SHOP_INPUT":
|
|
8
8
|
return new ShopInput(options);
|
|
9
|
-
case
|
|
9
|
+
case "OPERATOR_INPUT":
|
|
10
10
|
return new Submitter(options);
|
|
11
|
-
case
|
|
11
|
+
case "HANDLER_INPUT":
|
|
12
12
|
return new Handler(options);
|
|
13
|
-
case
|
|
13
|
+
case "COMPLETED_USER_INPUT":
|
|
14
14
|
return new CompletedUser(options);
|
|
15
|
-
case
|
|
15
|
+
case "INPUT":
|
|
16
16
|
return new BasicInput(options);
|
|
17
|
-
case
|
|
17
|
+
case "RADIO":
|
|
18
18
|
return new BasicRadio(options);
|
|
19
|
-
case
|
|
19
|
+
case "TEXTAREA":
|
|
20
20
|
return new BasicTextArea(options);
|
|
21
|
-
case
|
|
21
|
+
case "CHECKBOX":
|
|
22
22
|
return new BasicCheckbox(options);
|
|
23
|
-
case
|
|
23
|
+
case "DATETIME":
|
|
24
24
|
return new BasicDataTime(options);
|
|
25
|
-
case
|
|
26
|
-
case
|
|
25
|
+
case "SELECT":
|
|
26
|
+
case "BUYER_MESSAGE_NOTICE":
|
|
27
27
|
return new BasicSelect(options);
|
|
28
|
-
case
|
|
28
|
+
case "PICTURE":
|
|
29
29
|
return new BasicPicture(options);
|
|
30
|
-
case
|
|
30
|
+
case "BASIC_MULT_SELECT":
|
|
31
31
|
return new BasicMultSelect(options);
|
|
32
|
-
case
|
|
32
|
+
case "MULT_SELECT":
|
|
33
33
|
return new BasicCascader(options);
|
|
34
|
-
case
|
|
34
|
+
case "BASIC_ADDRESS":
|
|
35
35
|
return new BasicAddress(options);
|
|
36
|
-
case
|
|
36
|
+
case "BASIC_GRADE":
|
|
37
37
|
return new BasicGrade(options);
|
|
38
|
-
case
|
|
38
|
+
case "RATE":
|
|
39
39
|
return new BasicRate(options);
|
|
40
|
-
case
|
|
40
|
+
case "FILE":
|
|
41
41
|
return new BasicFile(options);
|
|
42
|
-
case
|
|
42
|
+
case "POSTING":
|
|
43
43
|
return new BasicPosting(options);
|
|
44
|
-
case
|
|
44
|
+
case "SHOP_NAME_INPUT":
|
|
45
45
|
return new ShopName(options);
|
|
46
|
-
case
|
|
46
|
+
case "TRADE_ID_INPUT":
|
|
47
47
|
return options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.erpFlag ? new ErpTradeId(options) : new TradeId(options);
|
|
48
|
-
case
|
|
48
|
+
case "BUYER_NICK_INPUT":
|
|
49
49
|
return new BuyerNick(options);
|
|
50
|
-
case
|
|
50
|
+
case "RECEIVER_NAME_INPUT":
|
|
51
51
|
return new ReceiverName(options);
|
|
52
|
-
case
|
|
52
|
+
case "RECEIVER_MOBILE_INPUT":
|
|
53
53
|
return new ReceiverMobile(options);
|
|
54
|
-
case
|
|
54
|
+
case "RECEIVER_ADDRESS_INPUT":
|
|
55
55
|
return new ReceiverAddress(options);
|
|
56
|
-
case
|
|
57
|
-
case
|
|
58
|
-
case
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
62
|
-
case
|
|
56
|
+
case "TRADE_CREATE_DATETIME":
|
|
57
|
+
case "TRADE_PAYMENT_DATETIME":
|
|
58
|
+
case "TRADE_DELIVERY_DATETIME":
|
|
59
|
+
case "TRADE_CLOSING_DATETIME":
|
|
60
|
+
case "BS_SIGNING_TIME":
|
|
61
|
+
case "BS_SEND_TIME":
|
|
62
|
+
case "BS_TRADE_PAYMENT_TIME":
|
|
63
63
|
return new TradeDateTime(options);
|
|
64
|
-
case
|
|
64
|
+
case "EXPRESS_LOGISTICS_SELECT":
|
|
65
65
|
return new Logistics(options);
|
|
66
|
-
case
|
|
66
|
+
case "RETURN_LOGISTICS_SELECT":
|
|
67
67
|
return new ReturnLogistics(options);
|
|
68
|
-
case
|
|
69
|
-
case
|
|
70
|
-
case
|
|
71
|
-
case
|
|
68
|
+
case "ACTUAL_PAYMENT":
|
|
69
|
+
case "BS_NET_RECEIPTS":
|
|
70
|
+
case "BS_DEPOSIT":
|
|
71
|
+
case "BS_PACKAGE_WEIGHT":
|
|
72
72
|
return new ActualPayment(options);
|
|
73
|
-
case
|
|
73
|
+
case "REMARK_INPUT":
|
|
74
74
|
return new ERemark(options);
|
|
75
|
-
case
|
|
75
|
+
case "ITEM_SELECT":
|
|
76
76
|
return new ItemSelect(options);
|
|
77
|
-
case
|
|
77
|
+
case "ITEM_ID":
|
|
78
78
|
return new ItemId(options);
|
|
79
|
-
case
|
|
79
|
+
case "ITEM_ENCODE":
|
|
80
80
|
return new ItemEnCode(options);
|
|
81
|
-
case
|
|
81
|
+
case "ALI_PAY_INPUT":
|
|
82
82
|
return new AliPay(options);
|
|
83
|
-
case
|
|
83
|
+
case "ORDINARY_INVOICE":
|
|
84
84
|
return new Ordinary(options);
|
|
85
|
-
case
|
|
85
|
+
case "ITEM_SELECT_THIRD":
|
|
86
86
|
return new ThirdItemSelect(options);
|
|
87
|
-
case
|
|
87
|
+
case "ENTERPRISE_PAYMENT":
|
|
88
88
|
return new Payment(options);
|
|
89
|
-
case
|
|
89
|
+
case "SYSTEM_ORDER_NO":
|
|
90
90
|
return new SystemOrderNo(options);
|
|
91
|
-
case
|
|
91
|
+
case "LOGISTICS_INTERCEPTION":
|
|
92
92
|
return new LogisticsInterception(options);
|
|
93
|
-
case
|
|
93
|
+
case "LOGISTICS_TRAJECTORY":
|
|
94
94
|
return new LogisticsTrajectory(options);
|
|
95
|
-
case
|
|
95
|
+
case "WORK_ORDER_ID_INPUT":
|
|
96
96
|
return new WorkOrderId(options);
|
|
97
|
-
case
|
|
97
|
+
case "FLOW_STATUS_SELECT":
|
|
98
98
|
return new FlowStatusSelect(options);
|
|
99
|
-
case
|
|
99
|
+
case "FLOW_MARK_SELECT":
|
|
100
100
|
return new FlowMarkSelect(options);
|
|
101
|
-
case
|
|
101
|
+
case "FLOW_TAG":
|
|
102
|
+
return new FlowTag(options);
|
|
103
|
+
case "COMPLETED_DATETIME":
|
|
102
104
|
return new CommonDataTime(options);
|
|
103
|
-
case
|
|
105
|
+
case "CREATED_DATETIME":
|
|
104
106
|
return new CommonDataTime(options);
|
|
105
|
-
case
|
|
107
|
+
case "UPDATE_DATETIME":
|
|
106
108
|
return new CommonDataTime(options);
|
|
107
|
-
case
|
|
109
|
+
case "TEMPLATE_ID_INPUT":
|
|
108
110
|
return new TemplateSelect(options);
|
|
109
|
-
case
|
|
110
|
-
case
|
|
111
|
+
case "JST_LOGISTICS":
|
|
112
|
+
case "REISSUE_LOGISTICS":
|
|
111
113
|
return new JstLogistics(options);
|
|
112
|
-
case
|
|
114
|
+
case "JST_ITEM_SELECT_THIRD":
|
|
113
115
|
return new JstItemSelect(options);
|
|
114
|
-
case
|
|
116
|
+
case "JST_SUPPLY":
|
|
115
117
|
return new JstSupply(options);
|
|
116
|
-
case
|
|
117
|
-
case
|
|
118
|
+
case "BS_SYSTEM_ORDER":
|
|
119
|
+
case "WLN_SYSTEM_ORDER":
|
|
118
120
|
return new BsSystemOrder(options);
|
|
119
|
-
case
|
|
120
|
-
case
|
|
121
|
-
case
|
|
121
|
+
case "JST_SEND_GOOD":
|
|
122
|
+
case "BS_SEND_GOOD":
|
|
123
|
+
case "WLN_SEND_GOOD":
|
|
122
124
|
return new JstSendGood(options);
|
|
123
|
-
case
|
|
124
|
-
return new
|
|
125
|
-
case
|
|
125
|
+
case "BS_POSTING":
|
|
126
|
+
return new BsPosting(options);
|
|
127
|
+
case "BS_GOODS":
|
|
126
128
|
return new BsGoods(options);
|
|
127
|
-
case
|
|
129
|
+
case "BS_EXCHANGE_GOODS":
|
|
128
130
|
return new BsExchange(options);
|
|
129
|
-
case
|
|
131
|
+
case "BS_REISSUE_GOODS":
|
|
130
132
|
return new BsReissue(options);
|
|
131
|
-
case
|
|
133
|
+
case "BS_RETURN_GOODS":
|
|
132
134
|
return new BsReturn(options);
|
|
133
135
|
// case 'REISSUE_TRADE_ID':
|
|
134
|
-
case
|
|
135
|
-
case
|
|
136
|
-
case
|
|
136
|
+
case "BS_DELIVERY_NO":
|
|
137
|
+
case "RETURN_GOODS_TRADE_ID":
|
|
138
|
+
case "EXCHANGE_TRADE_ID":
|
|
137
139
|
return new CommonSystemOrder(options);
|
|
138
|
-
case
|
|
139
|
-
case
|
|
140
|
+
case "BS_LOGISTICS":
|
|
141
|
+
case "WLN_LOGISTICS":
|
|
140
142
|
return new BsLogistics(options);
|
|
141
|
-
case
|
|
143
|
+
case "FLOW_WORK_ORDER_ID_INPUT":
|
|
142
144
|
return new FlowWorkOrderId(options);
|
|
143
|
-
case
|
|
145
|
+
case "OUTER_WORK_ORDER_ID_INPUT":
|
|
144
146
|
return new FlowWorkOrderId(options);
|
|
145
|
-
case
|
|
146
|
-
case
|
|
147
|
-
case
|
|
148
|
-
case
|
|
147
|
+
case "REISSUE_STATUS":
|
|
148
|
+
case "ADJUST_WORK_ORDER_STATUS":
|
|
149
|
+
case "CREATE_STATUS":
|
|
150
|
+
case "INVOICE_STATUS":
|
|
149
151
|
return new StatusSelect(options);
|
|
150
|
-
case
|
|
151
|
-
case
|
|
152
|
-
case
|
|
152
|
+
case "RETURN_GOODS_STATUS":
|
|
153
|
+
case "EXCHANGE_STATUS":
|
|
154
|
+
case "WAREHOUSING_STATUS":
|
|
153
155
|
return new CommonMultiStatus(options);
|
|
154
|
-
case
|
|
156
|
+
case "REISSUE_TRADE_ID":
|
|
155
157
|
// case 'EXCHANGE_TRADE_ID':
|
|
156
158
|
return new CommonTradeId(options);
|
|
157
|
-
case
|
|
159
|
+
case "NUMERICAL_CALCULATION":
|
|
158
160
|
return new Calculation(options);
|
|
159
|
-
case
|
|
161
|
+
case "NODE_DEAD_LINE_INPUT":
|
|
160
162
|
// 工单时效
|
|
161
163
|
return new NodeDeadLine(options);
|
|
162
|
-
case
|
|
164
|
+
case "HANDLER_DEAD_LINE_INPUT":
|
|
163
165
|
// 处理人时效
|
|
164
166
|
return new HandlerDeadLine(options);
|
|
165
|
-
case
|
|
167
|
+
case "NODE_STAY_DURATION_INPUT":
|
|
166
168
|
// 工单停留时长
|
|
167
169
|
return new NodeStayDuration(options);
|
|
168
|
-
case
|
|
170
|
+
case "WLN_GOODS":
|
|
169
171
|
// 万里牛商品
|
|
170
172
|
return new WlnGoods(options);
|
|
171
173
|
default:
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export { default as BsReturn } from "./components/BS/BsReturn";
|
|
|
45
45
|
export { default as BsLogistics } from "./components/BS/BsLogistics";
|
|
46
46
|
export { default as FlowStatusSelect } from "./components/FlowStatusSelect";
|
|
47
47
|
export { default as FlowMarkSelect } from "./components/FlowMarkSelect";
|
|
48
|
+
export { default as FlowTag } from "./components/FlowTag";
|
|
48
49
|
export { default as TemplateSelect } from "./components/TemplateSelect";
|
|
49
50
|
export { default as WorkOrderId } from "./components/WorkOrderId";
|
|
50
51
|
export { default as LogisticsInterception } from "./components/LogisticsInterception";
|
|
@@ -64,6 +65,7 @@ export { default as NodeDeadLine } from "./components/NodeDeadLine";
|
|
|
64
65
|
export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
65
66
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
66
67
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
68
|
+
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
67
69
|
export { factory } from "./factory";
|
|
68
70
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
69
71
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
package/dist/esm/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export { default as BsReturn } from "./components/BS/BsReturn";
|
|
|
45
45
|
export { default as BsLogistics } from "./components/BS/BsLogistics";
|
|
46
46
|
export { default as FlowStatusSelect } from "./components/FlowStatusSelect";
|
|
47
47
|
export { default as FlowMarkSelect } from "./components/FlowMarkSelect";
|
|
48
|
+
export { default as FlowTag } from "./components/FlowTag";
|
|
48
49
|
export { default as TemplateSelect } from "./components/TemplateSelect";
|
|
49
50
|
export { default as WorkOrderId } from "./components/WorkOrderId";
|
|
50
51
|
export { default as LogisticsInterception } from "./components/LogisticsInterception";
|
|
@@ -64,6 +65,7 @@ export { default as NodeDeadLine } from "./components/NodeDeadLine";
|
|
|
64
65
|
export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
65
66
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
66
67
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
68
|
+
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
67
69
|
export { factory } from "./factory";
|
|
68
70
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
69
71
|
export { default as SelectMark } from "./commonComponents/SelectMark";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const replaceCheck: (data: any) => Promise<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface RequestProps {
|
|
2
|
+
url: string;
|
|
3
|
+
method: string;
|
|
4
|
+
data: any;
|
|
5
|
+
headers?: any;
|
|
6
|
+
infoLevel?: 'error' | 'warning' | 'quiet';
|
|
7
|
+
options?: any;
|
|
8
|
+
}
|
|
9
|
+
export interface serverProps<T = any> {
|
|
10
|
+
data?: T;
|
|
11
|
+
result: number;
|
|
12
|
+
success: boolean;
|
|
13
|
+
traceId: string;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
declare const requestApi: ({ url, method, data, headers, infoLevel, options }: RequestProps) => Promise<serverProps>;
|
|
17
|
+
export default requestApi;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
/*
|
|
8
|
+
* @Description:
|
|
9
|
+
* @Author: litian
|
|
10
|
+
* @Date: 2022-09-06 09:29:34
|
|
11
|
+
* @LastEditors: litian
|
|
12
|
+
* @LastEditTime: 2022-11-24 09:11:45
|
|
13
|
+
*/
|
|
14
|
+
import { extend } from 'umi-request';
|
|
15
|
+
import { message } from 'antd';
|
|
16
|
+
var request = extend({});
|
|
17
|
+
var requestApi = function requestApi(_ref) {
|
|
18
|
+
var url = _ref.url,
|
|
19
|
+
method = _ref.method,
|
|
20
|
+
data = _ref.data,
|
|
21
|
+
_ref$headers = _ref.headers,
|
|
22
|
+
headers = _ref$headers === void 0 ? {} : _ref$headers,
|
|
23
|
+
_ref$infoLevel = _ref.infoLevel,
|
|
24
|
+
infoLevel = _ref$infoLevel === void 0 ? 'error' : _ref$infoLevel,
|
|
25
|
+
_ref$options = _ref.options,
|
|
26
|
+
options = _ref$options === void 0 ? {} : _ref$options;
|
|
27
|
+
return new Promise(function (resolve, reject) {
|
|
28
|
+
var params = _objectSpread({
|
|
29
|
+
method: method,
|
|
30
|
+
headers: headers
|
|
31
|
+
}, options);
|
|
32
|
+
if (method.toLocaleLowerCase() === 'get') {
|
|
33
|
+
params.params = data;
|
|
34
|
+
} else {
|
|
35
|
+
params.data = data;
|
|
36
|
+
}
|
|
37
|
+
request(url, params).then(function (res) {
|
|
38
|
+
if (res.result === 100 || res.success) {
|
|
39
|
+
resolve(res);
|
|
40
|
+
} else {
|
|
41
|
+
if (infoLevel === 'warning') {
|
|
42
|
+
message.warn(res.message);
|
|
43
|
+
} else if (infoLevel === 'error') {
|
|
44
|
+
message.error(res.message);
|
|
45
|
+
} else {
|
|
46
|
+
console.log(res.message);
|
|
47
|
+
}
|
|
48
|
+
reject(res);
|
|
49
|
+
}
|
|
50
|
+
}).catch(function (e) {
|
|
51
|
+
console.error('请求错误', e);
|
|
52
|
+
reject(e);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
export default requestApi;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export interface ComponentInterface {
|
|
|
50
50
|
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
51
51
|
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput";
|
|
52
52
|
options?: Array<any>;
|
|
53
|
+
templateId?: string;
|
|
53
54
|
/**
|
|
54
55
|
* @description 组件下标
|
|
55
56
|
* @deprecated 已弃用字段,后续版本不在使用
|
|
@@ -227,7 +228,7 @@ export interface ComponentInterface {
|
|
|
227
228
|
getComponentValue: (r: Record) => any;
|
|
228
229
|
formDataTransform?: (r: any) => any;
|
|
229
230
|
}
|
|
230
|
-
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader">;
|
|
231
|
+
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId">;
|
|
231
232
|
export declare type ColumnConfig = {
|
|
232
233
|
id: string;
|
|
233
234
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.13.0-alpha.
|
|
3
|
+
"version": "0.13.0-alpha.12",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.13.0-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.13.0-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.13.0-alpha.3",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.13.0-alpha.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "96c3764429747a78680ea91dc66927309fa7b979"
|
|
44
44
|
}
|