@kmkf-fe-packages/services-components 2.0.12-beta.34 → 2.0.12-beta.36

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 (20) hide show
  1. package/dist/esm/components/LogisticsInterception/index.d.ts +6 -0
  2. package/dist/esm/components/LogisticsInterception/index.js +19 -8
  3. package/dist/esm/components/LogisticsInterception/interceptLogisticsUserKCode.d.ts +43 -0
  4. package/dist/esm/components/LogisticsInterception/interceptLogisticsUserKCode.js +110 -0
  5. package/dist/esm/components/LogisticsInterception/interceptLogisticsUserSecretKey.d.ts +35 -0
  6. package/dist/esm/components/LogisticsInterception/interceptLogisticsUserSecretKey.js +84 -0
  7. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +4 -0
  8. package/dist/esm/components/LogisticsMoreInterception/index.js +10 -3
  9. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsUserKCode.d.ts +44 -0
  10. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsUserKCode.js +110 -0
  11. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsUserSecretKey.d.ts +36 -0
  12. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsUserSecretKey.js +85 -0
  13. package/dist/esm/factory.d.ts +1 -1
  14. package/dist/esm/service/api.js +2 -0
  15. package/package.json +4 -4
  16. package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
  17. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
  18. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
  19. package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
  20. package/dist/esm/components/Common/dist/index.js +0 -1019
@@ -10,6 +10,8 @@ import InterceptState from "./InterceptState";
10
10
  import InterceptApiStatus from "./InterceptApiStatus";
11
11
  import Express from "../Express";
12
12
  import ExpressCode from "../ExpressCode";
13
+ import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
14
+ import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
13
15
  declare class Logistics implements ComponentInterface {
14
16
  name: string;
15
17
  columnHeader: string | JSX.Element;
@@ -23,6 +25,8 @@ declare class Logistics implements ComponentInterface {
23
25
  interceptLogisticsStatus: InterceptStatus;
24
26
  interceptApiStatus: InterceptApiStatus;
25
27
  interceptSenderMobile: InterceptSenderMobile;
28
+ interceptLogisticsUserKCode: InterceptLogisticsUserKCode;
29
+ interceptLogisticsUserSecretKey: InterceptLogisticsUserSecretKey;
26
30
  interceptSnapshot: InterceptSnapshot;
27
31
  interceptState: InterceptState;
28
32
  isCombinationComponent: boolean;
@@ -56,6 +60,8 @@ declare class Logistics implements ComponentInterface {
56
60
  };
57
61
  interceptSnapshot: any;
58
62
  interceptState: any;
63
+ interceptLogisticsUserKCode: any;
64
+ interceptLogisticsUserSecretKey: any;
59
65
  };
60
66
  renderPc: () => null;
61
67
  renderExport: () => null;
@@ -22,6 +22,8 @@ import InterceptApiStatus from "./InterceptApiStatus";
22
22
  import Express from "../Express";
23
23
  import ExpressCode from "../ExpressCode";
24
24
  import ColumnHeader from "./columnHeader";
25
+ import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
26
+ import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
25
27
  var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
26
28
  var _this = this;
27
29
  _classCallCheck(this, Logistics);
@@ -37,6 +39,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
37
39
  _defineProperty(this, "interceptLogisticsStatus", void 0);
38
40
  _defineProperty(this, "interceptApiStatus", void 0);
39
41
  _defineProperty(this, "interceptSenderMobile", void 0);
42
+ _defineProperty(this, "interceptLogisticsUserKCode", void 0);
43
+ _defineProperty(this, "interceptLogisticsUserSecretKey", void 0);
40
44
  _defineProperty(this, "interceptSnapshot", void 0);
41
45
  _defineProperty(this, "interceptState", void 0);
42
46
  _defineProperty(this, "isCombinationComponent", void 0);
@@ -51,7 +55,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
51
55
  _defineProperty(this, "effects", void 0);
52
56
  _defineProperty(this, "dataType", void 0);
53
57
  _defineProperty(this, "renderClient", function (record) {
54
- return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
58
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptApiStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record), _this.interceptLogisticsUserKCode.renderClient(record), _this.interceptLogisticsUserSecretKey.renderClient(record));
55
59
  });
56
60
  _defineProperty(this, "renderLog", function (record) {
57
61
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptApiStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptApiStatus.name, ":", " ", _this.interceptApiStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
@@ -66,7 +70,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
66
70
  interceptApiStatus: _this.interceptApiStatus.getComponentValue(r),
67
71
  interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
68
72
  interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
69
- interceptState: _this.interceptState.getComponentValue(r)
73
+ interceptState: _this.interceptState.getComponentValue(r),
74
+ interceptLogisticsUserKCode: _this.interceptLogisticsUserKCode.getComponentValue(r),
75
+ interceptLogisticsUserSecretKey: _this.interceptLogisticsUserSecretKey.getComponentValue(r)
70
76
  };
71
77
  });
72
78
  _defineProperty(this, "renderPc", function () {
@@ -76,7 +82,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
76
82
  return null;
77
83
  });
78
84
  _defineProperty(this, "editRender", function (p) {
79
- var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$effects;
85
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$effects, _this$effects2, _this$effects3;
80
86
  return /*#__PURE__*/React.createElement(GetFormItem, {
81
87
  title: _this.name,
82
88
  name: _this.id,
@@ -84,12 +90,15 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
84
90
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
85
91
  display: p === null || p === void 0 ? void 0 : p.display,
86
92
  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,
87
- 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 : '',
88
- component: /*#__PURE__*/React.createElement(LogisticsInterception, _extends({}, _this.componentConfig, {
93
+ 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 : "",
94
+ component: /*#__PURE__*/React.createElement(LogisticsInterception, _extends({
95
+ platform: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.env,
96
+ onJumpPage: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.onJumpPage
97
+ }, _this.componentConfig, {
89
98
  logisticsOptions: _this.expressDateInstance.getExpressData(),
90
99
  expressInterceptData: _this.expressInterceptData.getExpressData(),
91
100
  logisticsAddressData: _this.logisticsAddressData.getAddressData(),
92
- isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
101
+ isEditing: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.isEditing
93
102
  }))
94
103
  });
95
104
  });
@@ -98,7 +107,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
98
107
  subKey: "interceptCompany"
99
108
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
100
109
  subKey: "interceptCode"
101
- })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)];
110
+ })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item), _this.interceptLogisticsUserKCode.filterConfig(item), _this.interceptLogisticsUserSecretKey.filterConfig(item)];
102
111
  });
103
112
  this.name = options.name;
104
113
  this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
@@ -120,6 +129,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
120
129
  this.interceptSenderMobile = new InterceptSenderMobile(options);
121
130
  this.interceptSnapshot = new InterceptSnapshot(options);
122
131
  this.interceptState = new InterceptState(options);
132
+ this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(options);
133
+ this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
123
134
  this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
124
135
  id: "".concat(options.id, "_interceptCompany"),
125
136
  name: "物流信息"
@@ -131,7 +142,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
131
142
  this.isCombinationComponent = true;
132
143
  this.canSort = false;
133
144
  this.dataType = "object";
134
- this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState];
145
+ this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState, this.interceptLogisticsUserKCode, this.interceptLogisticsUserSecretKey];
135
146
  this.rules = [{
136
147
  validator: function validator(_, value) {
137
148
  var _this$componentConfig5, _this$componentConfig6, _value$interceptAddre, _value$interceptSende;
@@ -0,0 +1,43 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ import { LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ declare class InterceptLogisticsUserKCode implements ComponentInterface {
5
+ name: string;
6
+ parentId: string;
7
+ id: string;
8
+ sortField: string;
9
+ companyId: string;
10
+ type: string;
11
+ rules: any[];
12
+ componentConfig: ComponentInterface["componentConfig"];
13
+ effects: ComponentInterface["effects"];
14
+ align: ALignType;
15
+ width: number;
16
+ isCombinationComponent: boolean;
17
+ formField: string;
18
+ canSort: boolean;
19
+ children: ComponentInterface[];
20
+ logisticsAddress: InstanceType<typeof LogisticsAddressData>;
21
+ dataType: ComponentInterface["dataType"];
22
+ options: ComponentInterface["options"];
23
+ constructor(options: PickOption);
24
+ getComponentValue: (r: Record) => any;
25
+ renderClient: (record: any) => React.JSX.Element | null;
26
+ renderPc: (value: any, record: Record) => any;
27
+ renderLog: (r: Record) => any[] | null;
28
+ renderExport: (value: any, record: Record) => any;
29
+ editRender: () => null;
30
+ filterConfig: (item: ColumnConfig) => {
31
+ searchDefaultConditions: "in";
32
+ type: string;
33
+ id: string;
34
+ name: string;
35
+ filterComponentType: "MultipleSelect";
36
+ props: {
37
+ options: any[];
38
+ };
39
+ formatFilterValue: (value: string[]) => string[];
40
+ filterFn: (value: string[]) => (i: Record) => boolean;
41
+ };
42
+ }
43
+ export default InterceptLogisticsUserKCode;
@@ -0,0 +1,110 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ import React from "react";
9
+ import ItemView from "../../commonComponents/ItemView";
10
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
12
+ import { SYMBOL } from "../../constant";
13
+ var InterceptLogisticsUserKCode = /*#__PURE__*/_createClass(function InterceptLogisticsUserKCode(options) {
14
+ var _this = this;
15
+ _classCallCheck(this, InterceptLogisticsUserKCode);
16
+ _defineProperty(this, "name", void 0);
17
+ _defineProperty(this, "parentId", void 0);
18
+ _defineProperty(this, "id", void 0);
19
+ _defineProperty(this, "sortField", void 0);
20
+ _defineProperty(this, "companyId", void 0);
21
+ _defineProperty(this, "type", void 0);
22
+ _defineProperty(this, "rules", void 0);
23
+ _defineProperty(this, "componentConfig", void 0);
24
+ _defineProperty(this, "effects", void 0);
25
+ _defineProperty(this, "align", void 0);
26
+ _defineProperty(this, "width", void 0);
27
+ _defineProperty(this, "isCombinationComponent", void 0);
28
+ _defineProperty(this, "formField", void 0);
29
+ _defineProperty(this, "canSort", void 0);
30
+ _defineProperty(this, "children", void 0);
31
+ _defineProperty(this, "logisticsAddress", void 0);
32
+ _defineProperty(this, "dataType", void 0);
33
+ _defineProperty(this, "options", void 0);
34
+ _defineProperty(this, "getComponentValue", function (r) {
35
+ return r === null || r === void 0 ? void 0 : r[_this.id];
36
+ });
37
+ _defineProperty(this, "renderClient", function (record) {
38
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
39
+ id: _this.id,
40
+ label: _this.name,
41
+ value: record[_this.id]
42
+ }) : null;
43
+ });
44
+ _defineProperty(this, "renderPc", function (value, record) {
45
+ var _record$_this$id;
46
+ return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
47
+ });
48
+ _defineProperty(this, "renderLog", function (r) {
49
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
50
+ return [r === null || r === void 0 ? void 0 : r["".concat(_this.id)]];
51
+ });
52
+ _defineProperty(this, "renderExport", function (value, record) {
53
+ var _record$_this$id2;
54
+ return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
55
+ });
56
+ _defineProperty(this, "editRender", function () {
57
+ return null;
58
+ });
59
+ _defineProperty(this, "filterConfig", function (item) {
60
+ return {
61
+ searchDefaultConditions: SYMBOL.in,
62
+ type: item.type,
63
+ id: "".concat(item.id, "_interceptLogisticsUserKCode"),
64
+ name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09"),
65
+ filterComponentType: "MultipleSelect",
66
+ props: {
67
+ options: _this.options || []
68
+ },
69
+ formatFilterValue: function formatFilterValue(value) {
70
+ var _value$map;
71
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
72
+ return v === null || v === void 0 ? void 0 : v.split(",");
73
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
74
+ },
75
+ filterFn: function filterFn(value) {
76
+ return function (i) {
77
+ var _value$map2, _value$map2$flat;
78
+ return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (v) {
79
+ return v === null || v === void 0 ? void 0 : v.split(",");
80
+ })) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptLogisticsUserKCode"));
81
+ };
82
+ }
83
+ };
84
+ });
85
+ this.name = "客户编码(K码)";
86
+ this.parentId = options.id;
87
+ this.id = "".concat(options.id, "_interceptLogisticsUserKCode");
88
+ this.sortField = "".concat(options.id, "_interceptLogisticsUserKCode");
89
+ this.formField = "".concat(options.id, "_interceptLogisticsUserKCode");
90
+ this.companyId = "".concat(options.id, "_interceptCompany");
91
+ this.type = options.type;
92
+ this.componentConfig = options.componentConfig;
93
+ this.rules = [];
94
+ this.align = "left";
95
+ this.width = 220;
96
+ this.isCombinationComponent = false;
97
+ this.canSort = true;
98
+ this.children = [];
99
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
100
+ this.logisticsAddress = LogisticsAddressData.getInstance();
101
+ this.dataType = "string";
102
+ this.options = (this.logisticsAddress.getAddressData() || []).filter(function (item) {
103
+ return item.userKCode;
104
+ });
105
+ }
106
+
107
+ //物流轨迹查询
108
+ );
109
+
110
+ export default InterceptLogisticsUserKCode;
@@ -0,0 +1,35 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class InterceptLogisticsUserSecretKey implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ companyId: string;
7
+ type: string;
8
+ rules: any[];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
+ align: ALignType;
12
+ width: number;
13
+ isCombinationComponent: boolean;
14
+ sortField: string;
15
+ formField: string;
16
+ canSort: boolean;
17
+ dataType: ComponentInterface["dataType"];
18
+ children: ComponentInterface[];
19
+ constructor(options: PickOption);
20
+ getComponentValue: (r: Record) => any;
21
+ renderClient: (record: any) => React.JSX.Element | null;
22
+ renderPc: (value: any, record: Record) => any;
23
+ renderLog: (r: Record) => any;
24
+ renderExport: (value: any, record: Record) => any;
25
+ editRender: () => null;
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "like";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "Input";
32
+ filterFn: (value: string) => (i: Record) => boolean;
33
+ };
34
+ }
35
+ export default InterceptLogisticsUserSecretKey;
@@ -0,0 +1,84 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ import React from "react";
9
+ import ItemView from "../../commonComponents/ItemView";
10
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { SYMBOL } from "../../constant";
12
+ var InterceptLogisticsUserSecretKey = /*#__PURE__*/_createClass(function InterceptLogisticsUserSecretKey(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, InterceptLogisticsUserSecretKey);
15
+ _defineProperty(this, "name", void 0);
16
+ _defineProperty(this, "id", void 0);
17
+ _defineProperty(this, "companyId", void 0);
18
+ _defineProperty(this, "type", void 0);
19
+ _defineProperty(this, "rules", void 0);
20
+ _defineProperty(this, "componentConfig", void 0);
21
+ _defineProperty(this, "effects", void 0);
22
+ _defineProperty(this, "align", void 0);
23
+ _defineProperty(this, "width", void 0);
24
+ _defineProperty(this, "isCombinationComponent", void 0);
25
+ _defineProperty(this, "sortField", void 0);
26
+ _defineProperty(this, "formField", void 0);
27
+ _defineProperty(this, "canSort", void 0);
28
+ _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "children", void 0);
30
+ _defineProperty(this, "getComponentValue", function (r) {
31
+ return r === null || r === void 0 ? void 0 : r[_this.id];
32
+ });
33
+ _defineProperty(this, "renderClient", function (record) {
34
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
35
+ id: _this.id,
36
+ label: _this.name,
37
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
38
+ }) : null;
39
+ });
40
+ _defineProperty(this, "renderPc", function (value, record) {
41
+ return record === null || record === void 0 ? void 0 : record[_this.id];
42
+ });
43
+ _defineProperty(this, "renderLog", function (r) {
44
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
45
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
46
+ });
47
+ _defineProperty(this, "renderExport", function (value, record) {
48
+ var _record;
49
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
50
+ });
51
+ _defineProperty(this, "editRender", function () {
52
+ return null;
53
+ });
54
+ _defineProperty(this, "filterConfig", function (item) {
55
+ return {
56
+ searchDefaultConditions: SYMBOL.like,
57
+ type: item.type,
58
+ id: "".concat(item.id, "_interceptLogisticsUserSecretKey"),
59
+ name: "".concat(item.name, "-\u5BA2\u6237\u5BC6\u94A5"),
60
+ filterComponentType: "Input",
61
+ filterFn: function filterFn(value) {
62
+ return function (i) {
63
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptLogisticsUserSecretKey")).includes(value);
64
+ };
65
+ }
66
+ };
67
+ });
68
+ this.name = "客户密钥";
69
+ this.id = "".concat(options.id, "_interceptLogisticsUserSecretKey");
70
+ this.companyId = "".concat(options.id, "_interceptCompany");
71
+ this.formField = "".concat(options.id, "_interceptLogisticsUserSecretKey");
72
+ this.sortField = "".concat(options.id, "_interceptLogisticsUserSecretKey");
73
+ this.dataType = "string";
74
+ this.type = options.type;
75
+ this.componentConfig = options.componentConfig;
76
+ this.rules = [];
77
+ this.align = "left";
78
+ this.width = 200;
79
+ this.isCombinationComponent = false;
80
+ this.canSort = true;
81
+ this.children = [];
82
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
83
+ });
84
+ export default InterceptLogisticsUserSecretKey;
@@ -9,6 +9,8 @@ import InterceptStatus from "./InterceptStatus";
9
9
  import InterceptCode from "./interceptCode";
10
10
  import InterceptApiStatus from "./InterceptApiStatus";
11
11
  import Express from "./interceptCompany";
12
+ import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
13
+ import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
12
14
  declare class Logistics implements ComponentInterface {
13
15
  name: string;
14
16
  columnHeader: string | JSX.Element;
@@ -23,6 +25,8 @@ declare class Logistics implements ComponentInterface {
23
25
  interceptApiStatus: InterceptApiStatus;
24
26
  interceptSenderMobile: InterceptSenderMobile;
25
27
  interceptSnapshot: InterceptSnapshot;
28
+ interceptLogisticsUserKCode: InterceptLogisticsUserKCode;
29
+ interceptLogisticsUserSecretKey: InterceptLogisticsUserSecretKey;
26
30
  isCombinationComponent: boolean;
27
31
  formField: string;
28
32
  canSort: boolean;
@@ -25,6 +25,8 @@ import Express from "./interceptCompany";
25
25
  import ColumnHeader from "./columnHeader";
26
26
  import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
27
27
  import CopyText from "../../commonComponents/CopyText";
28
+ import InterceptLogisticsUserKCode from "./interceptLogisticsUserKCode";
29
+ import InterceptLogisticsUserSecretKey from "./interceptLogisticsUserSecretKey";
28
30
  var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
29
31
  var _this = this,
30
32
  _this$componentConfig5,
@@ -43,6 +45,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
43
45
  _defineProperty(this, "interceptApiStatus", void 0);
44
46
  _defineProperty(this, "interceptSenderMobile", void 0);
45
47
  _defineProperty(this, "interceptSnapshot", void 0);
48
+ _defineProperty(this, "interceptLogisticsUserKCode", void 0);
49
+ _defineProperty(this, "interceptLogisticsUserSecretKey", void 0);
46
50
  _defineProperty(this, "isCombinationComponent", void 0);
47
51
  _defineProperty(this, "formField", void 0);
48
52
  _defineProperty(this, "canSort", void 0);
@@ -76,7 +80,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
76
80
  style: {
77
81
  color: "red"
78
82
  }
79
- }, (_item$interceptLogist2 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist2 === void 0 ? void 0 : _item$interceptLogist2.status, " \u5931\u8D25\u539F\u56E0\uFF1A", item === null || item === void 0 ? void 0 : (_item$interceptLogist3 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist3 === void 0 ? void 0 : _item$interceptLogist3.reason) : /*#__PURE__*/React.createElement("span", null, (_item$interceptLogist4 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist4 === void 0 ? void 0 : _item$interceptLogist4.status)) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null);
83
+ }, (_item$interceptLogist2 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist2 === void 0 ? void 0 : _item$interceptLogist2.status, " \u5931\u8D25\u539F\u56E0\uFF1A", item === null || item === void 0 ? void 0 : (_item$interceptLogist3 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist3 === void 0 ? void 0 : _item$interceptLogist3.reason) : /*#__PURE__*/React.createElement("span", null, (_item$interceptLogist4 = item.interceptLogisticsApiStatus) === null || _item$interceptLogist4 === void 0 ? void 0 : _item$interceptLogist4.status)) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null, item.interceptLogisticsUserKCode ? /*#__PURE__*/React.createElement("div", null, "\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09\uFF1A", item.interceptLogisticsUserKCode) : null, item.interceptLogisticsUserSecretKey ? /*#__PURE__*/React.createElement("div", null, "\u5BA2\u6237\u5BC6\u94A5\uFF1A", item.interceptLogisticsUserSecretKey) : null);
80
84
  }));
81
85
  });
82
86
  _defineProperty(this, "renderClient", function (record) {
@@ -109,7 +113,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
109
113
  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 : "",
110
114
  component: /*#__PURE__*/React.createElement(LogisticsMoreInterception, _extends({}, _this.componentConfig, {
111
115
  expressInterceptData: _this.expressInterceptData.getExpressData(),
112
- isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
116
+ isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing,
117
+ effects: _this.effects
113
118
  }))
114
119
  });
115
120
  });
@@ -140,6 +145,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
140
145
  this.interceptApiStatus = new InterceptApiStatus(options);
141
146
  this.interceptSenderMobile = new InterceptSenderMobile(options);
142
147
  this.interceptSnapshot = new InterceptSnapshot(options);
148
+ this.interceptLogisticsUserKCode = new InterceptLogisticsUserKCode(options);
149
+ this.interceptLogisticsUserSecretKey = new InterceptLogisticsUserSecretKey(options);
143
150
  this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
144
151
  id: "".concat(options.id, "_logisticsInterceptCompanyList"),
145
152
  name: "物流信息"
@@ -151,7 +158,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
151
158
  this.isCombinationComponent = true;
152
159
  this.canSort = false;
153
160
  this.dataType = "object";
154
- this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot];
161
+ this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptLogisticsUserKCode, this.interceptLogisticsUserSecretKey];
155
162
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
156
163
  required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
157
164
  validator: function validator(_, value) {
@@ -0,0 +1,44 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ import { LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ declare class InterceptLogisticsUserKCode implements ComponentInterface {
5
+ name: string;
6
+ parentId: string;
7
+ id: string;
8
+ sortField: string;
9
+ companyId: string;
10
+ type: string;
11
+ rules: any[];
12
+ componentConfig: ComponentInterface["componentConfig"];
13
+ effects: ComponentInterface["effects"];
14
+ align: ALignType;
15
+ width: number;
16
+ isCombinationComponent: boolean;
17
+ formField: string;
18
+ canSort: boolean;
19
+ children: ComponentInterface[];
20
+ logisticsAddress: InstanceType<typeof LogisticsAddressData>;
21
+ dataType: ComponentInterface["dataType"];
22
+ options: ComponentInterface["options"];
23
+ constructor(options: PickOption);
24
+ getComponentValue: (r: Record) => any;
25
+ renderUserKCode: (record: any) => React.JSX.Element;
26
+ renderClient: () => null;
27
+ renderPc: (value: any, record: Record) => React.JSX.Element | "--";
28
+ renderLog: () => null;
29
+ renderExport: (value: any, record: Record) => any;
30
+ editRender: () => null;
31
+ filterConfig: (item: ColumnConfig) => {
32
+ searchDefaultConditions: "in";
33
+ type: string;
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "MultipleSelect";
37
+ props: {
38
+ options: any[];
39
+ };
40
+ formatFilterValue: (value: string[]) => string[];
41
+ filterFn: (value: string[]) => (i: Record) => boolean;
42
+ };
43
+ }
44
+ export default InterceptLogisticsUserKCode;
@@ -0,0 +1,110 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ import React from "react";
9
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { SYMBOL } from "../../constant";
12
+ var InterceptLogisticsUserKCode = /*#__PURE__*/_createClass(function InterceptLogisticsUserKCode(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, InterceptLogisticsUserKCode);
15
+ _defineProperty(this, "name", void 0);
16
+ _defineProperty(this, "parentId", void 0);
17
+ _defineProperty(this, "id", void 0);
18
+ _defineProperty(this, "sortField", void 0);
19
+ _defineProperty(this, "companyId", void 0);
20
+ _defineProperty(this, "type", void 0);
21
+ _defineProperty(this, "rules", void 0);
22
+ _defineProperty(this, "componentConfig", void 0);
23
+ _defineProperty(this, "effects", void 0);
24
+ _defineProperty(this, "align", void 0);
25
+ _defineProperty(this, "width", void 0);
26
+ _defineProperty(this, "isCombinationComponent", void 0);
27
+ _defineProperty(this, "formField", void 0);
28
+ _defineProperty(this, "canSort", void 0);
29
+ _defineProperty(this, "children", void 0);
30
+ _defineProperty(this, "logisticsAddress", void 0);
31
+ _defineProperty(this, "dataType", void 0);
32
+ _defineProperty(this, "options", void 0);
33
+ _defineProperty(this, "getComponentValue", function (r) {
34
+ var _r$_this$id;
35
+ return r === null || r === void 0 ? void 0 : (_r$_this$id = r[_this.id]) === null || _r$_this$id === void 0 ? void 0 : _r$_this$id.join(",");
36
+ });
37
+ _defineProperty(this, "renderUserKCode", function (record) {
38
+ var userCodeList = record[_this.id] || [];
39
+ return /*#__PURE__*/React.createElement(React.Fragment, null, userCodeList.map(function (item, index) {
40
+ return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), item ? item : "--");
41
+ }));
42
+ });
43
+ _defineProperty(this, "renderClient", function () {
44
+ return null;
45
+ });
46
+ _defineProperty(this, "renderPc", function (value, record) {
47
+ return !isNull(record[_this.id]) ? _this.renderUserKCode(record) : "--";
48
+ });
49
+ _defineProperty(this, "renderLog", function () {
50
+ return null;
51
+ });
52
+ _defineProperty(this, "renderExport", function (value, record) {
53
+ var _this$getComponentVal;
54
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
55
+ });
56
+ _defineProperty(this, "editRender", function () {
57
+ return null;
58
+ });
59
+ _defineProperty(this, "filterConfig", function (item) {
60
+ return {
61
+ searchDefaultConditions: SYMBOL.in,
62
+ type: item.type,
63
+ id: "".concat(item.id, "_logisticsInterceptUserKCodeList"),
64
+ name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801\uFF08K\u7801\uFF09"),
65
+ filterComponentType: "MultipleSelect",
66
+ props: {
67
+ options: _this.options || []
68
+ },
69
+ formatFilterValue: function formatFilterValue(value) {
70
+ var _value$map;
71
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
72
+ return v === null || v === void 0 ? void 0 : v.split(",");
73
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
74
+ },
75
+ filterFn: function filterFn(value) {
76
+ return function (i) {
77
+ var _value$map2, _value$map2$flat;
78
+ return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (v) {
79
+ return v === null || v === void 0 ? void 0 : v.split(",");
80
+ })) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsInterceptUserKCodeList"));
81
+ };
82
+ }
83
+ };
84
+ });
85
+ this.name = "客户编码(K码)";
86
+ this.parentId = options.id;
87
+ this.id = "".concat(options.id, "_logisticsInterceptUserKCodeList");
88
+ this.sortField = "".concat(options.id, "_logisticsInterceptUserKCodeList");
89
+ this.formField = "".concat(options.id, "_logisticsInterceptUserKCodeList");
90
+ this.companyId = "".concat(options.id, "_interceptCompany");
91
+ this.type = options.type;
92
+ this.componentConfig = options.componentConfig;
93
+ this.rules = [];
94
+ this.align = "left";
95
+ this.width = 220;
96
+ this.isCombinationComponent = false;
97
+ this.canSort = true;
98
+ this.children = [];
99
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
100
+ this.logisticsAddress = LogisticsAddressData.getInstance();
101
+ this.dataType = "string";
102
+ this.options = (this.logisticsAddress.getAddressData() || []).filter(function (item) {
103
+ return item.userKCode;
104
+ });
105
+ }
106
+
107
+ //物流轨迹查询
108
+ );
109
+
110
+ export default InterceptLogisticsUserKCode;