@kmkf-fe-packages/services-components 1.22.2 → 1.22.3
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/BS/BsSystemOrder/index.js +4 -2
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +1 -0
- package/dist/esm/components/BS/common/BsHeaderChild.js +7 -1
- package/dist/esm/components/Common/index.js +12 -4
- package/dist/esm/components/JST/JstSendGood/index.js +7 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +5 -4
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
|
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import GetFormItem from "../../GetFormItem";
|
|
13
13
|
import ItemView from "../../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_ORDER_STATUS_MAP } from
|
|
14
|
+
import { isNull, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_ORDER_STATUS_MAP, KM_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import { BsSystemOrder as SystemOrder } from '@kmkf-fe-packages/basic-components';
|
|
16
16
|
import { BsSystemOrderTable } from "../../Common";
|
|
17
17
|
import { BsHeaderChild } from "../common/index";
|
|
@@ -19,7 +19,7 @@ import { SYMBOL, batchInput } from "../../../constant";
|
|
|
19
19
|
var typeMap = {
|
|
20
20
|
BS_SYSTEM_ORDER: {
|
|
21
21
|
key: 'bsSystemShowOrder',
|
|
22
|
-
name: '
|
|
22
|
+
name: '百胜',
|
|
23
23
|
selectId: 'bsSystemSelectIds',
|
|
24
24
|
columns: [{
|
|
25
25
|
title: "单据类型",
|
|
@@ -50,6 +50,7 @@ var typeMap = {
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
|
|
53
|
+
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG,
|
|
53
54
|
WLN_SYSTEM_ORDER: {
|
|
54
55
|
key: 'wlnSystemShowOrder',
|
|
55
56
|
name: '万里牛',
|
|
@@ -246,6 +247,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
|
|
|
246
247
|
this.canSort = false;
|
|
247
248
|
this.children = ((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : (_typeMap$options$type2 = _typeMap$options$type.columns) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.map(function (column) {
|
|
248
249
|
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
250
|
+
transformValue: column.render,
|
|
249
251
|
name: column.title,
|
|
250
252
|
id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_").concat(column.dataIndex),
|
|
251
253
|
width: column.width || 150
|
|
@@ -13,6 +13,7 @@ declare class BsHeaderChild implements ComponentInterface {
|
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface['dataType'];
|
|
16
|
+
transformValue: (val: any) => any;
|
|
16
17
|
constructor(options: PickOption);
|
|
17
18
|
getParentId: () => string;
|
|
18
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -29,6 +29,9 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
29
29
|
_defineProperty(this, "canSort", void 0);
|
|
30
30
|
_defineProperty(this, "children", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "transformValue", function (val) {
|
|
33
|
+
return val;
|
|
34
|
+
});
|
|
32
35
|
_defineProperty(this, "getParentId", function () {
|
|
33
36
|
var _this$id$split = _this.id.split('_'),
|
|
34
37
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
@@ -54,7 +57,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
54
57
|
return _this.renderPc(undefined, r);
|
|
55
58
|
});
|
|
56
59
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
57
|
-
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
60
|
+
return _this.transformValue(r === null || r === void 0 ? void 0 : r[_this.id]);
|
|
58
61
|
});
|
|
59
62
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
60
63
|
var _this$getComponentVal2;
|
|
@@ -79,5 +82,8 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
79
82
|
this.canSort = false;
|
|
80
83
|
this.dataType = 'string';
|
|
81
84
|
this.children = [];
|
|
85
|
+
if (options.transformValue) {
|
|
86
|
+
this.transformValue = options.transformValue;
|
|
87
|
+
}
|
|
82
88
|
});
|
|
83
89
|
export default BsHeaderChild;
|
|
@@ -20,6 +20,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
|
20
20
|
import styles from "./index.module.less";
|
|
21
21
|
import defaultImg from "./img/default-img.png";
|
|
22
22
|
import CopyText from "../../commonComponents/CopyText";
|
|
23
|
+
import { KM_SYSTEM_ORDER_CONFIG } from '@kmkf-fe-packages/kmkf-utils';
|
|
23
24
|
var Paragraph = Typography.Paragraph;
|
|
24
25
|
export var getFormItem = function getFormItem(_ref) {
|
|
25
26
|
var name = _ref.name,
|
|
@@ -238,11 +239,16 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
238
239
|
})) : null;
|
|
239
240
|
};
|
|
240
241
|
var content = function content(item, index) {
|
|
241
|
-
return /*#__PURE__*/React.createElement("div",
|
|
242
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
243
|
+
style: {
|
|
244
|
+
maxHeight: '300px',
|
|
245
|
+
overflowY: 'auto'
|
|
246
|
+
}
|
|
247
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
242
248
|
style: {
|
|
243
249
|
textAlign: 'center'
|
|
244
250
|
}
|
|
245
|
-
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
251
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F"), item.sid && /*#__PURE__*/React.createElement("span", null, "(\u7CFB\u7EDF\u5355\u53F7:", item.sid, ")")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
246
252
|
return /*#__PURE__*/React.createElement("div", {
|
|
247
253
|
key: index
|
|
248
254
|
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -258,7 +264,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
258
264
|
type = _ref6.type,
|
|
259
265
|
_ref6$platformType = _ref6.platformType,
|
|
260
266
|
platformType = _ref6$platformType === void 0 ? 'default' : _ref6$platformType;
|
|
261
|
-
var getSendName = function getSendName(item
|
|
267
|
+
var getSendName = function getSendName(item) {
|
|
262
268
|
return SendDataCenter.getInstance(platformType).getSendNameByCode(item.sendName);
|
|
263
269
|
};
|
|
264
270
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
@@ -279,7 +285,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
279
285
|
text: item.logisticsCode
|
|
280
286
|
})) : company ? company : item.logisticsCode ? /*#__PURE__*/React.createElement(CopyText, {
|
|
281
287
|
text: item.logisticsCode
|
|
282
|
-
}) : null) : 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, getSendName(item
|
|
288
|
+
}) : null) : 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, getSendName(item)].join("/") : item.sendId ? item.sendId : getSendName(item)) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
|
|
283
289
|
}) : null;
|
|
284
290
|
};
|
|
285
291
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
@@ -1149,6 +1155,7 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
1149
1155
|
// },
|
|
1150
1156
|
],
|
|
1151
1157
|
|
|
1158
|
+
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
1152
1159
|
WLN_SYSTEM_ORDER: [{
|
|
1153
1160
|
dataIndex: 'billType',
|
|
1154
1161
|
title: '单据类型'
|
|
@@ -1239,6 +1246,7 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
1239
1246
|
};
|
|
1240
1247
|
var rowKeyMap = {
|
|
1241
1248
|
BS_SYSTEM_ORDER: 'billNo',
|
|
1249
|
+
KM_SYSTEM_ORDER: 'billNo',
|
|
1242
1250
|
WLN_SYSTEM_ORDER: 'billNo',
|
|
1243
1251
|
WDT_SYSTEM_ORDER: 'billNo',
|
|
1244
1252
|
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
@@ -43,6 +43,13 @@ var typeMap = {
|
|
|
43
43
|
sendName: "wlnSendName",
|
|
44
44
|
platformType: 'default'
|
|
45
45
|
},
|
|
46
|
+
KM_SEND_GOOD: {
|
|
47
|
+
key: "kmSendGood",
|
|
48
|
+
name: "km",
|
|
49
|
+
sendId: "kmSendId",
|
|
50
|
+
sendName: "kmSendName",
|
|
51
|
+
platformType: 'km'
|
|
52
|
+
},
|
|
46
53
|
WDT_SEND_GOOD: {
|
|
47
54
|
key: "wdtSendGood",
|
|
48
55
|
name: "wdt",
|
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, 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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, 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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsGoods | BsSystemOrder | JstSendGood | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | 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 | Payment | JstLogistics | JstItemSelect | JstSupply | BsE3Goods | BsE3Reissue | 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 | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
|
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, SubForm, 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, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue,
|
|
3
|
+
CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, AfterSalesOrderId, BsE3Goods, BsE3Reissue } from "./index";
|
|
4
4
|
export var factory = function factory(type, options) {
|
|
5
5
|
var _options$componentCon;
|
|
6
6
|
switch (type) {
|
|
@@ -130,6 +130,7 @@ export var factory = function factory(type, options) {
|
|
|
130
130
|
case "JST_SUPPLY":
|
|
131
131
|
return new JstSupply(options);
|
|
132
132
|
case "BS_SYSTEM_ORDER":
|
|
133
|
+
case "KM_SYSTEM_ORDER":
|
|
133
134
|
case "WLN_SYSTEM_ORDER":
|
|
134
135
|
case "WDT_SYSTEM_ORDER":
|
|
135
136
|
case "BS_E3_SYSTEM_ORDER":
|
|
@@ -139,6 +140,7 @@ export var factory = function factory(type, options) {
|
|
|
139
140
|
case "BS_E3_SEND_GOOD":
|
|
140
141
|
case "WLN_SEND_GOOD":
|
|
141
142
|
case "WDT_SEND_GOOD":
|
|
143
|
+
case "KM_SEND_GOOD":
|
|
142
144
|
return new JstSendGood(options);
|
|
143
145
|
case "BS_POSTING":
|
|
144
146
|
return new BsPosting(options);
|
|
@@ -222,9 +224,8 @@ export var factory = function factory(type, options) {
|
|
|
222
224
|
return new PaymentVoucherCode(options);
|
|
223
225
|
case "LABEL":
|
|
224
226
|
return new Label(options);
|
|
225
|
-
case "KM_SEND_GOOD":
|
|
226
|
-
|
|
227
|
-
return new KmErpSendGood(options);
|
|
227
|
+
// case "KM_SEND_GOOD": // 快麦ERP发货仓
|
|
228
|
+
// return new KmErpSendGood(options);
|
|
228
229
|
case "AFTER_SALES_ORDER_ID":
|
|
229
230
|
// 售后单ID
|
|
230
231
|
return new AfterSalesOrderId(options);
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare type FilterConfigType = {
|
|
|
29
29
|
};
|
|
30
30
|
export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
|
|
31
31
|
export interface ComponentInterface {
|
|
32
|
+
transformValue?: (val: any) => any;
|
|
32
33
|
id: string;
|
|
33
34
|
sortField: string;
|
|
34
35
|
sortChildField?: {
|
|
@@ -269,7 +270,7 @@ export interface ComponentInterface {
|
|
|
269
270
|
getComponentValue: (r: Record) => any;
|
|
270
271
|
formDataTransform?: (r: any) => any;
|
|
271
272
|
}
|
|
272
|
-
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey">;
|
|
273
|
+
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey" | "transformValue">;
|
|
273
274
|
export declare type ColumnConfig = {
|
|
274
275
|
id: string;
|
|
275
276
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.3",
|
|
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": "1.22.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.22.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.22.3",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.22.3",
|
|
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": "9c97c7586a46a7c32aac5b8b255bf0d369a073b2",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|