@kmkf-fe-packages/services-components 1.16.4 → 1.16.5-alpha.5

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.
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
3
- declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
3
+ declare const Global: ({ children, requestList, repeatRequestList, }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
6
6
  }>) => React.JSX.Element;
@@ -14,9 +14,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
14
14
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useEffect, useState } from "react";
17
- import { Skeleton, Result, Button } from "antd";
17
+ import { Skeleton, Button, Alert, Space } from "antd";
18
18
  import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
19
- import { servers } from '@kmkf-fe-packages/kmkf-utils';
19
+ import { servers } from "@kmkf-fe-packages/kmkf-utils";
20
20
  var Global = function Global(_ref) {
21
21
  var children = _ref.children,
22
22
  _ref$requestList = _ref.requestList,
@@ -93,15 +93,17 @@ var Global = function Global(_ref) {
93
93
  });
94
94
  }
95
95
  if (globalState === "failed") {
96
- return /*#__PURE__*/React.createElement(Result, {
97
- status: "error",
98
- title: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u8BF7\u5237\u65B0\u91CD\u8BD5",
99
- extra: /*#__PURE__*/React.createElement(Button, {
96
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Alert, {
97
+ message: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u53EF\u80FD\u5F71\u54CD\u90E8\u5206\u7EC4\u4EF6\u4F7F\u7528",
98
+ type: "warning",
99
+ action: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
100
100
  type: "primary",
101
101
  key: "console",
102
- onClick: initDataSource
103
- }, "\u5237\u65B0\u91CD\u8BD5")
104
- });
102
+ onClick: initDataSource,
103
+ size: "small"
104
+ }, "\u5237\u65B0\u91CD\u8BD5")),
105
+ closable: true
106
+ }), children);
105
107
  }
106
108
  return /*#__PURE__*/React.createElement(React.Fragment, null, children);
107
109
  };
@@ -131,6 +131,16 @@ var FlowWorkOrderStatus = /*#__PURE__*/_createClass(function FlowWorkOrderStatus
131
131
  label: '已关闭',
132
132
  color: 'rgba(0, 0, 0, 0.65)',
133
133
  bgColor: 'rgba(0, 0, 0, 0.04);'
134
+ },
135
+ "FLOWING": {
136
+ label: '流转中',
137
+ color: '#faad14',
138
+ bgColor: '#faad14'
139
+ },
140
+ "RETURNING": {
141
+ label: '回退中',
142
+ color: '#faad14',
143
+ bgColor: '#faad14'
134
144
  }
135
145
  };
136
146
  this.dataType = 'string';
@@ -20,7 +20,7 @@ declare class JstSendGood implements ComponentInterface {
20
20
  children: ComponentInterface[];
21
21
  dataType: ComponentInterface["dataType"];
22
22
  constructor(options: PickOption);
23
- getSortChildFields: (type: string, options: PickOption) => any;
23
+ getSortChildFields: (type: string, options: PickOption, fieldType?: string) => any;
24
24
  renderClient: (record: Record) => React.JSX.Element | null;
25
25
  renderPc: (value: any, record: Record) => React.JSX.Element;
26
26
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -60,34 +60,29 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
60
60
  _defineProperty(this, "canSort", void 0);
61
61
  _defineProperty(this, "children", void 0);
62
62
  _defineProperty(this, "dataType", void 0);
63
- _defineProperty(this, "getSortChildFields", function (type, options) {
63
+ _defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
64
+ var _typeMap$options$type, _typeMap$options$type2;
65
+ var sendName = {
66
+ name: "发货仓名称",
67
+ key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
68
+ dataType: "string"
69
+ };
70
+ var sendId = {
71
+ name: "发货仓编码",
72
+ key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
73
+ dataType: "string"
74
+ };
75
+ if (fieldType === 'WDT_SEND_GOOD') {
76
+ sendName.options = WdtSendData.getInstance().getWdtSendData() || [];
77
+ }
64
78
  if (type === 'all') {
65
- var _typeMap$options$type, _typeMap$options$type2;
66
- return [{
67
- name: "发货仓名称",
68
- key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
69
- dataType: "string"
70
- }, {
71
- name: "发货仓编码",
72
- key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
73
- dataType: "string"
74
- }];
79
+ return [sendName, sendId];
75
80
  }
76
81
  if (type === 'sendName') {
77
- var _typeMap$options$type3;
78
- return [{
79
- name: "发货仓名称",
80
- key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.sendName),
81
- dataType: "string"
82
- }];
82
+ return [sendName];
83
83
  }
84
84
  if (type === 'sendId') {
85
- var _typeMap$options$type4;
86
- return [{
87
- name: "发货仓编码",
88
- key: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.sendId),
89
- dataType: "string"
90
- }];
85
+ return [sendId];
91
86
  }
92
87
  return [];
93
88
  });
@@ -212,7 +207,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
212
207
  this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
213
208
  this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
214
209
  this.componentConfig = _options.componentConfig;
215
- this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options);
210
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
216
211
  this.type = _options.type;
217
212
  this.dataType = "object";
218
213
  this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
@@ -4,6 +4,12 @@ declare class JstSupply implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
+ sortChildField: {
8
+ name: string;
9
+ key: string;
10
+ dataType: string;
11
+ [key: string]: any;
12
+ }[];
7
13
  type: string;
8
14
  rules: any[];
9
15
  componentConfig: ComponentInterface["componentConfig"];
@@ -14,6 +20,7 @@ declare class JstSupply implements ComponentInterface {
14
20
  children: ComponentInterface[];
15
21
  dataType: ComponentInterface["dataType"];
16
22
  constructor(options: PickOption);
23
+ getSortChildFields: (type: string, options: PickOption) => any;
17
24
  renderClient: (record: Record) => React.JSX.Element | null;
18
25
  renderPc: (value: any, record: Record) => React.JSX.Element;
19
26
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -14,13 +14,15 @@ import { JstGoods } from "@kmkf-fe-packages/basic-components";
14
14
  import ItemView from "../../../commonComponents/ItemView";
15
15
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../../constant";
17
- var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
17
+ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(_options) {
18
18
  var _this = this,
19
- _this$componentConfig3;
19
+ _this$componentConfig3,
20
+ _this$componentConfig4;
20
21
  _classCallCheck(this, JstSupply);
21
22
  _defineProperty(this, "name", void 0);
22
23
  _defineProperty(this, "id", void 0);
23
24
  _defineProperty(this, "sortField", void 0);
25
+ _defineProperty(this, "sortChildField", void 0);
24
26
  _defineProperty(this, "type", void 0);
25
27
  _defineProperty(this, "rules", void 0);
26
28
  _defineProperty(this, "componentConfig", void 0);
@@ -30,6 +32,38 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
30
32
  _defineProperty(this, "canSort", void 0);
31
33
  _defineProperty(this, "children", void 0);
32
34
  _defineProperty(this, "dataType", void 0);
35
+ _defineProperty(this, "getSortChildFields", function (type, options) {
36
+ if (!type) {
37
+ return [{
38
+ name: "jst供销商名称",
39
+ key: "".concat(options.id, "_supplyName"),
40
+ dataType: "array",
41
+ format: "input"
42
+ }, {
43
+ name: "jst供销商编码",
44
+ key: "".concat(options.id, "_supplyId"),
45
+ dataType: "array",
46
+ format: "input"
47
+ }];
48
+ }
49
+ if (type === "supplyName") {
50
+ return [{
51
+ name: "jst供销商名称",
52
+ key: "".concat(options.id, "_supplyName"),
53
+ dataType: "array",
54
+ format: "input"
55
+ }];
56
+ }
57
+ if (type === "supplyId") {
58
+ return [{
59
+ name: "jst供销商编码",
60
+ key: "".concat(options.id, "_supplyId"),
61
+ dataType: "array",
62
+ format: "input"
63
+ }];
64
+ }
65
+ return [];
66
+ });
33
67
  _defineProperty(this, "renderClient", function (record) {
34
68
  var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
35
69
  return !isNull(item);
@@ -119,21 +153,22 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
119
153
  }
120
154
  }];
121
155
  });
122
- this.name = options.name;
123
- this.id = options.id;
124
- this.sortField = "".concat(options.id, "_jstItemList");
125
- this.formField = "".concat(options.id, "_jstItemList");
126
- this.type = options.type;
127
- this.componentConfig = options.componentConfig;
156
+ this.name = _options.name;
157
+ this.id = _options.id;
158
+ this.sortField = "".concat(_options.id, "_jstItemList");
159
+ this.formField = "".concat(_options.id, "_jstItemList");
160
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options);
161
+ this.type = _options.type;
162
+ this.componentConfig = _options.componentConfig;
128
163
  this.isCombinationComponent = false;
129
164
  this.canSort = false;
130
165
  this.children = [];
131
166
  this.dataType = "object";
132
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
167
+ this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
133
168
  required: true,
134
169
  validator: function validator(_, value) {
135
- var _this$componentConfig4;
136
- var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "";
170
+ var _this$componentConfig5;
171
+ var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "";
137
172
  if (!value || !value.length) {
138
173
  return Promise.reject(new Error("请选择宝贝"));
139
174
  }
@@ -0,0 +1,39 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class InterceptApiStatus implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ parentId: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
+ effects: ComponentInterface["effects"];
12
+ align: ALignType;
13
+ width: number;
14
+ isCombinationComponent: boolean;
15
+ formField: string;
16
+ canSort: boolean;
17
+ children: ComponentInterface[];
18
+ dataType: ComponentInterface["dataType"];
19
+ options: ComponentInterface["options"];
20
+ constructor(options: PickOption);
21
+ getComponentValue: (r: Record) => any;
22
+ renderClient: (r: any) => React.JSX.Element | null;
23
+ renderPc: (value: any, r: Record) => React.JSX.Element | "--";
24
+ renderLog: (r: Record) => React.JSX.Element | "--" | null;
25
+ renderExport: (value: any, r: Record) => string;
26
+ editRender: () => null;
27
+ filterConfig: (item: ColumnConfig) => {
28
+ searchDefaultConditions: "in";
29
+ type: string;
30
+ id: string;
31
+ name: string;
32
+ filterComponentType: "MultipleSelect";
33
+ props: {
34
+ options: any[];
35
+ };
36
+ filterFn: (value: string) => (i: Record) => boolean;
37
+ };
38
+ }
39
+ export default InterceptApiStatus;
@@ -0,0 +1,112 @@
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 InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, InterceptApiStatus);
15
+ _defineProperty(this, "name", void 0);
16
+ _defineProperty(this, "id", void 0);
17
+ _defineProperty(this, "parentId", void 0);
18
+ _defineProperty(this, "sortField", void 0);
19
+ _defineProperty(this, "type", void 0);
20
+ _defineProperty(this, "rules", void 0);
21
+ _defineProperty(this, "componentConfig", void 0);
22
+ _defineProperty(this, "effects", void 0);
23
+ _defineProperty(this, "align", void 0);
24
+ _defineProperty(this, "width", void 0);
25
+ _defineProperty(this, "isCombinationComponent", void 0);
26
+ _defineProperty(this, "formField", void 0);
27
+ _defineProperty(this, "canSort", void 0);
28
+ _defineProperty(this, "children", void 0);
29
+ _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "options", void 0);
31
+ _defineProperty(this, "getComponentValue", function (r) {
32
+ var record = r[_this.id];
33
+ return record === null || record === void 0 ? void 0 : record.status;
34
+ });
35
+ _defineProperty(this, "renderClient", function (r) {
36
+ var _record$interceptLogi, _record$interceptLogi2, _record$interceptLogi3, _record$interceptLogi4, _record$interceptLogi5;
37
+ var record = r[_this.parentId];
38
+ var status = record === null || record === void 0 ? void 0 : (_record$interceptLogi = record.interceptLogisticsApiStatus) === null || _record$interceptLogi === void 0 ? void 0 : _record$interceptLogi.status;
39
+ var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
40
+ return !isNull(record === null || record === void 0 ? void 0 : (_record$interceptLogi2 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi2 === void 0 ? void 0 : _record$interceptLogi2.status) ? /*#__PURE__*/React.createElement(ItemView, {
41
+ id: _this.id,
42
+ label: _this.name,
43
+ value: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
44
+ style: {
45
+ color: statusColor
46
+ }
47
+ }, record === null || record === void 0 ? void 0 : (_record$interceptLogi3 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi3 === void 0 ? void 0 : _record$interceptLogi3.status, record !== null && record !== void 0 && (_record$interceptLogi4 = record.interceptLogisticsApiStatus) !== null && _record$interceptLogi4 !== void 0 && _record$interceptLogi4.reason ? /*#__PURE__*/React.createElement("span", null, "\uFF0C", (record === null || record === void 0 ? void 0 : (_record$interceptLogi5 = record.interceptLogisticsApiStatus) === null || _record$interceptLogi5 === void 0 ? void 0 : _record$interceptLogi5.reason) || "") : null))
48
+ }) : null;
49
+ });
50
+ _defineProperty(this, "renderPc", function (value, r) {
51
+ var record = r[_this.id];
52
+ var status = record === null || record === void 0 ? void 0 : record.status;
53
+ var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
54
+ return !isNull(status) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
55
+ style: {
56
+ color: statusColor
57
+ }
58
+ }, record === null || record === void 0 ? void 0 : record.status, record !== null && record !== void 0 && record.reason ? /*#__PURE__*/React.createElement("span", null, "\uFF0C", (record === null || record === void 0 ? void 0 : record.reason) || "") : null)) : "--";
59
+ });
60
+ _defineProperty(this, "renderLog", function (r) {
61
+ var record = r[_this.id];
62
+ if (isNull(record === null || record === void 0 ? void 0 : record.status)) return null;
63
+ return _this.renderPc(undefined, r);
64
+ });
65
+ _defineProperty(this, "renderExport", function (value, r) {
66
+ var record = r[_this.id];
67
+ return record !== null && record !== void 0 && record.status ? "".concat(record === null || record === void 0 ? void 0 : record.status).concat(record.reason ? "\uFF0C".concat(record.reason) : "") : "--";
68
+ });
69
+ _defineProperty(this, "editRender", function () {
70
+ return null;
71
+ });
72
+ _defineProperty(this, "filterConfig", function (item) {
73
+ return {
74
+ searchDefaultConditions: SYMBOL.in,
75
+ type: item.type,
76
+ id: "".concat(item.id, "_interceptLogisticsApiStatus"),
77
+ name: "".concat(item.name, "-\u63A5\u53E3\u72B6\u6001"),
78
+ filterComponentType: "MultipleSelect",
79
+ props: {
80
+ options: _this.options || []
81
+ },
82
+ filterFn: function filterFn(value) {
83
+ return function (i) {
84
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "status"));
85
+ };
86
+ }
87
+ };
88
+ });
89
+ this.name = "接口状态";
90
+ this.id = "".concat(options.id, "_interceptLogisticsApiStatus");
91
+ this.parentId = options.id;
92
+ this.sortField = "".concat(options.id, "_interceptLogisticsApiStatus");
93
+ this.formField = "".concat(options.id, "_interceptLogisticsApiStatus");
94
+ this.type = options.type;
95
+ this.componentConfig = options.componentConfig;
96
+ this.rules = [];
97
+ this.align = "left";
98
+ this.width = 200;
99
+ this.isCombinationComponent = false;
100
+ this.canSort = true;
101
+ this.children = [];
102
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
103
+ this.dataType = "string";
104
+ this.options = [{
105
+ label: "成功",
106
+ value: "成功"
107
+ }, {
108
+ label: "失败",
109
+ value: "失败"
110
+ }];
111
+ });
112
+ export default InterceptApiStatus;
@@ -7,6 +7,7 @@ import InterceptAddress from "./InterceptAddress";
7
7
  import InterceptType from "./InterceptType";
