@kmkf-fe-packages/services-components 2.2.13-beta.41 → 2.2.13-beta.43

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.
@@ -16,6 +16,7 @@ import { BsSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components
16
16
  import { BsSystemOrderTable } from "../../Common";
17
17
  import { BsHeaderChild } from "../common/index";
18
18
  import { SYMBOL, batchInput } from "../../../constant";
19
+ import { getSystemShowHead } from "@kmkf-fe-packages/kmkf-utils";
19
20
  var typeMap = {
20
21
  BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG,
21
22
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG,
@@ -28,9 +29,10 @@ var typeMap = {
28
29
  };
29
30
  var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
30
31
  var _this = this,
32
+ _getSystemShowHead,
31
33
  _typeMap$options$type,
32
- _typeMap$options$type2,
33
- _this$componentConfig3;
34
+ _options$componentCon,
35
+ _this$componentConfig5;
34
36
  _classCallCheck(this, BsSystemOrder);
35
37
  _defineProperty(this, "name", void 0);
36
38
  _defineProperty(this, "id", void 0);
@@ -45,12 +47,14 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
45
47
  _defineProperty(this, "dataType", void 0);
46
48
  _defineProperty(this, "children", void 0);
47
49
  _defineProperty(this, "renderClient", function (record) {
50
+ var _this$componentConfig;
48
51
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
49
52
  id: _this.id,
50
53
  label: _this.name,
51
54
  value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
52
55
  value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
53
- type: _this.type
56
+ type: _this.type,
57
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
54
58
  })
55
59
  })) : null;
56
60
  });
@@ -58,13 +62,15 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
58
62
  return null;
59
63
  });
60
64
  _defineProperty(this, "renderLog", function (r) {
65
+ var _this$componentConfig2;
61
66
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)])) return null;
62
67
  return /*#__PURE__*/React.createElement(BsSystemOrderTable, {
63
68
  value: {
64
69
  showOrderInfo: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)],
65
70
  selectIds: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].selectId)]
66
71
  },
67
- type: _this.type
72
+ type: _this.type,
73
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
68
74
  });
69
75
  });
70
76
  _defineProperty(this, "getComponentValue", function (r) {
@@ -74,7 +80,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
74
80
  return null;
75
81
  });
76
82
  _defineProperty(this, "editRender", function (p) {
77
- var _this$componentConfig, _this$componentConfig2;
83
+ var _this$componentConfig3, _this$componentConfig4;
78
84
  return /*#__PURE__*/React.createElement(GetFormItem, {
79
85
  title: _this.name,
80
86
  name: _this.id,
@@ -82,7 +88,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
82
88
  required: false,
83
89
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
84
90
  display: p === null || p === void 0 ? void 0 : p.display,
85
- tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
91
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
86
92
  component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
87
93
  onChange: p === null || p === void 0 ? void 0 : p.onChange,
88
94
  type: _this.type
@@ -111,7 +117,10 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
111
117
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
112
118
  this.isCombinationComponent = true;
113
119
  this.canSort = false;
114
- 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) {
120
+ this.children = ((_getSystemShowHead = getSystemShowHead({
121
+ columns: ((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.columns) || [],
122
+ showHeader: (options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []
123
+ })) === null || _getSystemShowHead === void 0 ? void 0 : _getSystemShowHead.map(function (column) {
115
124
  return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
116
125
  transformValue: column.render,
117
126
  renderExport: column.renderExport,
@@ -121,7 +130,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
121
130
  }));
122
131
  })) || [];
123
132
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
124
- this.rules = this !== null && this !== void 0 && (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
133
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
125
134
  required: true,
126
135
  validator: function validator(_, value) {
127
136
  var _value$selectIds;
@@ -40,7 +40,7 @@ export declare const BsGoodsTable: ({ list, showHeader, text, type, }: {
40
40
  }) => React.JSX.Element;
41
41
  export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
42
42
  export declare const KmVideoRender: ({ fileList, canDownload }: any) => React.JSX.Element;
43
- export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
43
+ export declare const BsSystemOrderTable: ({ value, type, showHeader }: any) => React.JSX.Element;
44
44
  export declare const MsgContent: ({ horizontal, list, valueKey, failValue, options, }: any) => React.JSX.Element;
45
45
  export declare const AlipayBill: (props: any) => React.JSX.Element;
46
46
  export declare const RenderPicturePro: (props: any) => React.JSX.Element;
@@ -15,7 +15,7 @@ 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 { DownloadOutlined } from "@ant-design/icons";
17
17
  import React, { useState, useMemo } from "react";
18
- import { ExpressData, SendDataCenter } from "@kmkf-fe-packages/kmkf-utils";
18
+ import { ExpressData, SendDataCenter, getSystemShowHead } from "@kmkf-fe-packages/kmkf-utils";
19
19
  import { getAlipayBillReceipt } from "../../service/api";
20
20
  import { CopyToClipboard } from "react-copy-to-clipboard";
21
21
  import styles from "./index.module.less";
@@ -769,7 +769,9 @@ export var KmVideoRender = function KmVideoRender(_ref13) {
769
769
  };
770
770
  export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
771
771
  var value = _ref14.value,
772
- type = _ref14.type;
772
+ type = _ref14.type,
773
+ _ref14$showHeader = _ref14.showHeader,
774
+ showHeader = _ref14$showHeader === void 0 ? [] : _ref14$showHeader;
773
775
  var columnMap = {
774
776
  BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
775
777
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
@@ -805,9 +807,13 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
805
807
  };
806
808
  }
807
809
  };
810
+ var columns = getSystemShowHead({
811
+ columns: columnMap[type] || [],
812
+ showHeader: showHeader
813
+ });
808
814
  return /*#__PURE__*/React.createElement(Table, {
809
815
  dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
810
- columns: columnMap[type] || [],
816
+ columns: columns || [],
811
817
  rowSelection: rowSelection,
812
818
  rowKey: rowKeyMap[type] || "billNo",
813
819
  size: "small",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.2.13-beta.41",
3
+ "version": "2.2.13-beta.43",
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": "2.2.13-beta.41",
25
- "@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.32",
24
+ "@kmkf-fe-packages/basic-components": "2.2.13-beta.43",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.43",
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": "8ec9755f3e3bba526213352ed0cea61c7050638c",
44
+ "gitHead": "f67ba14c08ec0295f39da3b56255a5f37eac1788",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }