@kmkf-fe-packages/kmkf-utils 2.2.13-beta.32 → 2.2.13-beta.45

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.
@@ -0,0 +1,10 @@
1
+ declare type ShowHeaderObjType = {
2
+ title: string;
3
+ dataIndex: string;
4
+ show?: boolean;
5
+ };
6
+ declare const getSystemShowHead: ({ columns, showHeader, }: {
7
+ columns: any[];
8
+ showHeader: (string | ShowHeaderObjType)[];
9
+ }) => any[];
10
+ export default getSystemShowHead;
@@ -0,0 +1,25 @@
1
+ var getSystemShowHead = function getSystemShowHead(_ref) {
2
+ var columns = _ref.columns,
3
+ showHeader = _ref.showHeader;
4
+ var initBaseInfoColumns = columns || [];
5
+ var baseInfoColumns = initBaseInfoColumns || [];
6
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
7
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
8
+ if (isStringArray) {
9
+ baseInfoColumns = initBaseInfoColumns.filter(function (col) {
10
+ return showHeader.includes(col.dataIndex);
11
+ });
12
+ } else if (isObjectArray) {
13
+ baseInfoColumns = showHeader.map(function (col) {
14
+ var currentCol = initBaseInfoColumns.find(function (item) {
15
+ return item.dataIndex === col.dataIndex;
16
+ }); // 如果列应该显示(show不为false),则返回对应的列配置
17
+ if (currentCol && col.show !== false) {
18
+ return currentCol;
19
+ }
20
+ return undefined;
21
+ }).filter(Boolean);
22
+ }
23
+ return baseInfoColumns || [];
24
+ };
25
+ export default getSystemShowHead;
@@ -27,3 +27,4 @@ export * as templateFn from "./template";
27
27
  export * as tree from "./multidimensionalFindChild";
28
28
  export { default as unTransField } from "./unTransField";
29
29
  export { fetchAll } from "./FetchAll";
30
+ export { default as getSystemShowHead } from "./getSystemShowHead";
@@ -30,4 +30,5 @@ export { _templateFn as templateFn };
30
30
  import * as _tree from "./multidimensionalFindChild";
31
31
  export { _tree as tree };
32
32
  export { default as unTransField } from "./unTransField";
33
- export { fetchAll } from "./FetchAll";
33
+ export { fetchAll } from "./FetchAll";
34
+ export { default as getSystemShowHead } from "./getSystemShowHead";
@@ -3,11 +3,17 @@ export declare const WDT_SYSTEM_ORDER_CONFIG: {
3
3
  key: string;
4
4
  name: string;
5
5
  selectId: string;
6
- columns: {
6
+ columns: ({
7
7
  title: string;
8
8
  dataIndex: string;
9
9
  width: number;
10
- }[];
10
+ ellipsis: boolean;
11
+ } | {
12
+ title: string;
13
+ dataIndex: string;
14
+ width: number;
15
+ ellipsis?: undefined;
16
+ })[];
11
17
  };
12
18
  export declare const WDT_ORDER_TYPE_MAP: {
13
19
  1: string;
@@ -72,19 +72,52 @@ export var WDT_SYSTEM_ORDER_CONFIG = {
72
72
  columns: [{
73
73
  title: "订单类型",
74
74
  dataIndex: "billType",
75
- width: 150
75
+ width: 150,
76
+ ellipsis: true
76
77
  }, {
77
78
  title: "系统订单号",
78
79
  dataIndex: "billNo",
79
- width: 150
80
+ width: 150,
81
+ ellipsis: true
80
82
  }, {
81
83
  title: "订单状态",
82
84
  dataIndex: "tradeStatusValue",
83
- width: 150
85
+ width: 150,
86
+ ellipsis: true
84
87
  }, {
85
88
  title: "订单标签",
86
89
  dataIndex: "billTag",
87
90
  width: 150
91
+ }, {
92
+ title: "物流公司名称",
93
+ dataIndex: "logisticsName",
94
+ width: 150,
95
+ ellipsis: true
96
+ }, {
97
+ title: "物流公司名称",
98
+ dataIndex: "logisticsName",
99
+ width: 200,
100
+ ellipsis: true
101
+ }, {
102
+ title: "物流公司编码",
103
+ dataIndex: "logisticsCode",
104
+ width: 200,
105
+ ellipsis: true
106
+ }, {
107
+ title: "物流单号",
108
+ dataIndex: "logisticsNo",
109
+ width: 200,
110
+ ellipsis: true
111
+ }, {
112
+ title: "发货仓名称",
113
+ dataIndex: "warehouseName",
114
+ width: 200,
115
+ ellipsis: true
116
+ }, {
117
+ title: "发货仓编码",
118
+ dataIndex: "warehouseNo",
119
+ width: 200,
120
+ ellipsis: true
88
121
  }]
89
122
  };
90
123
  export var WDT_ORDER_TYPE_MAP = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.2.13-beta.32",
3
+ "version": "2.2.13-beta.45",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "d0ec0985f307bffc3735962998d286b3dfec3054",
44
+ "gitHead": "20ac214089365a14e411c548e710c74a0d7521e8",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }