@kmkf-fe-packages/services-components 1.22.1-beta.6 → 1.22.1-beta.60

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.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
  3. package/dist/esm/commonComponents/GlobalContext/index.js +4 -2
  4. package/dist/esm/commonComponents/ShopList/index.d.ts +2 -1
  5. package/dist/esm/commonComponents/ShopList/index.js +5 -5
  6. package/dist/esm/components/BS/BsGoods/dist/index.js +113 -0
  7. package/dist/esm/components/BS/BsGoods/index.js +6 -2
  8. package/dist/esm/components/BS/BsLogistics/index.js +8 -1
  9. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +5 -5
  10. package/dist/esm/components/BS/BsSystemOrder/index.js +40 -17
  11. package/dist/esm/components/BS/common/BsHeaderChild.d.ts +6 -4
  12. package/dist/esm/components/BS/common/BsHeaderChild.js +20 -9
  13. package/dist/esm/components/BS/common/BsHeaderGood.d.ts +1 -0
  14. package/dist/esm/components/BS/common/BsHeaderGood.js +151 -101
  15. package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
  16. package/dist/esm/components/BS/common/BsMemo.js +19 -18
  17. package/dist/esm/components/BS/common/BsType.d.ts +4 -4
  18. package/dist/esm/components/BS/common/BsType.js +17 -16
  19. package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
  20. package/dist/esm/components/BS/common/expressCode.js +4 -1
  21. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  22. package/dist/esm/components/BsE3/BsGoods/index.js +1 -1
  23. package/dist/esm/components/BsE3/BsReissueE3/index.js +1 -1
  24. package/dist/esm/components/Common/constants/bs.d.ts +3 -0
  25. package/dist/esm/components/Common/constants/bs.js +90 -0
  26. package/dist/esm/components/Common/constants/bs_e3.d.ts +3 -0
  27. package/dist/esm/components/Common/constants/bs_e3.js +154 -0
  28. package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +5 -0
  29. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +26 -0
  30. package/dist/esm/components/Common/constants/defaultColumns.d.ts +3 -0
  31. package/dist/esm/components/Common/constants/defaultColumns.js +76 -0
  32. package/dist/esm/components/Common/constants/gy.d.ts +3 -0
  33. package/dist/esm/components/Common/constants/gy.js +153 -0
  34. package/dist/esm/components/Common/constants/system.d.ts +3 -0
  35. package/dist/esm/components/Common/constants/system.js +58 -0
  36. package/dist/esm/components/Common/constants/wdt.d.ts +3 -0
  37. package/dist/esm/components/Common/constants/wdt.js +280 -0
  38. package/dist/esm/components/Common/dist/index.js +1019 -0
  39. package/dist/esm/components/Common/index.d.ts +13 -5
  40. package/dist/esm/components/Common/index.js +242 -744
  41. package/dist/esm/components/CommonHeaderGood/index.d.ts +1 -0
  42. package/dist/esm/components/CommonHeaderGood/index.js +322 -93
  43. package/dist/esm/components/CommonMultiStatus/index.d.ts +5 -4
  44. package/dist/esm/components/CommonMultiStatus/index.js +98 -65
  45. package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
  46. package/dist/esm/components/CommonSystemOrder/index.js +25 -25
  47. package/dist/esm/components/EItemEnCode/index.d.ts +3 -1
  48. package/dist/esm/components/EItemEnCode/index.js +26 -29
  49. package/dist/esm/components/GY/GyGoods/index.d.ts +33 -0
  50. package/dist/esm/components/GY/GyGoods/index.js +123 -0
  51. package/dist/esm/components/GY/GyReissue/index.d.ts +58 -0
  52. package/dist/esm/components/GY/GyReissue/index.js +188 -0
  53. package/dist/esm/components/JST/JstSendGood/index.js +18 -11
  54. package/dist/esm/components/KmErpSendGood/index.js +11 -11
  55. package/dist/esm/components/MemberLevel/index.d.ts +35 -0
  56. package/dist/esm/components/MemberLevel/index.js +119 -0
  57. package/dist/esm/components/MsgStatus/index.d.ts +5 -5
  58. package/dist/esm/components/MsgStatus/index.js +43 -53
  59. package/dist/esm/components/Payment/PaymentAmount.d.ts +0 -1
  60. package/dist/esm/components/Payment/PaymentAmount.js +0 -4
  61. package/dist/esm/components/Radio/index.js +3 -2
  62. package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.d.ts +2 -2
  63. package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.js +3 -9
  64. package/dist/esm/factory.d.ts +2 -2
  65. package/dist/esm/factory.js +13 -4
  66. package/dist/esm/index.d.ts +4 -1
  67. package/dist/esm/index.js +4 -1
  68. package/dist/esm/service/api.d.ts +2 -0
  69. package/dist/esm/service/api.js +12 -0
  70. package/dist/esm/type.d.ts +7 -2
  71. package/package.json +4 -4
package/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  - 针对于自定义组件的后缀,在提交的时候是以组件类型的驼峰式来命名的
4
4
 
5
- ---
5
+ ---1
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData" | "queryJSTLogisticsCompany" | "queryWLNLogisticsCompany";
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, Button, Alert, Space } from "antd";
18
- import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData } from "../../service/api";
18
+ import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData, queryJSTLogisticsCompany, queryWLNLogisticsCompany } 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,
@@ -44,7 +44,9 @@ var Global = function Global(_ref) {
44
44
  queryWdtAddressData: servers.queryWdtAddressData,
45
45
  queryWdtLogisticsCompany: queryWdtLogisticsCompany,
46
46
  queryBsE3LogisticsCompany: queryBsE3LogisticsCompany,
47
- querySendData: querySendData
47
+ querySendData: querySendData,
48
+ queryJSTLogisticsCompany: queryJSTLogisticsCompany,
49
+ queryWLNLogisticsCompany: queryWLNLogisticsCompany
48
50
  };
49
51
  mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
50
52
  promises = [];
@@ -1,9 +1,10 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  declare type Shop = {
3
3
  auditStatus: number;
4
4
  shopId: string;
5
5
  shopName: string;
6
6
  shopSource: string | number;
7
+ useStatus: number;
7
8
  };
8
9
  declare type ShopListProps = {
9
10
  disabledList?: string[];
@@ -2,10 +2,10 @@ var _excluded = ["disabledList", "shopList", "valueMapping", "onChange", "setSho
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
3
  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
4
  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 'react';
6
- import { Select } from 'antd';
5
+ import React from "react";
6
+ import { Select } from "antd";
7
7
  import PlatformAvatar from "../PlatformAvatar";
8
- import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
8
+ import { PlatData } from "@kmkf-fe-packages/kmkf-utils";
9
9
  var ShopList = function ShopList(_ref) {
10
10
  var _shopList$filter;
11
11
  var _ref$disabledList = _ref.disabledList,
@@ -24,7 +24,7 @@ var ShopList = function ShopList(_ref) {
24
24
  return /*#__PURE__*/React.createElement(Select, _extends({
25
25
  onChange: handleChange
26
26
  }, prop), shopList === null || shopList === void 0 ? void 0 : (_shopList$filter = shopList.filter(function (item) {
27
- return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1;
27
+ return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1 && (item === null || item === void 0 ? void 0 : item.useStatus) === 1;
28
28
  })) === null || _shopList$filter === void 0 ? void 0 : _shopList$filter.map(function (item) {
29
29
  var _platDatInstance$getP;
30
30
  var plat = (_platDatInstance$getP = platDatInstance.getPlatData()) === null || _platDatInstance$getP === void 0 ? void 0 : _platDatInstance$getP.find(function (plat) {
@@ -34,7 +34,7 @@ var ShopList = function ShopList(_ref) {
34
34
  disabled: item.disabled || disabledList.includes(item === null || item === void 0 ? void 0 : item[valueMapping]),
35
35
  value: item === null || item === void 0 ? void 0 : item[valueMapping],
36
36
  key: item === null || item === void 0 ? void 0 : item[valueMapping],
37
- label: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || '').concat(item.shopName)
37
+ label: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || "").concat(item.shopName)
38
38
  }, /*#__PURE__*/React.createElement(PlatformAvatar, {
39
39
  styles: {
40
40
  marginRight: 5
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+
3
+ var __assign = this && this.__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ exports.__esModule = true;
14
+ var react_1 = require("react");
15
+ var GetFormItem_1 = require("../../GetFormItem");
16
+ var Common_1 = require("../../Common");
17
+ var index_1 = require("../common/index");
18
+ var ItemView_1 = require("../../../commonComponents/ItemView");
19
+ var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
20
+ var basic_components_1 = require("@kmkf-fe-packages/basic-components");
21
+ var constant_1 = require("../../../constant");
22
+ var BsGoods = /** @class */function () {
23
+ function BsGoods(options) {
24
+ var _this = this;
25
+ var _a;
26
+ this.renderClient = function (record) {
27
+ var _a, _b;
28
+ console.log("in renderclient");
29
+ return !kmkf_utils_1.isNull(record === null || record === void 0 ? void 0 : record["" + _this.id]) ? react_1["default"].createElement(react_1["default"].Fragment, null, react_1["default"].createElement(ItemView_1["default"], {
30
+ id: _this.id,
31
+ label: _this.name,
32
+ value: react_1["default"].createElement(Common_1.BsGoodsTable, {
33
+ list: ((_a = record === null || record === void 0 ? void 0 : record["" + _this.id]) === null || _a === void 0 ? void 0 : _a.bsGoods) || [],
34
+ showHeader: ((_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.showHeader) || []
35
+ })
36
+ })) : null;
37
+ };
38
+ this.renderPc = function () {
39
+ return null;
40
+ };
41
+ this.renderLog = function (r) {
42
+ var _a;
43
+ console.log("in renderclient");
44
+ if (kmkf_utils_1.isNull(r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"])) return null;
45
+ return react_1["default"].createElement(Common_1.BsGoodsTable, {
46
+ list: (r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"]) || [],
47
+ showHeader: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showHeader) || []
48
+ });
49
+ };
50
+ this.getComponentValue = function (r) {
51
+ return r === null || r === void 0 ? void 0 : r[_this.id + "_bsGoods"];
52
+ };
53
+ this.renderExport = function () {
54
+ return null;
55
+ };
56
+ this.editRender = function (p) {
57
+ var _a, _b, _c, _d, _e, _f;
58
+ console.log("in renderclient");
59
+ return react_1["default"].createElement(GetFormItem_1["default"], {
60
+ title: _this.name,
61
+ name: _this.id,
62
+ rules: _this.rules,
63
+ required: false,
64
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
65
+ display: p === null || p === void 0 ? void 0 : p.display,
66
+ tooltip: ((_a = _this.componentConfig) === null || _a === void 0 ? void 0 : _a.showTooltip) ? (_b = _this.componentConfig) === null || _b === void 0 ? void 0 : _b.tooltip : "",
67
+ component: react_1["default"].createElement(basic_components_1.BsGoods, __assign({}, _this.componentConfig, {
68
+ maxLength: ((_c = _this.componentConfig) === null || _c === void 0 ? void 0 : _c.maxLength) || 20,
69
+ shopId: (_d = _this.effects) === null || _d === void 0 ? void 0 : _d.shopId,
70
+ shopList: ((_e = _this.effects) === null || _e === void 0 ? void 0 : _e.shopList) || [],
71
+ companyKey: (_f = _this.effects) === null || _f === void 0 ? void 0 : _f.companyKey,
72
+ width: "90%"
73
+ }))
74
+ });
75
+ };
76
+ this.filterConfig = function (item) {
77
+ return [{
78
+ searchDefaultConditions: constant_1.SYMBOL.like,
79
+ type: item.type,
80
+ id: item.id + "_bsGoods",
81
+ name: item.name,
82
+ filterComponentType: "Input"
83
+ }];
84
+ };
85
+ this.name = options.name;
86
+ this.id = options.id;
87
+ this.sortField = options.id + "_bsGoods";
88
+ this.formField = options.id + "_bsGoods";
89
+ this.type = options.type;
90
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
91
+ this.isCombinationComponent = true;
92
+ this.canSort = false;
93
+ this.bsGoods = new index_1.BsHeaderGood(__assign(__assign({}, options), {
94
+ id: options.id + "_bsGoods",
95
+ name: "商品信息"
96
+ }));
97
+ this.children = [this.bsGoods];
98
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
99
+ this.rules = ((_a = this === null || this === void 0 ? void 0 : this.componentConfig) === null || _a === void 0 ? void 0 : _a.required) ? [{
100
+ required: true,
101
+ validator: function validator(_, value) {
102
+ var _a;
103
+ if (!value || !((_a = value === null || value === void 0 ? void 0 : value.bsGoods) === null || _a === void 0 ? void 0 : _a.length)) {
104
+ return Promise.reject(new Error("请选择bs商品"));
105
+ }
106
+ return Promise.resolve();
107
+ }
108
+ }] : [];
109
+ this.dataType = "object";
110
+ }
111
+ return BsGoods;
112
+ }();
113
+ exports["default"] = BsGoods;
@@ -39,6 +39,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
39
39
  id: _this.id,
40
40
  label: _this.name,
41
41
  value: /*#__PURE__*/React.createElement(BsGoodsTable, {
42
+ type: _this.type,
42
43
  list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.bsGoods) || [],
43
44
  showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
44
45
  })
@@ -51,6 +52,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
51
52
  var _this$componentConfig2;
52
53
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsGoods")])) return null;
53
54
  return /*#__PURE__*/React.createElement(BsGoodsTable, {
55
+ type: _this.type,
54
56
  list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsGoods")]) || [],
55
57
  showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
56
58
  });
@@ -70,8 +72,10 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
70
72
  required: false,
71
73
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
72
74
  display: p === null || p === void 0 ? void 0 : p.display,
73
- 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 : '',
74
- component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
75
+ 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 : "",
76
+ component: /*#__PURE__*/React.createElement(Goods, _extends({
77
+ type: _this.type
78
+ }, _this.componentConfig, {
75
79
  maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
76
80
  shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
77
81
  shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
@@ -38,7 +38,7 @@ var typeMap = {
38
38
  name: "万里牛",
39
39
  company: "wlnLogisticsCompany",
40
40
  code: "wlnLogisticsCode",
41
- platformType: "default"
41
+ platformType: "wln"
42
42
  },
43
43
  WDT_LOGISTICS: {
44
44
  key: "wdtLogisticsList",
@@ -46,6 +46,13 @@ var typeMap = {
46
46
  company: "wdtLogisticsCompany",
47
47
  code: "wdtLogisticsCode",
48
48
  platformType: "wdt"
49
+ },
50
+ JST_LOGISTICS: {
51
+ key: "jstItemList",
52
+ name: "聚水潭",
53
+ company: "logisticsCompany",
54
+ code: "logisticsCode",
55
+ platformType: 'jst'
49
56
  }
50
57
  };
51
58
  var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
@@ -1,17 +1,17 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
3
  declare class BsSystemOrder implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
10
- effects: ComponentInterface['effects'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
- dataType: ComponentInterface['dataType'];
14
+ dataType: ComponentInterface["dataType"];
15
15
  children: ComponentInterface[];
16
16
  constructor(options: PickOption);
17
17
  renderClient: (record: any) => React.JSX.Element | null;
@@ -8,19 +8,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from 'react';
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, KM_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
15
- import { BsSystemOrder as SystemOrder } from '@kmkf-fe-packages/basic-components';
14
+ import { isNull, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_ORDER_STATUS_MAP, KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
15
+ 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
19
  var typeMap = {
20
20
  BS_SYSTEM_ORDER: {
21
- key: 'bsSystemShowOrder',
22
- name: '百胜',
23
- selectId: 'bsSystemSelectIds',
21
+ key: "bsSystemShowOrder",
22
+ name: "百胜",
23
+ selectId: "bsSystemSelectIds",
24
24
  columns: [{
25
25
  title: "单据类型",
26
26
  dataIndex: "billType",
@@ -34,12 +34,12 @@ var typeMap = {
34
34
  dataIndex: "billTag",
35
35
  width: 150
36
36
  }, {
37
- title: '主播名称',
38
- dataIndex: 'authorName',
37
+ title: "主播名称",
38
+ dataIndex: "authorName",
39
39
  width: 150
40
40
  }, {
41
- title: '主播ID',
42
- dataIndex: 'authorId',
41
+ title: "主播ID",
42
+ dataIndex: "authorId",
43
43
  width: 150
44
44
  }
45
45
  // {
@@ -52,9 +52,9 @@ var typeMap = {
52
52
 
53
53
  KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG,
54
54
  WLN_SYSTEM_ORDER: {
55
- key: 'wlnSystemShowOrder',
56
- name: '万里牛',
57
- selectId: 'wlnSystemSelectIds',
55
+ key: "wlnSystemShowOrder",
56
+ name: "万里牛",
57
+ selectId: "wlnSystemSelectIds",
58
58
  columns: [{
59
59
  title: "订单类型",
60
60
  dataIndex: "billType",
@@ -103,6 +103,9 @@ var typeMap = {
103
103
  ellipsis: true,
104
104
  render: function render(val) {
105
105
  return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
106
+ },
107
+ renderExport: function renderExport(val) {
108
+ return BS_E3_ORDER_STATUS_MAP[val] || val;
106
109
  }
107
110
  }, {
108
111
  title: "是否被拆分",
@@ -111,6 +114,9 @@ var typeMap = {
111
114
  ellipsis: true,
112
115
  render: function render(val) {
113
116
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
117
+ },
118
+ renderExport: function renderExport(val) {
119
+ return BS_E3_BOOLEAN_STATUS_MAP[val] || val;
114
120
  }
115
121
  }, {
116
122
  title: "是否拆分子单",
@@ -119,6 +125,9 @@ var typeMap = {
119
125
  ellipsis: true,
120
126
  render: function render(val) {
121
127
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
128
+ },
129
+ renderExport: function renderExport(val) {
130
+ return BS_E3_BOOLEAN_STATUS_MAP[val] || val;
122
131
  }
123
132
  }, {
124
133
  title: "是否被合并",
@@ -127,6 +136,9 @@ var typeMap = {
127
136
  ellipsis: true,
128
137
  render: function render(val) {
129
138
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
139
+ },
140
+ renderExport: function renderExport(val) {
141
+ return BS_E3_BOOLEAN_STATUS_MAP[val] || val;
130
142
  }
131
143
  }, {
132
144
  title: "是否合并新单",
@@ -135,6 +147,9 @@ var typeMap = {
135
147
  ellipsis: true,
136
148
  render: function render(val) {
137
149
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
150
+ },
151
+ renderExport: function renderExport(val) {
152
+ return BS_E3_BOOLEAN_STATUS_MAP[val] || val;
138
153
  }
139
154
  }, {
140
155
  title: "是否复制单",
@@ -143,6 +158,9 @@ var typeMap = {
143
158
  ellipsis: true,
144
159
  render: function render(val) {
145
160
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
161
+ },
162
+ renderExport: function renderExport(val) {
163
+ return BS_E3_BOOLEAN_STATUS_MAP[val] || val;
146
164
  }
147
165
  }, {
148
166
  title: "是否换货单",
@@ -151,6 +169,9 @@ var typeMap = {
151
169
  ellipsis: true,
152
170
  render: function render(val) {
153
171
  return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
172
+ },
173
+ renderExport: function renderExport(val) {
174
+ return BS_E3_BOOLEAN_STATUS_MAP[val] || val;
154
175
  }
155
176
  }, {
156
177
  title: "订单备注",
@@ -158,7 +179,8 @@ var typeMap = {
158
179
  width: 150,
159
180
  ellipsis: true
160
181
  }]
161
- }
182
+ },
183
+ GY_SYSTEM_ORDER: GY_SYSTEM_ORDER_CONFIG
162
184
  };
163
185
  var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
164
186
  var _this = this,
@@ -216,7 +238,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
216
238
  required: false,
217
239
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
218
240
  display: p === null || p === void 0 ? void 0 : p.display,
219
- 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 : '',
241
+ 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 : "",
220
242
  component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
221
243
  onChange: p === null || p === void 0 ? void 0 : p.onChange,
222
244
  type: _this.type
@@ -231,7 +253,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
231
253
  // 过滤组件id
232
254
  name: item.name,
233
255
  // 过滤组件名称
234
- filterComponentType: 'Input',
256
+ filterComponentType: "Input",
235
257
  formatFilterValue: function formatFilterValue(input) {
236
258
  return batchInput(input);
237
259
  }
@@ -248,6 +270,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
248
270
  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) {
249
271
  return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
250
272
  transformValue: column.render,
273
+ renderExport: column.renderExport,
251
274
  name: column.title,
252
275
  id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_").concat(column.dataIndex),
253
276
  width: column.width || 150
@@ -264,6 +287,6 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
264
287
  return Promise.resolve();
265
288
  }
266
289
  }] : [];
267
- this.dataType = 'object';
290
+ this.dataType = "object";
268
291
  });
269
292
  export default BsSystemOrder;
@@ -1,25 +1,27 @@
1
- import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
3
  declare class BsHeaderChild implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
- componentConfig: ComponentInterface['componentConfig'];
8
+ componentConfig: ComponentInterface["componentConfig"];
9
9
  align: ALignType;
10
10
  width: number;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
15
+ dataType: ComponentInterface["dataType"];
16
16
  transformValue: (val: any) => any;
17
+ export: (val: any) => any;
17
18
  constructor(options: PickOption);
18
19
  getParentId: () => string;
19
20
  renderClient: (record: any) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
21
22
  renderLog: (r: Record) => React.JSX.Element | null;
22
23
  getComponentValue: (r: Record) => any;
24
+ getComponentExport: (r: Record) => any;
23
25
  renderExport: (value: string, record: Record) => any;
24
26
  editRender: () => null;
25
27
  filterConfig: () => never[];
@@ -11,9 +11,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  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; }
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  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); }
14
- import React from 'react';
14
+ import React from "react";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
16
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
18
18
  var _this = this;
19
19
  _classCallCheck(this, BsHeaderChild);
@@ -32,8 +32,11 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
32
32
  _defineProperty(this, "transformValue", function (val) {
33
33
  return val;
34
34
  });
35
+ _defineProperty(this, "export", function (val) {
36
+ return val;
37
+ });
35
38
  _defineProperty(this, "getParentId", function () {
36
- var _this$id$split = _this.id.split('_'),
39
+ var _this$id$split = _this.id.split("_"),
37
40
  _this$id$split2 = _slicedToArray(_this$id$split, 3),
38
41
  key = _this$id$split2[0],
39
42
  name = _this$id$split2[1],
@@ -49,7 +52,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
49
52
  });
50
53
  _defineProperty(this, "renderPc", function (value, record) {
51
54
  var _this$getComponentVal;
52
- return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
55
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
53
56
  });
54
57
  _defineProperty(this, "renderLog", function (r) {
55
58
  var id = _this.getParentId();
@@ -59,10 +62,13 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
59
62
  _defineProperty(this, "getComponentValue", function (r) {
60
63
  return _this.transformValue(r === null || r === void 0 ? void 0 : r[_this.id]);
61
64
  });
65
+ _defineProperty(this, "getComponentExport", function (r) {
66
+ return _this.export(r === null || r === void 0 ? void 0 : r[_this.id]);
67
+ });
62
68
  _defineProperty(this, "renderExport", function (value, record) {
63
- var _this$getComponentVal2;
64
- var val = (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
65
- return typeof val === 'number' ? val + '' : val;
69
+ var _this$getComponentExp;
70
+ var val = (_this$getComponentExp = _this.getComponentExport(record)) !== null && _this$getComponentExp !== void 0 ? _this$getComponentExp : "--";
71
+ return typeof val === "number" ? val + "" : val;
66
72
  });
67
73
  _defineProperty(this, "editRender", function () {
68
74
  return null;
@@ -76,14 +82,19 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
76
82
  this.formField = options.id;
77
83
  this.type = options.type;
78
84
  this.componentConfig = options.componentConfig;
79
- this.align = 'left';
85
+ this.align = "left";
80
86
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
81
87
  this.isCombinationComponent = false;
82
88
  this.canSort = false;
83
- this.dataType = 'string';
89
+ this.dataType = "string";
84
90
  this.children = [];
85
91
  if (options.transformValue) {
86
92
  this.transformValue = options.transformValue;
87
93
  }
94
+ if (options.renderExport) {
95
+ this.export = options.renderExport;
96
+ }
97
+ // this.export = (options as any).renderExport;
88
98
  });
99
+
89
100
  export default BsHeaderChild;
@@ -15,6 +15,7 @@ declare class BsHeaderGods implements ComponentInterface {
15
15
  dataType: ComponentInterface["dataType"];
16
16
  itemKey: any;
17
17
  constructor(options: PickOption);
18
+ getChildren(options: PickOption): any[];
18
19
  getParentId: () => string;
19
20
  renderClient: (record: any) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => React.JSX.Element;