8
8
  import InterceptStatus from "./InterceptStatus";
9
9
  import InterceptState from "./InterceptState";
10
+ import InterceptApiStatus from "./InterceptApiStatus";
10
11
  import Express from "../Express";
11
12
  import ExpressCode from "../ExpressCode";
12
13
  declare class Logistics implements ComponentInterface {
@@ -20,6 +21,7 @@ declare class Logistics implements ComponentInterface {
20
21
  interceptAddress: InterceptAddress;
21
22
  interceptType: InterceptType;
22
23
  interceptLogisticsStatus: InterceptStatus;
24
+ interceptApiStatus: InterceptApiStatus;
23
25
  interceptSenderMobile: InterceptSenderMobile;
24
26
  interceptSnapshot: InterceptSnapshot;
25
27
  interceptState: InterceptState;
@@ -43,6 +45,7 @@ declare class Logistics implements ComponentInterface {
43
45
  interceptSenderMobile: any;
44
46
  interceptType: any;
45
47
  interceptLogisticsStatus: any;
48
+ interceptApiStatus: any;
46
49
  interceptRedirectTo: {
47
50
  province: any;
48
51
  city: any;
@@ -18,6 +18,7 @@ import InterceptAddress from "./InterceptAddress";
18
18
  import InterceptType from "./InterceptType";
19
19
  import InterceptStatus from "./InterceptStatus";
20
20
  import InterceptState from "./InterceptState";
21
+ import InterceptApiStatus from "./InterceptApiStatus";
21
22
  import Express from "../Express";
22
23
  import ExpressCode from "../ExpressCode";
23
24
  import ColumnHeader from "./columnHeader";
@@ -34,6 +35,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
34
35
  _defineProperty(this, "interceptAddress", void 0);
35
36
  _defineProperty(this, "interceptType", void 0);
36
37
  _defineProperty(this, "interceptLogisticsStatus", void 0);
38
+ _defineProperty(this, "interceptApiStatus", void 0);
37
39
  _defineProperty(this, "interceptSenderMobile", void 0);
38
40
  _defineProperty(this, "interceptSnapshot", void 0);
39
41
  _defineProperty(this, "interceptState", void 0);
@@ -49,10 +51,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
49
51
  _defineProperty(this, "effects", void 0);
50
52
  _defineProperty(this, "dataType", void 0);
51
53
  _defineProperty(this, "renderClient", function (record) {
52
- 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.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(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));
53
55
  });
54
56
  _defineProperty(this, "renderLog", function (record) {
55
- 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.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))));
57
+ 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))));
56
58
  });
57
59
  _defineProperty(this, "getComponentValue", function (r) {
58
60
  return {
@@ -61,6 +63,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
61
63
  interceptSenderMobile: _this.interceptSenderMobile.getComponentValue(r),
62
64
  interceptType: _this.interceptType.getComponentValue(r),
63
65
  interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
66
+ interceptApiStatus: _this.interceptApiStatus.getComponentValue(r),
64
67
  interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
65
68
  interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
66
69
  interceptState: _this.interceptState.getComponentValue(r)
@@ -95,7 +98,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
95
98
  subKey: "interceptCompany"
96
99
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
97
100
  subKey: "interceptCode"
98
- })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)];
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)];
99
102
  });
100
103
  this.name = options.name;
101
104
  this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
@@ -113,6 +116,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
113
116
  this.interceptAddress = new InterceptAddress(options);
114
117
  this.interceptType = new InterceptType(options);
115
118
  this.interceptLogisticsStatus = new InterceptStatus(options);
119
+ this.interceptApiStatus = new InterceptApiStatus(options);
116
120
  this.interceptSenderMobile = new InterceptSenderMobile(options);
117
121
  this.interceptSnapshot = new InterceptSnapshot(options);
118
122
  this.interceptState = new InterceptState(options);
@@ -127,7 +131,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
127
131
  this.isCombinationComponent = true;
128
132
  this.canSort = false;
129
133
  this.dataType = "object";
