@kmkf-fe-packages/services-components 1.0.5-rc.1 → 1.0.6-alpha.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.
- package/README.md +2 -1
- package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/index.js +2 -3
- package/dist/esm/commonComponents/ShopList/index.d.ts +2 -2
- package/dist/esm/commonComponents/ShopList/index.js +67 -23
- package/dist/esm/components/Common/index.js +2 -2
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +4 -5
- package/dist/esm/index.d.ts +3 -4
- package/dist/esm/index.js +0 -1
- package/dist/esm/service/api.d.ts +0 -1
- package/dist/esm/service/api.js +1 -20
- package/package.json +4 -4
- package/dist/esm/components/Label/index.d.ts +0 -28
- package/dist/esm/components/Label/index.js +0 -132
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData"
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData";
|
|
3
3
|
declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
|
|
4
4
|
requestList?: RequestType[] | undefined;
|
|
5
5
|
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState } from "react";
|
|
17
17
|
import { Skeleton, Result, Button } from "antd";
|
|
18
|
-
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtLogisticsCompany, queryWdtSendData
|
|
18
|
+
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
|
|
19
19
|
import { servers } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
20
|
var Global = function Global(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
@@ -42,8 +42,7 @@ var Global = function Global(_ref) {
|
|
|
42
42
|
queryWdtAddressData: servers.queryWdtAddressData,
|
|
43
43
|
queryAllLogisticsCompany: queryAllLogisticsCompany,
|
|
44
44
|
queryWdtLogisticsCompany: queryWdtLogisticsCompany,
|
|
45
|
-
queryWdtSendData: queryWdtSendData
|
|
46
|
-
queryLabel: queryLabel
|
|
45
|
+
queryWdtSendData: queryWdtSendData
|
|
47
46
|
};
|
|
48
47
|
mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
|
|
49
48
|
promises = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
declare type Shop = {
|
|
3
3
|
auditStatus: number;
|
|
4
4
|
shopId: string;
|
|
@@ -10,5 +10,5 @@ declare type ShopListProps = {
|
|
|
10
10
|
shopList: Shop[];
|
|
11
11
|
[prop: string]: any;
|
|
12
12
|
};
|
|
13
|
-
declare const ShopList: ({ disabledList, shopList, valueMapping, onChange, setShopId, ...prop }: ShopListProps) => React.JSX.Element;
|
|
13
|
+
declare const ShopList: ({ disabledList, shopList, valueMapping, onChange, setShopId, isShowSelectAll, ...prop }: ShopListProps) => React.JSX.Element;
|
|
14
14
|
export default ShopList;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
var _excluded = ["disabledList", "shopList", "valueMapping", "onChange", "setShopId"];
|
|
1
|
+
var _excluded = ["disabledList", "shopList", "valueMapping", "onChange", "setShopId", "isShowSelectAll"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
import React from
|
|
6
|
-
import { Select } from
|
|
11
|
+
import React, { useRef, useState } from "react";
|
|
12
|
+
import { Select, Checkbox, Divider } from "antd";
|
|
7
13
|
import PlatformAvatar from "../PlatformAvatar";
|
|
8
|
-
import { PlatData } from
|
|
14
|
+
import { PlatData } from "@kmkf-fe-packages/kmkf-utils";
|
|
9
15
|
var ShopList = function ShopList(_ref) {
|
|
10
|
-
var _shopList$filter;
|
|
11
16
|
var _ref$disabledList = _ref.disabledList,
|
|
12
17
|
disabledList = _ref$disabledList === void 0 ? [] : _ref$disabledList,
|
|
13
18
|
shopList = _ref.shopList,
|
|
@@ -15,32 +20,71 @@ var ShopList = function ShopList(_ref) {
|
|
|
15
20
|
valueMapping = _ref$valueMapping === void 0 ? "shopId" : _ref$valueMapping,
|
|
16
21
|
onChange = _ref.onChange,
|
|
17
22
|
setShopId = _ref.setShopId,
|
|
23
|
+
_ref$isShowSelectAll = _ref.isShowSelectAll,
|
|
24
|
+
isShowSelectAll = _ref$isShowSelectAll === void 0 ? false : _ref$isShowSelectAll,
|
|
18
25
|
prop = _objectWithoutProperties(_ref, _excluded);
|
|
19
26
|
var handleChange = function handleChange(val) {
|
|
20
27
|
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
21
28
|
setShopId === null || setShopId === void 0 ? void 0 : setShopId(val);
|
|
22
29
|
};
|
|
23
30
|
var platDatInstance = PlatData.getInstance();
|
|
31
|
+
var _useState = useState(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
selectAll = _useState2[0],
|
|
34
|
+
setSelectAll = _useState2[1];
|
|
35
|
+
var canSelectShopValueList = useRef([]);
|
|
36
|
+
if (isShowSelectAll) {
|
|
37
|
+
canSelectShopValueList.current = shopList.filter(function (item) {
|
|
38
|
+
return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1 || (item === null || item === void 0 ? void 0 : item.disabled) || disabledList.includes(item === null || item === void 0 ? void 0 : item[valueMapping]);
|
|
39
|
+
}).map(function (item) {
|
|
40
|
+
return item === null || item === void 0 ? void 0 : item[valueMapping];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
24
43
|
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
25
44
|
onChange: handleChange
|
|
26
|
-
}, prop
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
}, prop, {
|
|
46
|
+
dropdownRender: function dropdownRender() {
|
|
47
|
+
var _shopList$filter;
|
|
48
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isShowSelectAll && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
style: {
|
|
50
|
+
padding: "4px 8px 8px 12px",
|
|
51
|
+
cursor: "pointer"
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
54
|
+
checked: selectAll,
|
|
55
|
+
onChange: function onChange(e) {
|
|
56
|
+
if (e.target.checked) {
|
|
57
|
+
setSelectAll(true);
|
|
58
|
+
handleChange(canSelectShopValueList.current.join(","));
|
|
59
|
+
} else {
|
|
60
|
+
setSelectAll(false);
|
|
61
|
+
handleChange("");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}, "\u5168\u9009")), /*#__PURE__*/React.createElement(Divider, {
|
|
65
|
+
style: {
|
|
66
|
+
margin: "0"
|
|
67
|
+
}
|
|
68
|
+
})), shopList === null || shopList === void 0 ? void 0 : (_shopList$filter = shopList.filter(function (item) {
|
|
69
|
+
return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1;
|
|
70
|
+
})) === null || _shopList$filter === void 0 ? void 0 : _shopList$filter.map(function (item) {
|
|
71
|
+
var _platDatInstance$getP;
|
|
72
|
+
var plat = (_platDatInstance$getP = platDatInstance.getPlatData()) === null || _platDatInstance$getP === void 0 ? void 0 : _platDatInstance$getP.find(function (plat) {
|
|
73
|
+
return plat.platformType === item.shopSource;
|
|
74
|
+
});
|
|
75
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
76
|
+
disabled: item.disabled || disabledList.includes(item === null || item === void 0 ? void 0 : item[valueMapping]),
|
|
77
|
+
value: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
78
|
+
key: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
79
|
+
label: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || "").concat(item.shopName)
|
|
80
|
+
}, /*#__PURE__*/React.createElement(PlatformAvatar, {
|
|
81
|
+
styles: {
|
|
82
|
+
marginRight: 5
|
|
83
|
+
},
|
|
84
|
+
type: item.shopSource
|
|
85
|
+
}), /*#__PURE__*/React.createElement("span", null, (plat === null || plat === void 0 ? void 0 : plat.platformName) && "\u3010".concat(plat === null || plat === void 0 ? void 0 : plat.platformName, "\u3011"), item.shopName));
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
44
88
|
}));
|
|
45
89
|
};
|
|
46
90
|
export default ShopList;
|
|
@@ -16,10 +16,10 @@ import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Ty
|
|
|
16
16
|
import React, { useState, useMemo } from "react";
|
|
17
17
|
import { ExpressData, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { getAlipayBillReceipt } from "../../service/api";
|
|
19
|
-
import { CopyToClipboard } from
|
|
20
|
-
import CopyText from "../../commonComponents/CopyText";
|
|
19
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
21
20
|
import styles from "./index.module.less";
|
|
22
21
|
import defaultImg from "./img/default-img.png";
|
|
22
|
+
import CopyText from "../../commonComponents/CopyText";
|
|
23
23
|
var Paragraph = Typography.Paragraph;
|
|
24
24
|
export var getFormItem = function getFormItem(_ref) {
|
|
25
25
|
var name = _ref.name,
|
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, 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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, 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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => AliPay |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => AliPay | BasicCascader | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | CommonInput | PaymentVoucherCode;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
|
|
2
2
|
// CommonTradeId,
|
|
3
|
-
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -139,8 +139,6 @@ export var factory = function factory(type, options) {
|
|
|
139
139
|
return new BsPosting(options);
|
|
140
140
|
case "BS_GOODS":
|
|
141
141
|
return new BsGoods(options);
|
|
142
|
-
case "WDT_GOODS":
|
|
143
|
-
return new WdtGoods(options);
|
|
144
142
|
case "BS_EXCHANGE_GOODS":
|
|
145
143
|
return new BsExchange(options);
|
|
146
144
|
case "BS_REISSUE_GOODS":
|
|
@@ -199,12 +197,13 @@ export var factory = function factory(type, options) {
|
|
|
199
197
|
return new CommonDataTime(options);
|
|
200
198
|
case "FLOW_UPDATE_DATETIME":
|
|
201
199
|
return new CommonDataTime(options);
|
|
200
|
+
case "WDT_GOODS":
|
|
201
|
+
// 万里牛商品
|
|
202
|
+
return new WdtGoods(options);
|
|
202
203
|
case "BUSINESS_ORDER_NO":
|
|
203
204
|
return new CommonInput(options);
|
|
204
205
|
case "PAYMENT_VOUCHER_CODE":
|
|
205
206
|
return new PaymentVoucherCode(options);
|
|
206
|
-
case "LABEL":
|
|
207
|
-
return new Label(options);
|
|
208
207
|
default:
|
|
209
208
|
return new BasicInput(options);
|
|
210
209
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -70,14 +70,13 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
|
|
|
70
70
|
export { default as NodeStayDuration } from "./components/NodeStayDuration";
|
|
71
71
|
export { default as WlnGoods } from "./components/WLN/WlnGoods";
|
|
72
72
|
export { default as BsPosting } from "./components/BS/BsPosting";
|
|
73
|
-
export { default as NodeInput } from
|
|
74
|
-
export { default as FlowWorkOrderStatus } from
|
|
75
|
-
export { default as MsgStatus } from
|
|
73
|
+
export { default as NodeInput } from "./components/NodeInput";
|
|
74
|
+
export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus";
|
|
75
|
+
export { default as MsgStatus } from "./components/MsgStatus";
|
|
76
76
|
export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
77
77
|
export { default as WdtReissue } from "./components/WDT/WdtRessuie";
|
|
78
78
|
export { default as CommonInput } from "./components/CommonInput";
|
|
79
79
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
80
|
-
export { default as Label } from "./components/Label";
|
|
81
80
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
82
81
|
export { factory } from "./factory";
|
|
83
82
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
package/dist/esm/index.js
CHANGED
|
@@ -77,7 +77,6 @@ export { default as WdtGoods } from "./components/WDT/WdtGoods";
|
|
|
77
77
|
export { default as WdtReissue } from "./components/WDT/WdtRessuie";
|
|
78
78
|
export { default as CommonInput } from "./components/CommonInput";
|
|
79
79
|
export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
|
|
80
|
-
export { default as Label } from "./components/Label";
|
|
81
80
|
// TODO: ERP 打款工单使用
|
|
82
81
|
export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
|
|
83
82
|
export { factory } from "./factory";
|
|
@@ -9,4 +9,3 @@ export declare const queryAllLogisticsCompany: () => Promise<void>;
|
|
|
9
9
|
export declare const queryWdtLogisticsCompany: () => Promise<void>;
|
|
10
10
|
export declare const queryWdtSendData: () => Promise<void>;
|
|
11
11
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
12
|
-
export declare const queryLabel: () => Promise<any>;
|
package/dist/esm/service/api.js
CHANGED
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
-
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, WdtSendData, servers, WDT
|
|
13
|
+
import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, WdtSendData, servers, WDT } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import get from "lodash/get";
|
|
15
15
|
import request from "./request";
|
|
16
16
|
// 重复校验
|
|
@@ -267,23 +267,4 @@ export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
|
|
|
267
267
|
method: "post",
|
|
268
268
|
data: data
|
|
269
269
|
});
|
|
270
|
-
};
|
|
271
|
-
export var queryLabel = function queryLabel() {
|
|
272
|
-
return request({
|
|
273
|
-
url: "/qy/diamond/getConfigInfo",
|
|
274
|
-
method: "get",
|
|
275
|
-
data: {
|
|
276
|
-
key: 'RISK_WARING_LABEL_LIST'
|
|
277
|
-
}
|
|
278
|
-
}).then(function (res) {
|
|
279
|
-
var data = res.data;
|
|
280
|
-
var instance = LabelData.getInstance();
|
|
281
|
-
try {
|
|
282
|
-
var finalData = JSON.parse(data);
|
|
283
|
-
instance.labelData = finalData;
|
|
284
|
-
} catch (e) {
|
|
285
|
-
console.error('转换标签数据数据异常');
|
|
286
|
-
instance.labelData = [];
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
270
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6-alpha.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^1.0.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^1.0.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^1.0.6-alpha.0",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^1.0.6-alpha.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "590b13c79e758aec62e717947510e6244eb7c510",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { LabelData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
-
declare class Label implements ComponentInterface {
|
|
5
|
-
name: string;
|
|
6
|
-
id: string;
|
|
7
|
-
sortField: string;
|
|
8
|
-
type: string;
|
|
9
|
-
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface["dataType"];
|
|
16
|
-
options: ComponentInterface["options"];
|
|
17
|
-
labelDateInstance: InstanceType<typeof LabelData>;
|
|
18
|
-
constructor(options: PickOption);
|
|
19
|
-
getComponentValue: (r: Record) => any;
|
|
20
|
-
editRender: (p: any) => React.JSX.Element;
|
|
21
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
|
-
showDetail: (value: Array<string>) => React.JSX.Element;
|
|
23
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
24
|
-
renderLog: (r: Record) => React.JSX.Element;
|
|
25
|
-
renderExport: (value: any, record: Record) => any;
|
|
26
|
-
filterConfig: (item: ColumnConfig) => never[];
|
|
27
|
-
}
|
|
28
|
-
export default Label;
|
|
@@ -1,132 +0,0 @@
|
|
|
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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { Tag, Select, Space } from 'antd';
|
|
11
|
-
import { LabelData, isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
-
import GetFormItem from "../GetFormItem";
|
|
13
|
-
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
var EditRenderItem = function EditRenderItem(props) {
|
|
15
|
-
var tagRender = function tagRender(prop) {
|
|
16
|
-
var _props$options, _props$options$find;
|
|
17
|
-
var label = prop.label,
|
|
18
|
-
closable = prop.closable,
|
|
19
|
-
onClose = prop.onClose,
|
|
20
|
-
value = prop.value;
|
|
21
|
-
var color = props === null || props === void 0 ? void 0 : (_props$options = props.options) === null || _props$options === void 0 ? void 0 : (_props$options$find = _props$options.find(function (item) {
|
|
22
|
-
return item.value === value;
|
|
23
|
-
})) === null || _props$options$find === void 0 ? void 0 : _props$options$find.color;
|
|
24
|
-
var onPreventMouseDown = function onPreventMouseDown(event) {
|
|
25
|
-
event.preventDefault();
|
|
26
|
-
event.stopPropagation();
|
|
27
|
-
};
|
|
28
|
-
return /*#__PURE__*/React.createElement(Tag, {
|
|
29
|
-
color: color,
|
|
30
|
-
onMouseDown: onPreventMouseDown,
|
|
31
|
-
closable: closable,
|
|
32
|
-
onClose: onClose,
|
|
33
|
-
style: {
|
|
34
|
-
marginRight: 3
|
|
35
|
-
}
|
|
36
|
-
}, label);
|
|
37
|
-
};
|
|
38
|
-
return /*#__PURE__*/React.createElement(Select, _extends({}, props, {
|
|
39
|
-
mode: "multiple",
|
|
40
|
-
showArrow: true,
|
|
41
|
-
tagRender: tagRender
|
|
42
|
-
}));
|
|
43
|
-
};
|
|
44
|
-
var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
45
|
-
var _this = this,
|
|
46
|
-
_this$componentConfig3;
|
|
47
|
-
_classCallCheck(this, Label);
|
|
48
|
-
_defineProperty(this, "name", void 0);
|
|
49
|
-
_defineProperty(this, "id", void 0);
|
|
50
|
-
_defineProperty(this, "sortField", void 0);
|
|
51
|
-
_defineProperty(this, "type", void 0);
|
|
52
|
-
_defineProperty(this, "rules", void 0);
|
|
53
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
54
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
55
|
-
_defineProperty(this, "formField", void 0);
|
|
56
|
-
_defineProperty(this, "canSort", void 0);
|
|
57
|
-
_defineProperty(this, "children", void 0);
|
|
58
|
-
_defineProperty(this, "dataType", void 0);
|
|
59
|
-
_defineProperty(this, "options", void 0);
|
|
60
|
-
_defineProperty(this, "labelDateInstance", void 0);
|
|
61
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
62
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_label")];
|
|
63
|
-
});
|
|
64
|
-
_defineProperty(this, "editRender", function (p) {
|
|
65
|
-
var _this$componentConfig, _this$componentConfig2;
|
|
66
|
-
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
67
|
-
title: _this.name,
|
|
68
|
-
name: _this.id,
|
|
69
|
-
rules: _this.rules,
|
|
70
|
-
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
71
|
-
display: p === null || p === void 0 ? void 0 : p.display,
|
|
72
|
-
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
73
|
-
component: /*#__PURE__*/React.createElement(EditRenderItem, _extends({}, _this.componentConfig, {
|
|
74
|
-
placeholder: "\u7CFB\u7EDF\u81EA\u52A8\u751F\u6210",
|
|
75
|
-
showSearch: true,
|
|
76
|
-
onChange: p === null || p === void 0 ? void 0 : p.onChange,
|
|
77
|
-
options: _this.labelDateInstance.labelData,
|
|
78
|
-
optionFilterProp: "label"
|
|
79
|
-
}))
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
83
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
84
|
-
id: _this.id,
|
|
85
|
-
label: _this.name,
|
|
86
|
-
value: _this.showDetail(record === null || record === void 0 ? void 0 : record["".concat(_this.id)])
|
|
87
|
-
}) : null;
|
|
88
|
-
});
|
|
89
|
-
_defineProperty(this, "showDetail", function (value) {
|
|
90
|
-
return /*#__PURE__*/React.createElement(Space, {
|
|
91
|
-
style: {
|
|
92
|
-
flexWrap: 'wrap'
|
|
93
|
-
}
|
|
94
|
-
}, Array.isArray(value) ? value === null || value === void 0 ? void 0 : value.map(function (v) {
|
|
95
|
-
var _this$labelDateInstan;
|
|
96
|
-
var label = ((_this$labelDateInstan = _this.labelDateInstance.labelData) === null || _this$labelDateInstan === void 0 ? void 0 : _this$labelDateInstan.find(function (item) {
|
|
97
|
-
return item.value === v;
|
|
98
|
-
})) || {};
|
|
99
|
-
if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
|
|
100
|
-
color: label === null || label === void 0 ? void 0 : label.color
|
|
101
|
-
}, label === null || label === void 0 ? void 0 : label.label);
|
|
102
|
-
return null;
|
|
103
|
-
}) : "--");
|
|
104
|
-
});
|
|
105
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
106
|
-
return _this.showDetail(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_label")]);
|
|
107
|
-
});
|
|
108
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
109
|
-
return _this.renderPc(undefined, r);
|
|
110
|
-
});
|
|
111
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
112
|
-
var _record;
|
|
113
|
-
return record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : _record.join('、');
|
|
114
|
-
});
|
|
115
|
-
_defineProperty(this, "filterConfig", function (item) {
|
|
116
|
-
return [];
|
|
117
|
-
});
|
|
118
|
-
this.name = options.name;
|
|
119
|
-
this.id = options.id;
|
|
120
|
-
this.sortField = options.id;
|
|
121
|
-
this.formField = options.id;
|
|
122
|
-
this.type = options.type;
|
|
123
|
-
this.componentConfig = options.componentConfig;
|
|
124
|
-
this.rules = [];
|
|
125
|
-
this.isCombinationComponent = false;
|
|
126
|
-
this.canSort = false;
|
|
127
|
-
this.children = [];
|
|
128
|
-
this.dataType = "array";
|
|
129
|
-
this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
|
|
130
|
-
this.labelDateInstance = LabelData.getInstance();
|
|
131
|
-
});
|
|
132
|
-
export default Label;
|