@kmkf-fe-packages/services-components 0.27.1-test.4 → 0.27.1-test.7
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.
|
@@ -73,7 +73,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
73
73
|
label: _this.name,
|
|
74
74
|
value: /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
75
75
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
76
|
-
type: 1
|
|
76
|
+
type: 1,
|
|
77
|
+
componentType: _this.type
|
|
77
78
|
})
|
|
78
79
|
}) : null;
|
|
79
80
|
});
|
|
@@ -120,7 +121,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
120
121
|
}
|
|
121
122
|
}, /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
122
123
|
list: list,
|
|
123
|
-
type: 1
|
|
124
|
+
type: 1,
|
|
125
|
+
componentType: _this.type
|
|
124
126
|
}));
|
|
125
127
|
});
|
|
126
128
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -147,6 +149,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
|
147
149
|
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,
|
|
148
150
|
component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
|
|
149
151
|
type: 1,
|
|
152
|
+
componentType: _this.type,
|
|
150
153
|
options: _this.expressDateInstance.getExpressData(),
|
|
151
154
|
onChange: p === null || p === void 0 ? void 0 : p.onChange
|
|
152
155
|
}))
|
|
@@ -15,7 +15,7 @@ export declare const showImage: ({ item, type, index, showHeader, }: {
|
|
|
15
15
|
}) => React.JSX.Element;
|
|
16
16
|
export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: any) => React.JSX.Element;
|
|
17
17
|
export declare const GoodImage: ({ list, type, showHeader }: any) => React.JSX.Element | null;
|
|
18
|
-
export declare const JstGoodImage: ({ list, type }: any) => any;
|
|
18
|
+
export declare const JstGoodImage: ({ list, type, componentType }: any) => any;
|
|
19
19
|
export declare const BsExpressRender: ({ list, showField }: any) => any;
|
|
20
20
|
export declare const CommonOrderContent: ({ list, valueKey, failValue, options, }: any) => any;
|
|
21
21
|
export declare const BsGoodImage: ({ item, index }: {
|
|
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from "antd";
|
|
16
16
|
import React, { useState, useMemo } from "react";
|
|
17
|
-
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { ExpressData, useSendData, useLogisticsData } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { getAlipayBillReceipt } from "../../service/api";
|
|
19
19
|
import { CopyToClipboard } from "react-copy-to-clipboard";
|
|
20
20
|
import styles from "./index.module.less";
|
|
@@ -254,10 +254,16 @@ var content = function content(item, index) {
|
|
|
254
254
|
export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
255
255
|
var _ref6$list = _ref6.list,
|
|
256
256
|
list = _ref6$list === void 0 ? [] : _ref6$list,
|
|
257
|
-
type = _ref6.type
|
|
257
|
+
type = _ref6.type,
|
|
258
|
+
_ref6$componentType = _ref6.componentType,
|
|
259
|
+
componentType = _ref6$componentType === void 0 ? '' : _ref6$componentType;
|
|
260
|
+
var _useSendData = useSendData(componentType === 'WDT_SEND_GOOD' ? 'wdt' : ''),
|
|
261
|
+
getSendNameByCode = _useSendData.getSendNameByCode;
|
|
262
|
+
var _useLogisticsData = useLogisticsData(componentType === 'WDT_LOGISTICS' ? 'wdt' : ''),
|
|
263
|
+
getNameByCode = _useLogisticsData.getNameByCode;
|
|
258
264
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
259
265
|
var logisticsCompany = item.logisticsCompany;
|
|
260
|
-
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
266
|
+
var company = componentType === 'WDT_LOGISTICS' ? getNameByCode(logisticsCompany) : ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
261
267
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
262
268
|
content: content(item, index),
|
|
263
269
|
overlayStyle: {
|
|
@@ -269,7 +275,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
269
275
|
color: "#1890ff",
|
|
270
276
|
cursor: "pointer"
|
|
271
277
|
}
|
|
272
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null));
|
|
278
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, componentType === 'WDT_SEND_GOOD' ? getSendNameByCode(item.sendName) : item.sendName].join("/") : item.sendId ? item.sendId : componentType === 'WDT_SEND_GOOD' ? getSendNameByCode(item.sendName) : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null));
|
|
273
279
|
}) : null;
|
|
274
280
|
};
|
|
275
281
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
@@ -100,7 +100,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
100
100
|
label: _this.name,
|
|
101
101
|
value: /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
102
102
|
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
103
|
-
type: 3
|
|
103
|
+
type: 3,
|
|
104
|
+
componentType: _this.type
|
|
104
105
|
})
|
|
105
106
|
}) : null;
|
|
106
107
|
});
|
|
@@ -114,7 +115,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
114
115
|
}
|
|
115
116
|
}, /*#__PURE__*/React.createElement(JstGoodImage, {
|
|
116
117
|
list: list,
|
|
117
|
-
type: 3
|
|
118
|
+
type: 3,
|
|
119
|
+
componentType: _this.type
|
|
118
120
|
}));
|
|
119
121
|
});
|
|
120
122
|
_defineProperty(this, "renderLog", function (r) {
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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, 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) => BsReissue | BuyerNick | CommonInput | JstSendGood |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsReissue | BuyerNick | CommonInput | JstSendGood | PaymentVoucherCode | BasicSelect | WdtReissue | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReturn | 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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.27.1-test.
|
|
3
|
+
"version": "0.27.1-test.7",
|
|
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": "^0.27.1-test.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.27.1-test.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.27.1-test.7",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.27.1-test.7"
|
|
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": "8d75e5eeca6c2b783dd065d893e62731da836488",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|