130
- this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot, this.interceptState];
134
+ this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot, this.interceptState];
131
135
  this.rules = [{
132
136
  validator: function validator(_, value) {
133
137
  var _this$componentConfig5, _this$componentConfig6, _value$interceptAddre, _value$interceptSende;
@@ -0,0 +1,40 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class InterceptApiStatus implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ parentId: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
+ effects: ComponentInterface["effects"];
12
+ align: ALignType;
13
+ width: number;
14
+ isCombinationComponent: boolean;
15
+ formField: string;
16
+ canSort: boolean;
17
+ children: ComponentInterface[];
18
+ dataType: ComponentInterface["dataType"];
19
+ options: ComponentInterface["options"];
20
+ constructor(options: PickOption);
21
+ getComponentValue: (r: Record) => any;
22
+ renderStatus: (record: any, w?: number) => React.JSX.Element | "--";
23
+ renderClient: () => null;
24
+ renderPc: (value: any, record: Record) => React.JSX.Element | "--";
25
+ renderLog: () => null;
26
+ renderExport: (value: any, record: Record) => any;
27
+ editRender: () => null;
28
+ filterConfig: (item: ColumnConfig) => {
29
+ searchDefaultConditions: "in";
30
+ type: string;
31
+ id: string;
32
+ name: string;
33
+ filterComponentType: "MultipleSelect";
34
+ props: {
35
+ options: any[];
36
+ };
37
+ filterFn: (value: string) => (i: Record) => boolean;
38
+ };
39
+ }
40
+ export default InterceptApiStatus;
@@ -0,0 +1,107 @@
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 { SYMBOL } from "../../constant";
11
+ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, InterceptApiStatus);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "parentId", void 0);
17
+ _defineProperty(this, "sortField", 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, "formField", void 0);
26
+ _defineProperty(this, "canSort", void 0);
27
+ _defineProperty(this, "children", void 0);
28
+ _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "options", void 0);
30
+ _defineProperty(this, "getComponentValue", function (r) {
31
+ var _ref;
32
+ return (_ref = (r === null || r === void 0 ? void 0 : r[_this.id]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
33
+ return "".concat(item === null || item === void 0 ? void 0 : item.status).concat(item !== null && item !== void 0 && item.reason ? ",".concat(item === null || item === void 0 ? void 0 : item.reason) : "");
34
+ }).join(";");
35
+ });
36
+ _defineProperty(this, "renderStatus", function (record) {
37
+ var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
38
+ var statusList = (record === null || record === void 0 ? void 0 : record[_this.id]) || [];
39
+ if (isNull(statusList)) return "--";
40
+ return /*#__PURE__*/React.createElement("div", null, statusList.map(function (item, index) {
41
+ var status = item === null || item === void 0 ? void 0 : item.status;
42
+ var reason = item === null || item === void 0 ? void 0 : item.reason;
43
+ var statusColor = reason ? "#ff4d4f" : "#52c41a";
44
+ return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), /*#__PURE__*/React.createElement("span", null, status ? /*#__PURE__*/React.createElement("span", {
45
+ style: {
46
+ color: statusColor
47
+ }
48
+ }, /*#__PURE__*/React.createElement("span", null, status), reason ? /*#__PURE__*/React.createElement("span", null, "\uFF0C", reason) : null) : "--"));
49
+ }));
50
+ });
51
+ _defineProperty(this, "renderClient", function () {
52
+ return null;
53
+ });
54
+ _defineProperty(this, "renderPc", function (value, record) {
55
+ return _this.renderStatus(record, 700);
56
+ });
57
+ _defineProperty(this, "renderLog", function () {
58
+ return null;
59
+ });
60
+ _defineProperty(this, "renderExport", function (value, record) {
61
+ var _this$getComponentVal;
62
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
63
+ });
64
+ _defineProperty(this, "editRender", function () {
65
+ return null;
66
+ });
67
+ _defineProperty(this, "filterConfig", function (item) {
68
+ return {
69
+ searchDefaultConditions: SYMBOL.in,
70
+ type: item.type,
71
+ id: "".concat(item.id, "_logisticsInterceptApiStatusList"),
72
+ name: "".concat(item.name, "-\u63A5\u53E3\u72B6\u6001"),
73
+ filterComponentType: "MultipleSelect",
74
+ props: {
75
+ options: _this.options || []
76
+ },
77
+ filterFn: function filterFn(value) {
78
+ return function (i) {
79
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "status"));
80
+ };
81
+ }
82
+ };
83
+ });
84
+ this.name = "接口状态";
85
+ this.id = "".concat(options.id, "_logisticsInterceptApiStatusList");
86
+ this.parentId = options.id;
87
+ this.sortField = "".concat(options.id, "_logisticsInterceptApiStatusList");
88
+ this.formField = "".concat(options.id, "_logisticsInterceptApiStatusList");
89
+ this.type = options.type;
90
+ this.componentConfig = options.componentConfig;
91
+ this.rules = [];
92
+ this.align = "left";
93
+ this.width = 200;
94
+ this.isCombinationComponent = false;
95
+ this.canSort = true;
96
+ this.children = [];
97
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
98
+ this.dataType = "string";
99
+ this.options = [{
100
+ label: "成功",
101
+ value: "成功"
102
+ }, {
103
+ label: "失败",
104
+ value: "失败"
105
+ }];
106
+ });
107
+ export default InterceptApiStatus;
@@ -1,13 +1,14 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
3
- import { ExpressData, ExpressInterceptData, LogisticsAddressData, AddressData } from '@kmkf-fe-packages/kmkf-utils';
4
- import InterceptSenderMobile from './interceptSenderMobile';
5
- import InterceptSnapshot from './interceptSnapshot';
6
- import InterceptAddress from './InterceptAddress';
7
- import InterceptType from './InterceptType';
8
- import InterceptStatus from './InterceptStatus';
9
- import InterceptCode from './interceptCode';
10
- import Express from './interceptCompany';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ import { ExpressData, ExpressInterceptData, LogisticsAddressData, AddressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ import InterceptSenderMobile from "./interceptSenderMobile";
5
+ import InterceptSnapshot from "./interceptSnapshot";
6
+ import InterceptAddress from "./InterceptAddress";
7
+ import InterceptType from "./InterceptType";
8
+ import InterceptStatus from "./InterceptStatus";
9
+ import InterceptCode from "./interceptCode";
10
+ import InterceptApiStatus from "./InterceptApiStatus";
11
+ import Express from "./interceptCompany";
11
12
  declare class Logistics implements ComponentInterface {
12
13
  name: string;
13
14
  columnHeader: string | JSX.Element;
@@ -15,10 +16,11 @@ declare class Logistics implements ComponentInterface {
15
16
  sortField: string;
16
17
  type: string;
17
18
  rules: any[];
18
- componentConfig: ComponentInterface['componentConfig'];
19
+ componentConfig: ComponentInterface["componentConfig"];
19
20
  interceptAddress: InterceptAddress;
20
21
  interceptType: InterceptType;
21
22
  interceptLogisticsStatus: InterceptStatus;
23
+ interceptApiStatus: InterceptApiStatus;
22
24
  interceptSenderMobile: InterceptSenderMobile;
23
25
  interceptSnapshot: InterceptSnapshot;
24
26
  isCombinationComponent: boolean;
@@ -32,8 +34,8 @@ declare class Logistics implements ComponentInterface {
32
34
  logisticsAddressData: InstanceType<typeof LogisticsAddressData>;
33
35
  addressDateInstance: InstanceType<typeof AddressData>;
34
36
  expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
35
- effects: ComponentInterface['effects'];
36
- dataType: ComponentInterface['dataType'];
37
+ effects: ComponentInterface["effects"];
38
+ dataType: ComponentInterface["dataType"];
37
39
  constructor(options: PickOption);
38
40
  renderInfo: (list?: any[]) => React.JSX.Element;
39
41
  renderClient: (record: any) => React.JSX.Element | null;
@@ -8,10 +8,10 @@ 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';
12
- import { Space } from 'antd';
13
- import { LogisticsMoreInterception } from '@kmkf-fe-packages/basic-components';
14
- import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from '@kmkf-fe-packages/kmkf-utils';
11
+ import React from "react";
12
+ import { Space } from "antd";
13
+ import { LogisticsMoreInterception } from "@kmkf-fe-packages/basic-components";
14
+ import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import ItemView from "../../commonComponents/ItemView";
16
16
  import GetFormItem from "../GetFormItem";
17
17
  import InterceptSenderMobile from "./interceptSenderMobile";
@@ -20,6 +20,7 @@ import InterceptAddress from "./InterceptAddress";
20
20
  import InterceptType from "./InterceptType";
21
21
  import InterceptStatus from "./InterceptStatus";
22
22
  import InterceptCode from "./interceptCode";
23
+ import InterceptApiStatus from "./InterceptApiStatus";
23
24
  import Express from "./interceptCompany";
24
25
  import ColumnHeader from "./columnHeader";
25
26
  import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
@@ -39,6 +40,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
39
40
  _defineProperty(this, "interceptAddress", void 0);
40
41
  _defineProperty(this, "interceptType", void 0);
41
42
  _defineProperty(this, "interceptLogisticsStatus", void 0);
43
+ _defineProperty(this, "interceptApiStatus", void 0);
42
44
  _defineProperty(this, "interceptSenderMobile", void 0);
43
45
  _defineProperty(this, "interceptSnapshot", void 0);
44
46
  _defineProperty(this, "isCombinationComponent", void 0);
@@ -59,18 +61,22 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
59
61
  return /*#__PURE__*/React.createElement(Space, {
60
62
  wrap: true
61
63
  }, list.map(function (item, index) {
62
- var _ref, _item$interceptAddres, _this$expressIntercep;
64
+ var _ref, _item$interceptAddres, _this$expressIntercep, _item$interceptLogist, _item$interceptLogist2, _item$interceptLogist3, _item$interceptLogist4;
63
65
  var addressText = (_ref = item.interceptAddress || []) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
64
66
  return _this.addressDateInstance.getNameByCode(suffix);
65
- }).join('');
66
- return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : '', item.interceptCompany ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u516C\u53F8\uFF1A", _this.expressDateInstance.getExpressNameByCode(item.interceptCompany) || item.interceptCompany) : null, item.interceptCode ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u5355\u53F7\uFF1A", /*#__PURE__*/React.createElement(CopyText, {
67
+ }).join("");
68
+ return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", item.interceptCompany ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u516C\u53F8\uFF1A", _this.expressDateInstance.getExpressNameByCode(item.interceptCompany) || item.interceptCompany) : null, item.interceptCode ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u5355\u53F7\uFF1A", /*#__PURE__*/React.createElement(CopyText, {
67
69
  text: item.interceptCode
68
- })) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName, ' ', item.interceptReceiverMobile) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
70
+ })) : null, (_item$interceptAddres = item.interceptAddress) !== null && _item$interceptAddres !== void 0 && _item$interceptAddres.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName, " ", item.interceptReceiverMobile) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
69
71
  modelWidth: 500,
70
72
  interceptCompany: item.interceptCompany,
71
73
  interceptCode: item.interceptCode,
72
74
  interceptSenderMobile: item.interceptSenderMobile
73
- })) : null, item.interceptLogisticsSnapshot ? /*#__PURE__*/React.createElement("div", null, "\u5FEB\u7167\uFF1A", item.interceptLogisticsSnapshot) : null);
75
+ })) : null, item.interceptLogisticsApiStatus ? /*#__PURE__*/React.createElement("div", null, "\u63A5\u53E3\u72B6\u6001:", (_item$interceptLogist = item.interceptLogisticsApiStatus) !== null && _item$interceptLogist !== void 0 && _item$interceptLogist.reason ? /*#__PURE__*/React.createElement("span", {
76
+ style: {
77
+ color: "red"
78
+ }
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);
74
80
  }));
75
81
  });
76
82
  _defineProperty(this, "renderClient", function (record) {
@@ -100,7 +106,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
100
106
  rules: _this.rules,
101
107
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
102
108
  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,
103
- 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 : '',
109
+ 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 : "",
104
110
  component: /*#__PURE__*/React.createElement(LogisticsMoreInterception, _extends({}, _this.componentConfig, {
105
111
  expressInterceptData: _this.expressInterceptData.getExpressData(),
106
112
  isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
@@ -109,10 +115,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
109
115
  });
110
116
  _defineProperty(this, "filterConfig", function (item) {
111
117
  return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
112
- subKey: 'logisticsInterceptCompanyList'
118
+ subKey: "logisticsInterceptCompanyList"
113
119
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
114
- subKey: 'logisticsInterceptCodeList'
115
- })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
120
+ subKey: "logisticsInterceptCodeList"
121
+ })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptApiStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
116
122
  });
117
123
  this.name = options.name;
118
124
  this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
@@ -131,32 +137,33 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
131
137
  this.interceptAddress = new InterceptAddress(options);
132
138
  this.interceptType = new InterceptType(options);
133
139
  this.interceptLogisticsStatus = new InterceptStatus(options);
140
+ this.interceptApiStatus = new InterceptApiStatus(options);
134
141
  this.interceptSenderMobile = new InterceptSenderMobile(options);
135
142
  this.interceptSnapshot = new InterceptSnapshot(options);
136
143
  this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
137
144
  id: "".concat(options.id, "_logisticsInterceptCompanyList"),
138
- name: '物流信息'
145
+ name: "物流信息"
139
146
  }));
140
147
  this.expressCode = new InterceptCode(_objectSpread(_objectSpread({}, options), {}, {
141
148
  id: "".concat(options.id, "_logisticsInterceptCodeList"),
142
- name: '物流单号'
149
+ name: "物流单号"
143
150
  }));
144
151
  this.isCombinationComponent = true;
145
152
  this.canSort = false;
146
- this.dataType = 'object';
147
- this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
153
+ this.dataType = "object";
154
+ this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptApiStatus, this.interceptSnapshot];
148
155
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
149
156
  required: (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required,
150
157
  validator: function validator(_, value) {
151
158
  if (value.some(function (t) {
152
159
  return !(t !== null && t !== void 0 && t.interceptCompany) || !(t !== null && t !== void 0 && t.interceptCode);
153
160
  })) {
154
- return Promise.reject(new Error('请填写物流信息'));
161
+ return Promise.reject(new Error("请填写物流信息"));
155
162
  }
156
163
  if (value.some(function (t) {
157
164
  return !(t !== null && t !== void 0 && t.interceptType);
158
165
  })) {
159
- return Promise.reject(new Error('请选择拦截类型'));
166
+ return Promise.reject(new Error("请选择拦截类型"));
160
167
  }
161
168
  var hasNoAddress = value.some(function (t) {
162
169
  var _t$interceptAddress;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.16.4",
3
+ "version": "1.16.5-alpha.5",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "^1.16.4",
25
- "@kmkf-fe-packages/kmkf-utils": "^1.16.4",
24
+ "@kmkf-fe-packages/basic-components": "1.16.5-alpha.5",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.16.5-alpha.5",
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": "133a515cac82c29cbec6f8a3927d386660797e59",
44
+ "gitHead": "31bb738f333e28f2338a7f47d6e89ea8a865287f",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }