@kmkf-fe-packages/services-components 0.28.2-rc.2 → 0.28.2-rc.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.
@@ -7,6 +7,7 @@ import TrajectorySnapshot from "./trajectorySnapshot";
7
7
  import TrajectoryStatus from '../LogisticsTrajectory/trajectoryStatus';
8
8
  import TrajectoryLastLogisticsInfo from '../LogisticsTrajectory/trajectoryLastLogisticsInfo';
9
9
  import TrajectoryLastUpdateTime from '../LogisticsTrajectory/trajectoryLastUpdateTime';
10
+ import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
10
11
  declare class LogisticsMoreTrajectory implements ComponentInterface {
11
12
  name: string;
12
13
  id: string;
@@ -26,9 +27,11 @@ declare class LogisticsMoreTrajectory implements ComponentInterface {
26
27
  canSort: boolean;
27
28
  children: ComponentInterface[];
28
29
  dataType: ComponentInterface["dataType"];
30
+ expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
29
31
  constructor(options: PickOption);
30
32
  editRender: (p: any) => React.JSX.Element;
31
33
  renderClient: (record: Record) => React.JSX.Element | null;
34
+ renderStatus: (record: any, w?: number) => React.JSX.Element;
32
35
  renderPc: () => null;
33
36
  renderLog: (r: Record) => any;
34
37
  getComponentValue: (r: Record) => any;
@@ -16,9 +16,10 @@ import TrajectorySnapshot from "./trajectorySnapshot";
16
16
  import TrajectoryStatus from "../LogisticsTrajectory/trajectoryStatus";
17
17
  import TrajectoryLastLogisticsInfo from "../LogisticsTrajectory/trajectoryLastLogisticsInfo";
18
18
  import TrajectoryLastUpdateTime from "../LogisticsTrajectory/trajectoryLastUpdateTime";
19
+ import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
19
20
  import GetFormItem from "../GetFormItem";
20
21
  import ItemView from "../../commonComponents/ItemView";
21
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
22
+ import { isNull, ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
22
23
  var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTrajectory(options) {
23
24
  var _this = this,
24
25
  _this$componentConfig3;
@@ -41,6 +42,7 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
41
42
  _defineProperty(this, "canSort", void 0);
42
43
  _defineProperty(this, "children", void 0);
43
44
  _defineProperty(this, "dataType", void 0);
45
+ _defineProperty(this, "expressInterceptInstance", void 0);
44
46
  _defineProperty(this, "editRender", function (p) {
45
47
  var _this$componentConfig, _this$componentConfig2;
46
48
  return /*#__PURE__*/React.createElement(GetFormItem, {
@@ -58,16 +60,39 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
58
60
  id: _this.id,
59
61
  label: _this.name,
60
62
  value: record === null || record === void 0 ? void 0 : record[_this.id].map(function (item, index) {
61
- return /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record[_this.id].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/", item.trajectoryStatus, "/", item.trajectoryLastUpdateTime, "/", item.trajectoryLastLogisticsInfo);
63
+ return /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record[_this.id].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/", /*#__PURE__*/React.createElement("span", {
64
+ style: {
65
+ display: 'inline-block'
66
+ }
67
+ }, _this.renderStatus(item)), "/", item.trajectoryLastUpdateTime, "/", item.trajectoryLastLogisticsInfo);
62
68
  })
63
69
  }) : null;
64
70
  });
71
+ _defineProperty(this, "renderStatus", function (record) {
72
+ var _this$expressIntercep;
73
+ var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
74
+ var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record['trajectoryStatus'])];
75
+ return /*#__PURE__*/React.createElement("div", {
76
+ onClick: function onClick(e) {
77
+ return e.stopPropagation();
78
+ }
79
+ }, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
80
+ modelWidth: w,
81
+ interceptCompany: record['trajectoryCompany'],
82
+ interceptCode: record['trajectoryCode'],
83
+ interceptSenderMobile: record['trajectoryPhone']
84
+ }) : null);
85
+ });
65
86
  _defineProperty(this, "renderPc", function () {
66
87
  return null;
67
88
  });
68
89
  _defineProperty(this, "renderLog", function (r) {
69
90
  return !isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")]) ? r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].map(function (item, index) {
70
- return /*#__PURE__*/React.createElement("div", null, (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/", item.trajectoryStatus, "/", item.trajectoryLastUpdateTime, "/", item.trajectoryLastLogisticsInfo);
91
+ return /*#__PURE__*/React.createElement("div", null, (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot, "/", /*#__PURE__*/React.createElement("span", {
92
+ style: {
93
+ display: 'inline-block'
94
+ }
95
+ }, _this.renderStatus(item)), "/", item.trajectoryLastUpdateTime, "/", item.trajectoryLastLogisticsInfo);
71
96
  }) : null;
72
97
  });
73
98
  _defineProperty(this, "getComponentValue", function (r) {
@@ -88,6 +113,7 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
88
113
  this.type = options.type;
89
114
  this.componentConfig = options.componentConfig;
90
115
  this.expressDateInstance = ExpressData.getInstance();
116
+ this.expressInterceptInstance = ExpressInterceptData.getInstance();
91
117
  this.express = new TrajectoryCompany(_objectSpread(_objectSpread({}, options), {}, {
92
118
  name: "".concat(this.name, "-\u516C\u53F8"),
93
119
  id: "".concat(this.id, "_trajectoryMoreCompany")
@@ -102,7 +128,7 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
102
128
  }));
103
129
  this.trajectoryStatus = new TrajectoryStatus(_objectSpread(_objectSpread({}, options), {}, {
104
130
  name: "".concat(this.name, "-\u7269\u6D41\u72B6\u6001"),
105
- id: "".concat(this.id, "_trajectoryStatus")
131
+ id: "".concat(this.id)
106
132
  }));
107
133
  this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
108
134
  name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
@@ -102,7 +102,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
102
102
  }));
103
103
  this.trajectoryStatus = new TrajectoryStatus(_objectSpread(_objectSpread({}, options), {}, {
104
104
  name: "".concat(this.name, "-\u7269\u6D41\u72B6\u6001"),
105
- id: "".concat(this.id, "_trajectoryStatus")
105
+ id: "".concat(this.id)
106
106
  }));
107
107
  this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
108
108
  name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
@@ -1,5 +1,6 @@
1
1
  import { ComponentInterface, PickOption, ALignType, Record } from "../../type";
2
2
  import React from "react";
3
+ import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
3
4
  declare class TrajectoryStatus implements ComponentInterface {
4
5
  name: string;
5
6
  parentId: string;
@@ -15,12 +16,14 @@ declare class TrajectoryStatus implements ComponentInterface {
15
16
  canSort: boolean;
16
17
  children: ComponentInterface[];
17
18
  dataType: ComponentInterface["dataType"];
19
+ expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
18
20
  constructor(options: PickOption);
21
+ renderStatus: (record: any, w?: number) => React.JSX.Element;
19
22
  renderClient: (record: any) => React.JSX.Element | null;
20
- renderPc: (value: unknown, record: Record) => any;
23
+ renderPc: (value: any, record: Record) => React.JSX.Element;
21
24
  renderLog: (r: Record) => any;
22
25
  getComponentValue: (r: Record) => any;
23
- renderExport: (value: string, record: Record) => any;
26
+ renderExport: (value: any, record: Record) => any;
24
27
  editRender: () => null;
25
28
  filterConfig: () => never[];
26
29
  }
@@ -7,7 +7,9 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
7
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
8
  import React from "react";
9
9
  import ItemView from "../../commonComponents/ItemView";
10
+ import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
10
11
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
12
+ import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
11
13
  var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(options) {
12
14
  var _this = this;
13
15
  _classCallCheck(this, TrajectoryStatus);
@@ -25,27 +27,46 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
25
27
  _defineProperty(this, "canSort", void 0);
26
28
  _defineProperty(this, "children", void 0);
27
29
  _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "expressInterceptInstance", void 0);
31
+ _defineProperty(this, "renderStatus", function (record) {
32
+ var _this$expressIntercep;
33
+ var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
34
+ var interceptCode = "".concat(_this.parentId, "_trajectoryCode");
35
+ var interceptSenderMobile = "".concat(_this.parentId, "_trajectoryPhone");
36
+ var companyId = "".concat(_this.parentId, "_trajectoryCompany");
37
+ var value = (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep["".concat(record === null || record === void 0 ? void 0 : record[_this.id])];
38
+ return /*#__PURE__*/React.createElement("div", {
39
+ onClick: function onClick(e) {
40
+ return e.stopPropagation();
41
+ }
42
+ }, value !== null && value !== void 0 ? value : "--", value ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
43
+ modelWidth: w,
44
+ interceptCompany: record[companyId],
45
+ interceptCode: record[interceptCode],
46
+ interceptSenderMobile: record[interceptSenderMobile]
47
+ }) : null);
48
+ });
28
49
  _defineProperty(this, "renderClient", function (record) {
29
50
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
30
51
  id: _this.id,
31
52
  label: _this.name,
32
- value: record === null || record === void 0 ? void 0 : record[_this.id]
53
+ value: _this.renderStatus(record)
33
54
  }) : null;
34
55
  });
35
56
  _defineProperty(this, "renderPc", function (value, record) {
36
- var _record$_this$id;
37
- return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
57
+ return _this.renderStatus(record, 700);
38
58
  });
39
59
  _defineProperty(this, "renderLog", function (r) {
40
- if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
41
- return _this.renderPc(undefined, r);
60
+ var _this$expressIntercep2;
61
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
62
+ return (_this$expressIntercep2 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep2 === void 0 ? void 0 : _this$expressIntercep2[r === null || r === void 0 ? void 0 : r["".concat(_this.id)]];
42
63
  });
43
64
  _defineProperty(this, "getComponentValue", function (r) {
44
65
  return r === null || r === void 0 ? void 0 : r[_this.id];
45
66
  });
46
67
  _defineProperty(this, "renderExport", function (value, record) {
47
- var _record$_this$id2;
48
- return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
68
+ var _this$expressIntercep3, _this$expressIntercep4;
69
+ return (_this$expressIntercep3 = (_this$expressIntercep4 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep4 === void 0 ? void 0 : _this$expressIntercep4["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep3 !== void 0 ? _this$expressIntercep3 : "--";
49
70
  });
50
71
  _defineProperty(this, "editRender", function () {
51
72
  return null;
@@ -54,10 +75,10 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
54
75
  return [];
55
76
  });
56
77
  this.name = options.name;
57
- this.parentId = options.id;
58
- this.id = "".concat(options.id);
59
- this.sortField = "".concat(options.id);
60
- this.formField = "".concat(options.id);
78
+ this.parentId = "".concat(options.id);
79
+ this.id = "".concat(options.id, "_trajectoryStatus");
80
+ this.sortField = "".concat(options.id, "_trajectoryStatus");
81
+ this.formField = "".concat(options.id, "_trajectoryStatus");
61
82
  this.type = options.type;
62
83
  this.componentConfig = options.componentConfig;
63
84
  this.rules = [];
@@ -67,5 +88,6 @@ var TrajectoryStatus = /*#__PURE__*/_createClass(function TrajectoryStatus(optio
67
88
  this.canSort = false;
68
89
  this.dataType = "string";
69
90
  this.children = [];
91
+ this.expressInterceptInstance = ExpressInterceptData.getInstance();
70
92
  });
71
93
  export default TrajectoryStatus;
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, CommonInput, PaymentVoucherCode } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonInput | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | PaymentVoucherCode;
3
+ export declare const factory: (type: string, options: PickOption) => BuyerNick | CommonInput | CompletedUser | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | PaymentVoucherCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.28.2-rc.2",
3
+ "version": "0.28.2-rc.5",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "e763d18677613a26a84968e00f6fdb63c2947468",
40
+ "gitHead": "2cee60925bf81239fe29d3a78f0c672254eaa47c",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }