@kmkf-fe-packages/services-components 0.8.13-alpha.1 → 0.8.13-alpha.3

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 { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
2
2
  import React from "react";
3
- declare class ReissueTradeId implements ComponentInterface {
3
+ declare class CommonTradeId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
@@ -33,4 +33,4 @@ declare class ReissueTradeId implements ComponentInterface {
33
33
  formatFilterValue: (input: string) => string[];
34
34
  };
35
35
  }
36
- export default ReissueTradeId;
36
+ export default CommonTradeId;
@@ -7,17 +7,27 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  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); }
9
9
  import React from "react";
10
- import { message } from "antd";
11
- import { TradeId } from "@kmkf-fe-packages/basic-components";
10
+ import { message, Input } from "antd";
12
11
  import { CopyOutlined } from "@ant-design/icons";
13
12
  import GetFormItem from "../GetFormItem";
14
13
  import ItemView from "../../commonComponents/ItemView";
15
14
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
15
  import copy from "copy-to-clipboard";
17
16
  import { SYMBOL } from "../../constant";
18
- var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options) {
17
+ var TRADE_ID_MAP = {
18
+ REISSUE_TRADE_ID: {
19
+ key: "reissueTradeId"
20
+ },
21
+ EXCHANGE_TRADE_ID: {
22
+ key: "exchangeTradeId"
23
+ },
24
+ RETURN_GOODS_TRADE_ID: {
25
+ key: "returnGoodsTradeId"
26
+ }
27
+ };
28
+ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
19
29
  var _this = this;
20
- _classCallCheck(this, ReissueTradeId);
30
+ _classCallCheck(this, CommonTradeId);
21
31
  _defineProperty(this, "name", void 0);
22
32
  _defineProperty(this, "id", void 0);
23
33
  _defineProperty(this, "sortField", void 0);
@@ -44,16 +54,16 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
44
54
  message.success("复制成功");
45
55
  });
46
56
  _defineProperty(this, "renderPc", function (value, record) {
47
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")]) === undefined) {
57
+ if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) === undefined) {
48
58
  return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
49
59
  }
50
60
  return /*#__PURE__*/React.createElement("span", {
51
61
  onClick: function onClick(e) {
52
62
  return e.stopPropagation();
53
63
  }
54
- }, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")], /*#__PURE__*/React.createElement("span", {
64
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)], /*#__PURE__*/React.createElement("span", {
55
65
  onClick: function onClick(e) {
56
- _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")]);
66
+ _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]);
57
67
  e.stopPropagation();
58
68
  }
59
69
  }, /*#__PURE__*/React.createElement("span", {
@@ -64,34 +74,27 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
64
74
  }, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
65
75
  });
66
76
  _defineProperty(this, "renderLog", function (r) {
67
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_reissue_tradeId")])) return null;
77
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)])) return null;
68
78
  return _this.renderPc(undefined, r);
69
79
  });
70
80
  _defineProperty(this, "getComponentValue", function (r) {
71
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_reissue_tradeId")];
81
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)];
72
82
  });
73
83
  _defineProperty(this, "renderExport", function (value, record) {
74
84
  var _record;
75
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_tradeId")]) !== null && _record !== void 0 ? _record : "--";
85
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) !== null && _record !== void 0 ? _record : "--";
76
86
  });
77
87
  _defineProperty(this, "editRender", function (p) {
78
- var _this$componentConfig, _this$componentConfig2, _this$effects, _this$effects2;
79
- var onTradeIdBlur = function onTradeIdBlur(e) {
80
- var _p$onBlur;
81
- p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, e.target.value, "tradeId");
82
- };
88
+ var _this$componentConfig, _this$componentConfig2;
83
89
  return /*#__PURE__*/React.createElement(GetFormItem, {
84
90
  title: _this.name,
85
91
  name: _this.id,
86
92
  rules: _this.rules,
87
93
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
88
94
  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,
89
- component: /*#__PURE__*/React.createElement(TradeId, _extends({}, _this.componentConfig, {
90
- shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
91
- shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
95
+ component: /*#__PURE__*/React.createElement(Input, _extends({}, _this.componentConfig, {
92
96
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
93
- disabled: true,
94
- onBlur: onTradeIdBlur
97
+ disabled: true
95
98
  }))
96
99
  });
97
100
  });
@@ -99,14 +102,14 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
99
102
  return {
100
103
  searchDefaultConditions: SYMBOL.in,
101
104
  type: item.type,
102
- id: "".concat(item.id, "_reissue_tradeId"),
105
+ id: "".concat(item.id, "_").concat(TRADE_ID_MAP[_this.type].key),
103
106
  // 过滤组件id
104
107
  name: item.name,
105
108
  // 过滤组件名称
106
109
  filterComponentType: "Input",
107
110
  filterFn: function filterFn(value) {
108
111
  return function (i) {
109
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "tradeId"), value);
112
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(TRADE_ID_MAP[_this.type].key)), value);
110
113
  };
111
114
  },
112
115
  formatFilterValue: function formatFilterValue(input) {
@@ -116,8 +119,8 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
116
119
  });
117
120
  this.name = options.name;
118
121
  this.id = options.id;
119
- this.sortField = "".concat(options.id, "_reissue_tradeId");
120
- this.formField = "".concat(options.id, "_reissue_tradeId");
122
+ this.sortField = "".concat(options.id, "_").concat(TRADE_ID_MAP[options.type].key);
123
+ this.formField = "".concat(options.id, "_").concat(TRADE_ID_MAP[options.type].key);
121
124
  this.type = options.type;
122
125
  this.showContains = false;
123
126
  this.onlyContainsString = true;
@@ -129,4 +132,4 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
129
132
  this.children = [];
130
133
  this.dataType = "string";
131
134
  });
132
- export default ReissueTradeId;
135
+ export default CommonTradeId;
@@ -14,7 +14,6 @@ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import get from 'lodash/get';
15
15
  import { SYMBOL } from "../../constant";
16
16
  var typeMap = {
17
- BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
18
17
  RADIO: 'radio'
19
18
  };
20
19
  var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
@@ -36,7 +35,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
36
35
  _defineProperty(this, "options", void 0);
37
36
  _defineProperty(this, "render", function (value) {
38
37
  var _value$value;
39
- return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
38
+ return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && typeof value.value === 'string' && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf('其他')) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
40
39
  });
41
40
  _defineProperty(this, "renderPc", function (value, record) {
42
41
  var type = _this.type;
@@ -6,7 +6,7 @@ declare class BasicSelect implements ComponentInterface {
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
9
+ componentConfig: ComponentInterface['componentConfig'];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
@@ -14,6 +14,7 @@ declare class BasicSelect implements ComponentInterface {
14
14
  dataType: ComponentInterface['dataType'];
15
15
  options: ComponentInterface['options'];
16
16
  constructor(options: PickOption);
17
+ getKeyByComponentType: (type: string) => any;
17
18
  editRender: (p: any) => React.JSX.Element;
18
19
  renderClient: (record: any) => React.JSX.Element | null;
19
20
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -12,6 +12,10 @@ import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
13
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import { SYMBOL } from "../../constant";
15
+ var typeMap = {
16
+ BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
17
+ SELECT: 'select'
18
+ };
15
19
  var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
16
20
  var _this = this,
17
21
  _this$componentConfig3;
@@ -28,6 +32,9 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
28
32
  _defineProperty(this, "children", void 0);
29
33
  _defineProperty(this, "dataType", void 0);
30
34
  _defineProperty(this, "options", void 0);
35
+ _defineProperty(this, "getKeyByComponentType", function (type) {
36
+ return typeMap[type] || '';
37
+ });
31
38
  _defineProperty(this, "editRender", function (p) {
32
39
  var _this$componentConfig, _this$componentConfig2;
33
40
  return /*#__PURE__*/React.createElement(GetFormItem, {
@@ -52,25 +59,30 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
52
59
  });
53
60
  _defineProperty(this, "renderPc", function (value, record) {
54
61
  var _record;
55
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_select")]) !== null && _record !== void 0 ? _record : '--');
62
+ var type = _this.type;
63
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record : '--');
56
64
  });
57
65
  _defineProperty(this, "renderLog", function (r) {
58
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_select")])) return null;
66
+ var type = _this.type;
67
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])])) return null;
59
68
  return _this.renderPc(undefined, r);
60
69
  });
61
70
  _defineProperty(this, "getComponentValue", function (r) {
62
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_select")];
71
+ var type = _this.type;
72
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])];
63
73
  });
64
74
  _defineProperty(this, "renderExport", function (value, record) {
65
75
  var _record2;
66
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_select")]) !== null && _record2 !== void 0 ? _record2 : '--';
76
+ var type = _this.type;
77
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
67
78
  });
68
79
  _defineProperty(this, "filterConfig", function (item) {
69
80
  var _item$config;
81
+ var key = _this.getKeyByComponentType(item.type);
70
82
  return {
71
83
  searchDefaultConditions: SYMBOL.in,
72
84
  type: item.type,
73
- id: "".concat(item.id, "_select"),
85
+ id: "".concat(item.id, "_").concat(key),
74
86
  // 过滤组件id
75
87
  name: item.name,
76
88
  // 过滤组件名称
@@ -80,15 +92,15 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
80
92
  },
81
93
  filterFn: function filterFn(value) {
82
94
  return function (i) {
83
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'select'));
95
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, key));
84
96
  };
85
97
  } // 第一个为选中值,第二个参数为表格行记录值
86
98
  };
87
99
  });
88
100
  this.name = options.name;
89
101
  this.id = options.id;
90
- this.sortField = "".concat(options.id, "_select");
91
- this.formField = "".concat(options.id, "_select");
102
+ this.sortField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
103
+ this.formField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
92
104
  this.type = options.type;
93
105
  this.componentConfig = options.componentConfig;
94
106
  this.rules = [];
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
3
- declare class BasicReissueStatusSelect implements ComponentInterface {
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ declare class StatusSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
@@ -11,13 +11,13 @@ declare class BasicReissueStatusSelect implements ComponentInterface {
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface['dataType'];
15
- options: ComponentInterface['options'];
14
+ dataType: ComponentInterface["dataType"];
15
+ options: ComponentInterface["options"];
16
16
  constructor(options: PickOption);
17
17
  editRender: (p: any) => React.JSX.Element;
18
18
  renderClient: (record: any) => React.JSX.Element | null;
19
- renderPc: (value: any, record: Record) => React.JSX.Element;
20
- renderLog: (r: Record) => React.JSX.Element | null;
19
+ renderPc: (value: any, record: Record) => React.JSX.Element | "--";
20
+ renderLog: (r: Record) => React.JSX.Element | "--" | null;
21
21
  getComponentValue: (r: Record) => any;
22
22
  renderExport: (value: any, record: Record) => any;
23
23
  filterConfig: (item: ColumnConfig) => {
@@ -27,11 +27,9 @@ declare class BasicReissueStatusSelect implements ComponentInterface {
27
27
  name: string;
28
28
  filterComponentType: "MultipleSelect";
29
29
  props: {
30
- options: {
31
- value: string;
32
- }[];
30
+ options: Record[];
33
31
  };
34
32
  filterFn: (value: string) => (i: Record) => boolean;
35
33
  };
36
34
  }
37
- export default BasicReissueStatusSelect;
35
+ export default StatusSelect;
@@ -8,20 +8,66 @@ 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 { ApaasSelect } from '@kmkf-fe-packages/basic-components';
11
+ import React from "react";
12
+ import { CommonStatus } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../constant";
17
- var statusOptions = [{
18
- value: '成功'
19
- }, {
20
- value: '失败'
21
- }];
22
- var BasicReissueStatusSelect = /*#__PURE__*/_createClass(function BasicReissueStatusSelect(options) {
17
+ // const statusOptions: Array<{ value: string }> = [{ value: '成功' }, { value: '失败' }]
18
+ var selectTypeMap = {
19
+ REISSUE_STATUS: {
20
+ options: [{
21
+ value: "成功",
22
+ label: "成功"
23
+ }, {
24
+ value: "失败",
25
+ label: "失败"
26
+ }],
27
+ key: "reissueStatusValue",
28
+ info: "reissueReason",
29
+ failValue: "失败"
30
+ },
31
+ EXCHANGE_STATUS: {
32
+ options: [{
33
+ value: "成功",
34
+ label: "成功"
35
+ }, {
36
+ value: "失败",
37
+ label: "失败"
38
+ }],
39
+ key: "exchangeStatusValue",
40
+ info: "exchangeReason",
41
+ failValue: "失败"
42
+ },
43
+ CREATE_STATUS: {
44
+ options: [{
45
+ value: "成功",
46
+ label: "成功"
47
+ }, {
48
+ value: "失败",
49
+ label: "失败"
50
+ }],
51
+ key: "createStatusValue",
52
+ info: "createReason",
53
+ failValue: "失败"
54
+ },
55
+ RETURN_GOODS_STATUS: {
56
+ options: [{
57
+ value: "成功",
58
+ label: "成功"
59
+ }, {
60
+ value: "失败",
61
+ label: "失败"
62
+ }],
63
+ key: "returnGoodsStatusValue",
64
+ info: "returnGoodsReason",
65
+ failValue: "失败"
66
+ }
67
+ };
68
+ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
23
69
  var _this = this;
24
- _classCallCheck(this, BasicReissueStatusSelect);
70
+ _classCallCheck(this, StatusSelect);
25
71
  _defineProperty(this, "name", void 0);
26
72
  _defineProperty(this, "id", void 0);
27
73
  _defineProperty(this, "sortField", void 0);
@@ -42,66 +88,66 @@ var BasicReissueStatusSelect = /*#__PURE__*/_createClass(function BasicReissueSt
42
88
  rules: _this.rules,
43
89
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
44
90
  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,
45
- component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
91
+ component: /*#__PURE__*/React.createElement(CommonStatus, _extends({}, _this.componentConfig, {
46
92
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
47
- showSearch: true
93
+ failValue: selectTypeMap[_this.type].failValue
48
94
  }))
49
95
  });
50
96
  });
51
97
  _defineProperty(this, "renderClient", function (record) {
98
+ var _record$_this$id, _record$_this$id2;
52
99
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
53
100
  id: _this.id,
54
101
  label: _this.name,
55
- value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
102
+ value: "".concat(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.status, ",").concat(record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.reason)
56
103
  }) : null;
57
104
  });
58
105
  _defineProperty(this, "renderPc", function (value, record) {
59
- var _record;
60
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_status")]) !== null && _record !== void 0 ? _record : '--');
106
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]) ? /*#__PURE__*/React.createElement("span", null, [record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)], record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].info)]].join(",")) : "--";
61
107
  });
62
108
  _defineProperty(this, "renderLog", function (r) {
63
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_reissue_status")])) return null;
109
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)])) return null;
64
110
  return _this.renderPc(undefined, r);
65
111
  });
66
112
  _defineProperty(this, "getComponentValue", function (r) {
67
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_reissue_status")];
113
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)];
68
114
  });
69
115
  _defineProperty(this, "renderExport", function (value, record) {
70
- var _record2;
71
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_status")]) !== null && _record2 !== void 0 ? _record2 : '--';
116
+ var _record;
117
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]) !== null && _record !== void 0 ? _record : "--";
72
118
  });
73
119
  _defineProperty(this, "filterConfig", function (item) {
74
120
  return {
75
121
  searchDefaultConditions: SYMBOL.in,
76
122
  type: item.type,
77
- id: "".concat(item.id, "_reissue_status"),
123
+ id: "".concat(item.id, "_").concat(selectTypeMap[_this.type].key),
78
124
  // 过滤组件id
79
125
  name: item.name,
80
126
  // 过滤组件名称
81
- filterComponentType: 'MultipleSelect',
127
+ filterComponentType: "MultipleSelect",
82
128
  props: {
83
- options: statusOptions
129
+ options: selectTypeMap[_this.type].options
84
130
  },
85
131
  filterFn: function filterFn(value) {
86
132
  return function (i) {
87
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'select'));
133
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(selectTypeMap[_this.type].key)));
88
134
  };
89
135
  } // 第一个为选中值,第二个参数为表格行记录值
90
136
  };
91
137
  });
92
138
  this.name = options.name;
93
139
  this.id = options.id;
94
- this.sortField = "".concat(options.id, "_reissue_status");
95
- this.formField = "".concat(options.id, "_reissue_status");
140
+ this.sortField = "".concat(options.id, "_").concat(selectTypeMap[options.type].key);
141
+ this.formField = "".concat(options.id, "_").concat(selectTypeMap[options.type].key);
96
142
  this.type = options.type;
97
143
  this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
98
- options: statusOptions
144
+ options: selectTypeMap[options.type].options
99
145
  });
100
146
  this.rules = [];
101
147
  this.isCombinationComponent = false;
102
148
  this.canSort = true;
103
149
  this.children = [];
104
- this.dataType = 'string';
105
- this.options = statusOptions;
150
+ this.dataType = "string";
151
+ this.options = selectTypeMap[options.type].options;
106
152
  });
107
- export default BasicReissueStatusSelect;
153
+ export default StatusSelect;
@@ -1,3 +1,3 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, ReissueStatus, ReissueTradeId } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, StatusSelect, CommonTradeId } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BasicRadio | ReissueTradeId | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | ReissueStatus;
3
+ export declare const factory: (type: string, options: PickOption) => CommonTradeId | StatusSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
@@ -1,4 +1,4 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, ReissueStatus, ReissueTradeId } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, StatusSelect, CommonTradeId } from "./index";
2
2
  export var factory = function factory(type, options) {
3
3
  var _options$componentCon;
4
4
  switch (type) {
@@ -15,7 +15,6 @@ export var factory = function factory(type, options) {
15
15
  case "INPUT":
16
16
  return new BasicInput(options);
17
17
  case "RADIO":
18
- case "BUYER_MESSAGE_NOTICE":
19
18
  return new BasicRadio(options);
20
19
  case "TEXTAREA":
21
20
  return new BasicTextArea(options);
@@ -24,6 +23,7 @@ export var factory = function factory(type, options) {
24
23
  case "DATETIME":
25
24
  return new BasicDataTime(options);
26
25
  case "SELECT":
26
+ case "BUYER_MESSAGE_NOTICE":
27
27
  return new BasicSelect(options);
28
28
  case "PICTURE":
29
29
  return new BasicPicture(options);
@@ -128,9 +128,14 @@ export var factory = function factory(type, options) {
128
128
  case "OUTER_WORK_ORDER_ID_INPUT":
129
129
  return new FlowWorkOrderId(options);
130
130
  case "REISSUE_STATUS":
131
- return new ReissueStatus(options);
131
+ case "EXCHANGE_STATUS":
132
+ case "CREATE_STATUS":
133
+ case "RETURN_GOODS_STATUS":
134
+ return new StatusSelect(options);
132
135
  case "REISSUE_TRADE_ID":
133
- return new ReissueTradeId(options);
136
+ case "EXCHANGE_TRADE_ID":
137
+ case "RETURN_GOODS_TRADE_ID":
138
+ return new CommonTradeId(options);
134
139
  default:
135
140
  return new BasicInput(options);
136
141
  }
@@ -51,8 +51,8 @@ export { default as Submitter } from "./components/Submitter";
51
51
  export { default as Handler } from "./components/Handler";
52
52
  export { default as CompletedUser } from "./components/CompletedUser";
53
53
  export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
54
- export { default as ReissueStatus } from "./components/ReissueStatus";
55
- export { default as ReissueTradeId } from "./components/ReissueTradeId";
54
+ export { default as StatusSelect } from "./components/StatusSelect";
55
+ export { default as CommonTradeId } from "./components/CommonTradeId";
56
56
  export { factory } from "./factory";
57
57
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
58
58
  export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
package/dist/esm/index.js CHANGED
@@ -51,8 +51,8 @@ export { default as Submitter } from "./components/Submitter";
51
51
  export { default as Handler } from "./components/Handler";
52
52
  export { default as CompletedUser } from "./components/CompletedUser";
53
53
  export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
54
- export { default as ReissueStatus } from "./components/ReissueStatus";
55
- export { default as ReissueTradeId } from "./components/ReissueTradeId";
54
+ export { default as StatusSelect } from "./components/StatusSelect";
55
+ export { default as CommonTradeId } from "./components/CommonTradeId";
56
56
  export { factory } from "./factory";
57
57
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
58
58
  export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.8.13-alpha.1",
3
+ "version": "0.8.13-alpha.3",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.8.13-alpha.1",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.1"
29
+ "@kmkf-fe-packages/basic-components": "^0.8.13-alpha.3",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.3"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "eaffaa8f384544cd8abb9cac141419f4812af9be"
43
+ "gitHead": "e58e0cdec5ee262d63ba5694f112b422227240cd"
44
44
  }