@kmkf-fe-packages/services-components 2.0.63 → 2.0.65

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.
@@ -50,6 +50,15 @@ var Global = function Global(_ref) {
50
50
  }
51
51
  return reduxData;
52
52
  }, [JSON.stringify(reduxData)]);
53
+ useEffect(function () {
54
+ try {
55
+ var _reduxData$main2, _reduxData$workOrder2, _reduxData$global2;
56
+ var userInfo = (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main2 = reduxData.main) === null || _reduxData$main2 === void 0 ? void 0 : _reduxData$main2.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder2 = reduxData.workOrder) === null || _reduxData$workOrder2 === void 0 ? void 0 : _reduxData$workOrder2.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global2 = reduxData.global) === null || _reduxData$global2 === void 0 ? void 0 : _reduxData$global2.userInfo) || {};
57
+ localStorage.setItem("reduxData_userInfo", JSON.stringify(userInfo));
58
+ } catch (e) {
59
+ console.error(e);
60
+ }
61
+ }, [JSON.stringify(reduxData)]);
53
62
  useEffect(function () {
54
63
  initDataSource();
55
64
  }, []);
@@ -7,13 +7,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
7
7
  import system from "./system";
8
8
  import bs_e3 from "./bs_e3";
9
9
  import bs from "./bs";
10
- import { getJstColumns, getWlnColumns, getGyColumns, getWdtColumns } from "@kmkf-fe-packages/basic-components";
10
+ import { getJstColumns, getWlnColumns, getGyColumns, getWdtColumns, getKmColumns } from "@kmkf-fe-packages/basic-components";
11
11
  import defaultColumns from "./defaultColumns";
12
12
  export var getColumnsMap = function getColumnsMap(args) {
13
13
  var _ref = args || {},
14
14
  _ref$text = _ref.text,
15
15
  text = _ref$text === void 0 ? "" : _ref$text;
16
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
16
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
17
17
  text: text
18
18
  })), bs_e3()), getWdtColumns({
19
19
  text: text,
@@ -24,6 +24,8 @@ export var getColumnsMap = function getColumnsMap(args) {
24
24
  disabled: true
25
25
  })), getWlnColumns({
26
26
  text: text
27
+ })), getKmColumns({
28
+ disabled: true
27
29
  })), {}, {
28
30
  default: defaultColumns({
29
31
  text: text
@@ -1148,6 +1148,64 @@ var GoodHeaderMap = {
1148
1148
  }
1149
1149
  },
1150
1150
  moneyKey: "money"
1151
+ },
1152
+ KM_GOODS: {
1153
+ headerMap: {
1154
+ sysSkuPropertiesName: {
1155
+ name: "规格名称",
1156
+ width: 250
1157
+ },
1158
+ sysTitle: {
1159
+ name: "系统商品名称",
1160
+ width: 150
1161
+ },
1162
+ title: {
1163
+ name: "平台商品名称",
1164
+ width: 150
1165
+ },
1166
+ shortTitle: {
1167
+ name: "商品简称",
1168
+ width: 150
1169
+ },
1170
+ sysOuterId: {
1171
+ name: "系统商家编码",
1172
+ width: 150
1173
+ },
1174
+ outerId: {
1175
+ name: "商家编码",
1176
+ width: 150
1177
+ },
1178
+ skuSysId: {
1179
+ name: "系统规格ID",
1180
+ width: 150
1181
+ },
1182
+ itemSysId: {
1183
+ name: "系统商品ID",
1184
+ width: 150
1185
+ },
1186
+ sysPicPath: {
1187
+ name: "商品图片",
1188
+ width: 100,
1189
+ component: BsHeaderPic
1190
+ },
1191
+ num: {
1192
+ name: "数量",
1193
+ width: 150
1194
+ },
1195
+ payment: {
1196
+ name: "实付金额",
1197
+ width: 150
1198
+ },
1199
+ price: {
1200
+ name: "商品销售价",
1201
+ width: 150
1202
+ },
1203
+ type: {
1204
+ name: "商品类型",
1205
+ width: 100
1206
+ }
1207
+ },
1208
+ moneyKey: "money"
1151
1209
  }
1152
1210
  };
1153
1211
  GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
@@ -18,6 +18,7 @@ declare class Logistics implements ComponentInterface {
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
20
  dataType: ComponentInterface["dataType"];
21
+ isChange: boolean;
21
22
  constructor(options: PickOption);
22
23
  editRender: (p: any) => React.JSX.Element;
23
24
  renderClient: (record: Record) => React.JSX.Element;
@@ -32,8 +32,23 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
32
32
  _defineProperty(this, "canSort", void 0);
33
33
  _defineProperty(this, "children", void 0);
34
34
  _defineProperty(this, "dataType", void 0);
35
+ _defineProperty(this, "isChange", void 0);
35
36
  _defineProperty(this, "editRender", function (p) {
36
37
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
38
+ var onExpressLogisticsCodeBlur = function onExpressLogisticsCodeBlur(val) {
39
+ if (_this.isChange) {
40
+ var _p$onBlur;
41
+ p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, val, "expressLogisticsCode");
42
+ _this.isChange = false;
43
+ }
44
+ };
45
+ var onExpressLogisticsCodeChange = function onExpressLogisticsCodeChange() {
46
+ _this.isChange = true;
47
+ for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
48
+ e[_key] = arguments[_key];
49
+ }
50
+ p === null || p === void 0 ? void 0 : p.onChange.apply(p, e);
51
+ };
37
52
  return /*#__PURE__*/React.createElement(GetFormItem, {
38
53
  title: _this.name,
39
54
  name: _this.id,
@@ -41,11 +56,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
41
56
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
42
57
  display: p === null || p === void 0 ? void 0 : p.display,
43
58
  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,
44
- 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 : '',
59
+ 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 : "",
45
60
  component: /*#__PURE__*/React.createElement(ExpressLogistics, _extends({}, _this.componentConfig, {
46
61
  options: _this.expressDateInstance.getExpressData(),
47
- onBlur: p === null || p === void 0 ? void 0 : p.onBlur,
48
- onChange: p === null || p === void 0 ? void 0 : p.onChange
62
+ onBlur: onExpressLogisticsCodeBlur,
63
+ onChange: onExpressLogisticsCodeChange
49
64
  }))
50
65
  });
51
66
  });
@@ -114,5 +129,6 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
114
129
  return Promise.resolve();
115
130
  }
116
131
  }] : [];
132
+ this.isChange = false;
117
133
  });
118
134
  export default Logistics;
@@ -1,19 +1,20 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
3
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
- import TrajectoryCompany from './trajectoryCompany';
5
- import TrajectoryCode from './trajectoryCode';
6
- import TrajectorySnapshot from './trajectorySnapshot';
7
- import TrajectoryStatus from './trajectoryStatus';
8
- import TrajectoryLastLogisticsInfo from './trajectoryLastLogisticsInfo';
9
- import TrajectoryLastUpdateTime from './trajectoryLastUpdateTime';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ import TrajectoryCompany from "./trajectoryCompany";
5
+ import TrajectoryCode from "./trajectoryCode";
6
+ import TrajectorySnapshot from "./trajectorySnapshot";
7
+ import TrajectoryStatus from "./trajectoryStatus";
8
+ import TrajectoryLastLogisticsInfo from "./trajectoryLastLogisticsInfo";
9
+ import TrajectoryLastUpdateTime from "./trajectoryLastUpdateTime";
10
+ import TrajectoryApiStatus from "./trajectoryApiStatus";
10
11
  declare class LogisticsTrajectory implements ComponentInterface {
11
12
  name: string;
12
13
  id: string;
13
14
  sortField: string;
14
15
  type: string;
15
16
  rules: any[];
16
- componentConfig: ComponentInterface['componentConfig'];
17
+ componentConfig: ComponentInterface["componentConfig"];
17
18
  expressDateInstance: InstanceType<typeof ExpressData>;
18
19
  express: TrajectoryCompany;
19
20
  expressCode: TrajectoryCode;
@@ -21,11 +22,12 @@ declare class LogisticsTrajectory implements ComponentInterface {
21
22
  trajectoryStatus: TrajectoryStatus;
22
23
  trajectoryLastLogisticsInfo: TrajectoryLastLogisticsInfo;
23
24
  trajectoryLastUpdateTime: TrajectoryLastUpdateTime;
25
+ trajectoryApiStatus: TrajectoryApiStatus;
24
26
  isCombinationComponent: boolean;
25
27
  formField: string;
26
28
  canSort: boolean;
27
29
  children: ComponentInterface[];
28
- dataType: ComponentInterface['dataType'];
30
+ dataType: ComponentInterface["dataType"];
29
31
  constructor(options: PickOption);
30
32
  editRender: (p: any) => React.JSX.Element;
31
33
  renderClient: (record: Record) => React.JSX.Element;
@@ -36,6 +38,7 @@ declare class LogisticsTrajectory implements ComponentInterface {
36
38
  order: any;
37
39
  snapshot: any;
38
40
  trajectoryStatus: any;
41
+ trajectoryApiStatus: any;
39
42
  trajectoryLastUpdateTime: any;
40
43
  trajectoryLastLogisticsInfo: any;
41
44
  };
@@ -8,15 +8,16 @@ 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 { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
13
- import { LogisticsTrajectory as Trajectory } from '@kmkf-fe-packages/basic-components';
11
+ import React from "react";
12
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
13
+ import { LogisticsTrajectory as Trajectory } from "@kmkf-fe-packages/basic-components";
14
14
  import TrajectoryCompany from "./trajectoryCompany";
15
15
  import TrajectoryCode from "./trajectoryCode";
16
16
  import TrajectorySnapshot from "./trajectorySnapshot";
17
17
  import TrajectoryStatus from "./trajectoryStatus";
18
18
  import TrajectoryLastLogisticsInfo from "./trajectoryLastLogisticsInfo";
19
19
  import TrajectoryLastUpdateTime from "./trajectoryLastUpdateTime";
20
+ import TrajectoryApiStatus from "./trajectoryApiStatus";
20
21
  import GetFormItem from "../GetFormItem";
21
22
  var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory(options) {
22
23
  var _this = this,
@@ -35,6 +36,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
35
36
  _defineProperty(this, "trajectoryStatus", void 0);
36
37
  _defineProperty(this, "trajectoryLastLogisticsInfo", void 0);
37
38
  _defineProperty(this, "trajectoryLastUpdateTime", void 0);
39
+ _defineProperty(this, "trajectoryApiStatus", void 0);
38
40
  _defineProperty(this, "isCombinationComponent", void 0);
39
41
  _defineProperty(this, "formField", void 0);
40
42
  _defineProperty(this, "canSort", void 0);
@@ -49,20 +51,20 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
49
51
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
50
52
  display: p === null || p === void 0 ? void 0 : p.display,
51
53
  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,
52
- 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 : '',
54
+ 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 : "",
53
55
  component: /*#__PURE__*/React.createElement(Trajectory, _extends({}, _this.componentConfig, {
54
56
  options: _this.expressDateInstance.getExpressData()
55
57
  }))
56
58
  });
57
59
  });
58
60
  _defineProperty(this, "renderClient", function (record) {
59
- return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.expressSnapshot.renderClient(record), _this.trajectoryStatus.renderClient(record), _this.trajectoryLastUpdateTime.renderClient(record), _this.trajectoryLastLogisticsInfo.renderClient(record));
61
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.expressSnapshot.renderClient(record), _this.trajectoryStatus.renderClient(record), _this.trajectoryApiStatus.renderClient(record), _this.trajectoryLastUpdateTime.renderClient(record), _this.trajectoryLastLogisticsInfo.renderClient(record));
60
62
  });
61
63
  _defineProperty(this, "renderPc", function () {
62
64
  return null;
63
65
  });
64
66
  _defineProperty(this, "renderLog", function (r) {
65
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressSnapshot.name, ":", _this.expressSnapshot.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryStatus.name, ":", _this.trajectoryStatus.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastUpdateTime.name, ":", _this.trajectoryLastUpdateTime.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastLogisticsInfo.name, ":", _this.trajectoryLastLogisticsInfo.renderLog(r)));
67
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressSnapshot.name, ":", _this.expressSnapshot.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryStatus.name, ":", _this.trajectoryStatus.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryApiStatus.name, ":", _this.trajectoryApiStatus.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastUpdateTime.name, ":", _this.trajectoryLastUpdateTime.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastLogisticsInfo.name, ":", _this.trajectoryLastLogisticsInfo.renderLog(r)));
66
68
  });
67
69
  _defineProperty(this, "getComponentValue", function (r) {
68
70
  return {
@@ -70,6 +72,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
70
72
  order: _this.expressCode.getComponentValue(r),
71
73
  snapshot: _this.expressSnapshot.getComponentValue(r),
72
74
  trajectoryStatus: _this.trajectoryStatus.getComponentValue(r),
75
+ trajectoryApiStatus: _this.trajectoryApiStatus.getComponentValue(r),
73
76
  trajectoryLastUpdateTime: _this.trajectoryLastUpdateTime.getComponentValue(r),
74
77
  trajectoryLastLogisticsInfo: _this.trajectoryLastLogisticsInfo.getComponentValue(r)
75
78
  };
@@ -79,7 +82,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
79
82
  });
80
83
  _defineProperty(this, "filterConfig", function (item) {
81
84
  return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
82
- subKey: 'trajectoryCompany'
85
+ subKey: "trajectoryCompany"
83
86
  })), _this.expressCode.filterConfig(item), _this.expressSnapshot.filterConfig(item)];
84
87
  });
85
88
  this.name = options.name;
@@ -106,6 +109,11 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
106
109
  id: "".concat(this.id, "_trajectoryStatus"),
107
110
  parentId: "".concat(this.id)
108
111
  }));
112
+ this.trajectoryApiStatus = new TrajectoryApiStatus(_objectSpread(_objectSpread({}, options), {}, {
113
+ name: "".concat(this.name, "-\u63A5\u53E3\u72B6\u6001"),
114
+ id: "".concat(this.id, "_trajectoryApiStatus"),
115
+ parentId: "".concat(this.id)
116
+ }));
109
117
  this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
110
118
  name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
111
119
  id: "".concat(this.id, "_trajectoryLastLogisticsInfo")
@@ -116,15 +124,15 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
116
124
  }));
117
125
  this.isCombinationComponent = true;
118
126
  this.canSort = false;
119
- this.dataType = 'object';
120
- this.children = [this.express, this.expressCode, this.expressSnapshot, this.trajectoryStatus, this.trajectoryLastUpdateTime, this.trajectoryLastLogisticsInfo];
127
+ this.dataType = "object";
128
+ this.children = [this.express, this.expressCode, this.expressSnapshot, this.trajectoryStatus, this.trajectoryApiStatus, this.trajectoryLastUpdateTime, this.trajectoryLastLogisticsInfo];
121
129
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
122
130
  validator: function validator(_, value) {
123
131
  if (!value.trajectoryCompany) {
124
- return Promise.reject(new Error('请选择物流公司'));
132
+ return Promise.reject(new Error("请选择物流公司"));
125
133
  }
126
134
  if (!value.trajectoryCode) {
127
- return Promise.reject(new Error('请输入物流单号'));
135
+ return Promise.reject(new Error("请输入物流单号"));
128
136
  }
129
137
  return Promise.resolve();
130
138
  }
@@ -0,0 +1,41 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class TrajectoryApiStatus 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
+ parentId: string;
22
+ });
23
+ getComponentValue: (r: Record) => any;
24
+ renderClient: (r: any) => React.JSX.Element | null;
25
+ renderPc: (value: any, r: Record) => React.JSX.Element | "--";
26
+ renderLog: (r: Record) => React.JSX.Element | "--" | null;
27
+ renderExport: (value: any, r: Record) => string;
28
+ editRender: () => null;
29
+ filterConfig: (item: ColumnConfig) => {
30
+ searchDefaultConditions: "in";
31
+ type: string;
32
+ id: string;
33
+ name: string;
34
+ filterComponentType: "MultipleSelect";
35
+ props: {
36
+ options: any[];
37
+ };
38
+ filterFn: (value: string) => (i: Record) => boolean;
39
+ };
40
+ }
41
+ export default TrajectoryApiStatus;
@@ -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 TrajectoryApiStatus = /*#__PURE__*/_createClass(function TrajectoryApiStatus(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, TrajectoryApiStatus);
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$trajectoryApi, _record$trajectoryApi2, _record$trajectoryApi3, _record$trajectoryApi4, _record$trajectoryApi5;
37
+ var record = r[_this.parentId];
38
+ var status = record === null || record === void 0 ? void 0 : (_record$trajectoryApi = record.trajectoryApiStatus) === null || _record$trajectoryApi === void 0 ? void 0 : _record$trajectoryApi.status;
39
+ var statusColor = status === "成功" ? "#52c41a" : "#ff4d4f";
40
+ return !isNull(record === null || record === void 0 ? void 0 : (_record$trajectoryApi2 = record.trajectoryApiStatus) === null || _record$trajectoryApi2 === void 0 ? void 0 : _record$trajectoryApi2.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$trajectoryApi3 = record.trajectoryApiStatus) === null || _record$trajectoryApi3 === void 0 ? void 0 : _record$trajectoryApi3.status, record !== null && record !== void 0 && (_record$trajectoryApi4 = record.trajectoryApiStatus) !== null && _record$trajectoryApi4 !== void 0 && _record$trajectoryApi4.reason ? /*#__PURE__*/React.createElement("span", null, "\uFF0C", (record === null || record === void 0 ? void 0 : (_record$trajectoryApi5 = record.trajectoryApiStatus) === null || _record$trajectoryApi5 === void 0 ? void 0 : _record$trajectoryApi5.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, "_trajectoryApiStatus"),
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 = options.id;
91
+ this.parentId = "".concat(options.parentId);
92
+ this.sortField = this.id;
93
+ this.formField = this.id;
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 TrajectoryApiStatus;
@@ -5,6 +5,9 @@ declare const CONFIG_MAP: {
5
5
  JST_GOODS: {
6
6
  key: string;
7
7
  };
8
+ KM_GOODS: {
9
+ key: string;
10
+ };
8
11
  };
9
12
  declare class PublicGoods implements ComponentInterface {
10
13
  name: string;
@@ -18,7 +18,10 @@ import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
18
  import { SYMBOL } from "../../../constant";
19
19
  var CONFIG_MAP = {
20
20
  JST_GOODS: {
21
- key: 'jstGoods'
21
+ key: "jstGoods"
22
+ },
23
+ KM_GOODS: {
24
+ key: "kmGoods"
22
25
  }
23
26
  };
24
27
  var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, 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, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => LogisticsInterception | LogisticsMoreInterception | WdtShopSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect;
3
+ export declare const factory: (type: string, options: PickOption) => BuyerNick | JstSendGood | Logistics | LogisticsTrajectory | MsgStatus | PublicGoods | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect;
@@ -157,6 +157,7 @@ export var factory = function factory(type, options) {
157
157
  return new BsE3Goods(options);
158
158
  case "GY_GOODS":
159
159
  return new GyGoods(options);
160
+ case "KM_GOODS":
160
161
  case "JST_GOODS":
161
162
  return new PublicGoods(options);
162
163
  case "JST_REISSUE_GOODS":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.63",
3
+ "version": "2.0.65",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.0.63",
25
- "@kmkf-fe-packages/kmkf-utils": "2.0.63",
24
+ "@kmkf-fe-packages/basic-components": "2.0.65",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.0.65",
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": "a6618afd20337b47d38f8705307d746c73e07fdb",
44
+ "gitHead": "15f16ebf734a616f09c15fa589a4124cdc909f95",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }