@kmkf-fe-packages/services-components 0.11.0-alpha.2 → 0.11.0-alpha.4

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,8 +1,8 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
- import React from "react";
3
- import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
- import ExpressCompany from "../common/expressCompany";
5
- import ExpressCode from "../common/expressCode";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
2
+ import React from 'react';
3
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
+ import ExpressCompany from '../common/expressCompany';
5
+ import ExpressCode from '../common/expressCode';
6
6
  declare class BsLogistics implements ComponentInterface {
7
7
  name: string;
8
8
  id: string;
@@ -15,13 +15,13 @@ declare class BsLogistics implements ComponentInterface {
15
15
  }[];
16
16
  type: string;
17
17
  rules: any[];
18
- componentConfig: ComponentInterface["componentConfig"];
18
+ componentConfig: ComponentInterface['componentConfig'];
19
19
  expressDateInstance: InstanceType<typeof ExpressData>;
20
20
  isCombinationComponent: boolean;
21
21
  formField: string;
22
22
  canSort: boolean;
23
23
  children: ComponentInterface[];
24
- dataType: ComponentInterface["dataType"];
24
+ dataType: ComponentInterface['dataType'];
25
25
  expressCompany: ExpressCompany;
26
26
  expressCode: ExpressCode;
27
27
  constructor(options: PickOption);
@@ -8,28 +8,28 @@ 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 some from "lodash/some";
11
+ import React from 'react';
12
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
13
+ import some from 'lodash/some';
14
14
  import GetFormItem from "../../GetFormItem";
15
15
  import { JstGoodImage } from "../../Common";
16
- import { JstGoods } from "@kmkf-fe-packages/basic-components";
16
+ import { JstGoods } from '@kmkf-fe-packages/basic-components';
17
17
  import ItemView from "../../../commonComponents/ItemView";
18
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
18
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
19
19
  import ExpressCompany from "../common/expressCompany";
20
20
  import ExpressCode from "../common/expressCode";
21
21
  var typeMap = {
22
22
  BS_LOGISTICS: {
23
- key: "bsLogisticsList",
24
- name: "bs",
25
- company: "bsLogisticsCompany",
26
- code: "bsLogisticsCode"
23
+ key: 'bsLogisticsList',
24
+ name: 'bs',
25
+ company: 'bsLogisticsCompany',
26
+ code: 'bsLogisticsCode'
27
27
  },
28
28
  WLN_LOGISTICS: {
29
- key: "wlnLogisticsList",
30
- name: "wln",
31
- company: "wlnLogisticsCompany",
32
- code: "wlnLogisticsCode"
29
+ key: 'wlnLogisticsList',
30
+ name: '万里牛',
31
+ company: 'wlnLogisticsCompany',
32
+ code: 'wlnLogisticsCode'
33
33
  }
34
34
  };
35
35
  var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
@@ -40,9 +40,11 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
40
40
  _typeMap$options$type4,
41
41
  _typeMap$options$type5,
42
42
  _typeMap$options$type6,
43
- _this$componentConfig3,
44
43
  _typeMap$options$type7,
45
- _typeMap$options$type8;
44
+ _typeMap$options$type8,
45
+ _this$componentConfig3,
46
+ _typeMap$options$type9,
47
+ _typeMap$options$type10;
46
48
  _classCallCheck(this, BsLogistics);
47
49
  _defineProperty(this, "name", void 0);
48
50
  _defineProperty(this, "id", void 0);
@@ -129,17 +131,19 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
129
131
  this.isCombinationComponent = true;
130
132
  this.canSort = false;
131
133
  this.expressCompany = new ExpressCompany(_objectSpread(_objectSpread({}, options), {}, {
132
- name: "物流公司",
133
- id: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.key, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.company),
134
+ name: '物流公司',
135
+ parentName: (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.name,
136
+ id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.company),
134
137
  width: 200
135
138
  }));
136
139
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
137
- name: "物流单号",
138
- id: "".concat(options.id, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key, "_").concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.code),
140
+ name: '物流单号',
141
+ parentName: (_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.name,
142
+ id: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.key, "_").concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.code),
139
143
  width: 200
140
144
  }));
141
145
  this.children = [this.expressCompany, this.expressCode];
142
- this.dataType = "object";
146
+ this.dataType = 'object';
143
147
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
144
148
  required: true,
145
149
  validator: function validator(_, value) {
@@ -154,14 +158,14 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(options) {
154
158
  }] : [];
155
159
  this.expressDateInstance = ExpressData.getInstance();
156
160
  this.sortChildField = [{
157
- name: "物流公司",
158
- key: "".concat(options.id, "_").concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.company),
161
+ name: '物流公司',
162
+ key: "".concat(options.id, "_").concat((_typeMap$options$type9 = typeMap[options.type]) === null || _typeMap$options$type9 === void 0 ? void 0 : _typeMap$options$type9.company),
159
163
  options: this.expressDateInstance.getExpressData(),
160
- dataType: "string"
164
+ dataType: 'string'
161
165
  }, {
162
- name: "物流单号",
163
- key: "".concat(options.id, "_").concat((_typeMap$options$type8 = typeMap[options.type]) === null || _typeMap$options$type8 === void 0 ? void 0 : _typeMap$options$type8.code),
164
- dataType: "string"
166
+ name: '物流单号',
167
+ key: "".concat(options.id, "_").concat((_typeMap$options$type10 = typeMap[options.type]) === null || _typeMap$options$type10 === void 0 ? void 0 : _typeMap$options$type10.code),
168
+ dataType: 'string'
165
169
  }];
166
170
  });
167
171
  export default BsLogistics;
@@ -1,19 +1,20 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
3
  declare class ExpressCode implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
9
+ componentConfig: ComponentInterface['componentConfig'];
10
10
  align: ALignType;
11
11
  width: number;
12
12
  isCombinationComponent: boolean;
13
13
  formField: string;
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
- dataType: ComponentInterface["dataType"];
16
+ dataType: ComponentInterface['dataType'];
17
+ parentName: string;
17
18
  constructor(options: PickOption);
18
19
  renderClient: () => null;
19
20
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -11,16 +11,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  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; }
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  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); }
14
- import React from "react";
14
+ import React from 'react';
15
15
  import { BsExpressRender } from "../../Common";
16
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
17
  import { SYMBOL } from "../../../constant";
18
18
  var typeMap = {
19
- BS_SYSTEM_ORDER: {
20
- key: "bsLogisticsItem"
19
+ BS_LOGISTICS: {
20
+ key: 'bsLogisticsItem'
21
21
  },
22
- WLN_SYSTEM_ORDER: {
23
- key: "wlnLogisticsItem"
22
+ WLN_LOGISTICS: {
23
+ key: 'wlnLogisticsItem'
24
24
  }
25
25
  };
26
26
  var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
@@ -40,11 +40,12 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
40
40
  _defineProperty(this, "canSort", void 0);
41
41
  _defineProperty(this, "children", void 0);
42
42
  _defineProperty(this, "dataType", void 0);
43
+ _defineProperty(this, "parentName", void 0);
43
44
  _defineProperty(this, "renderClient", function () {
44
45
  return null;
45
46
  });
46
47
  _defineProperty(this, "renderPc", function (value, record) {
47
- var _this$id$split = _this.id.split("_"),
48
+ var _this$id$split = _this.id.split('_'),
48
49
  _this$id$split2 = _slicedToArray(_this$id$split, 3),
49
50
  key = _this$id$split2[0],
50
51
  parentKey = _this$id$split2[1],
@@ -54,7 +55,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
54
55
  }
55
56
  return /*#__PURE__*/React.createElement(BsExpressRender, {
56
57
  list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
57
- showField: "code"
58
+ showField: 'code'
58
59
  });
59
60
  });
60
61
  _defineProperty(this, "renderLog", function (r) {
@@ -66,7 +67,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
66
67
  });
67
68
  _defineProperty(this, "renderExport", function (value, record) {
68
69
  var _record;
69
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
70
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
70
71
  });
71
72
  _defineProperty(this, "editRender", function () {
72
73
  return null;
@@ -77,11 +78,11 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
77
78
  searchDefaultConditions: SYMBOL.like,
78
79
  type: item.type,
79
80
  id: "".concat(item.id, "_").concat(subKey),
80
- name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
81
- filterComponentType: "Input",
81
+ name: "".concat(_this.parentName, "\u7269\u6D41\u5355\u53F7"),
82
+ filterComponentType: 'Input',
82
83
  filterFn: function filterFn(value) {
83
84
  return function (i) {
84
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
85
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCode'), value);
85
86
  };
86
87
  }
87
88
  };
@@ -97,14 +98,15 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
97
98
  if (/^[0-9a-zA-Z]*$/.test(value)) {
98
99
  return Promise.resolve();
99
100
  }
100
- return Promise.reject(new Error("只能输入数字和字母"));
101
+ return Promise.reject(new Error('只能输入数字和字母'));
101
102
  }
102
103
  }] : [];
103
- this.align = "left";
104
+ this.align = 'left';
104
105
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
105
106
  this.isCombinationComponent = false;
106
107
  this.canSort = false;
107
- this.dataType = "string";
108
+ this.dataType = 'string';
108
109
  this.children = [];
110
+ this.parentName = options === null || options === void 0 ? void 0 : options.parentName;
109
111
  });
110
112
  export default ExpressCode;
@@ -1,13 +1,13 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
- import React from "react";
3
- import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
4
  declare class Express implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
11
  align: ALignType;
12
12
  expressDateInstance: InstanceType<typeof ExpressData>;
13
13
  width: number;
@@ -15,8 +15,8 @@ declare class Express implements ComponentInterface {
15
15
  formField: string;
16
16
  canSort: boolean;
17
17
  children: ComponentInterface[];
18
- dataType: ComponentInterface["dataType"];
19
- options: ComponentInterface["options"];
18
+ dataType: ComponentInterface['dataType'];
19
+ options: ComponentInterface['options'];
20
20
  constructor(options: PickOption);
21
21
  renderClient: () => null;
22
22
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -11,17 +11,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  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; }
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  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); }
14
- import React from "react";
15
- import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
14
+ import React from 'react';
15
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import { BsExpressRender } from "../../Common";
17
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
18
18
  import { SYMBOL } from "../../../constant";
19
19
  var typeMap = {
20
- BS_SYSTEM_ORDER: {
21
- key: "bsLogisticsItem"
20
+ BS_LOGISTICS: {
21
+ key: 'bsLogisticsItem'
22
22
  },
23
- WLN_SYSTEM_ORDER: {
24
- key: "wlnLogisticsItem"
23
+ WLN_LOGISTICS: {
24
+ key: 'wlnLogisticsItem'
25
25
  }
26
26
  };
27
27
  var Express = /*#__PURE__*/_createClass(function Express(options) {
@@ -46,17 +46,19 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
46
46
  return null;
47
47
  });
48
48
  _defineProperty(this, "renderPc", function (value, record) {
49
- var _this$id$split = _this.id.split("_"),
49
+ var _typeMap$_this$type, _typeMap$_this$type2;
50
+ console.log(_this.type);
51
+ var _this$id$split = _this.id.split('_'),
50
52
  _this$id$split2 = _slicedToArray(_this$id$split, 3),
51
53
  key = _this$id$split2[0],
52
54
  parentKey = _this$id$split2[1],
53
55
  childKey = _this$id$split2[2];
54
- if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)])) {
56
+ if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)])) {
55
57
  return /*#__PURE__*/React.createElement("span", null, "--");
56
58
  }
57
59
  return /*#__PURE__*/React.createElement(BsExpressRender, {
58
- list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
59
- showField: "company"
60
+ list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)],
61
+ showField: 'company'
60
62
  });
61
63
  });
62
64
  _defineProperty(this, "renderLog", function (r) {
@@ -67,7 +69,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
67
69
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
68
70
  });
69
71
  _defineProperty(this, "renderExport", function (value, record) {
70
- return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || "--";
72
+ return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || '--';
71
73
  });
72
74
  _defineProperty(this, "editRender", function () {
73
75
  return null;
@@ -79,14 +81,14 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
79
81
  type: item.type,
80
82
  id: "".concat(item.id, "_").concat(subKey),
81
83
  name: "".concat(_this.name),
82
- filterComponentType: "MultipleSelect",
84
+ filterComponentType: 'MultipleSelect',
83
85
  props: {
84
86
  options: _this.expressDateInstance.getExpressData() || []
85
87
  },
86
88
  filterFn: function filterFn(value) {
87
89
  return function (i) {
88
90
  var _ref;
89
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
91
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCompany').split(',') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
90
92
  var _String;
91
93
  var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
92
94
  return logisticsCompany;
@@ -102,13 +104,13 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
102
104
  this.type = options.type;
103
105
  this.componentConfig = options.componentConfig;
104
106
  this.rules = [];
105
- this.align = "left";
107
+ this.align = 'left';
106
108
  this.expressDateInstance = ExpressData.getInstance();
107
109
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
108
110
  this.isCombinationComponent = false;
109
111
  this.canSort = false;
110
112
  this.children = [];
111
- this.dataType = "string";
113
+ this.dataType = 'string';
112
114
  this.options = this.expressDateInstance.getExpressData() || [];
113
115
  });
114
116
  export default Express;
@@ -286,7 +286,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
286
286
  style: {
287
287
  color: color
288
288
  }
289
- }, (item === null || item === void 0 ? void 0 : item[valueKey]) || "")), item.reason && /*#__PURE__*/React.createElement("div", {
289
+ }, (item === null || item === void 0 ? void 0 : item[valueKey]) || "")), item.reason && (item === null || item === void 0 ? void 0 : item[valueKey]) !== "成功" && /*#__PURE__*/React.createElement("div", {
290
290
  className: "c-red"
291
291
  }, item.reason));
292
292
  }) : null;
@@ -32,6 +32,7 @@ var typeMap = {
32
32
  name: "退货状态",
33
33
  type: 1,
34
34
  valueKey: "status",
35
+ idKey: "systemOrderId",
35
36
  failValue: "失败"
36
37
  }
37
38
  };
@@ -98,12 +99,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
98
99
  var _typeMap$_this$type10;
99
100
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
100
101
  return (list || []).map(function (item) {
101
- var _typeMap$_this$type11;
102
- return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.valueKey];
102
+ var _typeMap$_this$type11, _typeMap$_this$type12;
103
+ return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.idKey], ":").concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey]);
103
104
  }).join(",");
104
105
  });
105
106
  _defineProperty(this, "editRender", function (p) {
106
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type12;
107
+ var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type13;
107
108
  return /*#__PURE__*/React.createElement(GetFormItem, {
108
109
  title: _this.name,
109
110
  name: _this.id,
@@ -111,23 +112,23 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
111
112
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
112
113
  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,
113
114
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
114
- type: (_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.type,
115
+ type: (_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.type,
115
116
  failValue: typeMap[_this.type].failValue
116
117
  }))
117
118
  });
118
119
  });
119
120
  _defineProperty(this, "filterConfig", function (item) {
120
- var _typeMap$_this$type13;
121
+ var _typeMap$_this$type14;
121
122
  return {
122
123
  searchDefaultConditions: SYMBOL.like,
123
124
  type: item.type,
124
- id: "".concat(item.id, "_").concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.code),
125
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.code),
125
126
  name: "".concat(_this.name),
126
127
  filterComponentType: "Input",
127
128
  filterFn: function filterFn(value) {
128
129
  return function (i) {
129
- var _typeMap$_this$type14;
130
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.code), value);
130
+ var _typeMap$_this$type15;
131
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.code), value);
131
132
  };
132
133
  }
133
134
  };
@@ -148,12 +149,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
148
149
  required: true,
149
150
  validator: function validator(_, value) {
150
151
  var hasNo = (value || []).some(function (item) {
151
- var _typeMap$_this$type15;
152
- return item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey];
152
+ var _typeMap$_this$type16;
153
+ return item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey];
153
154
  });
154
155
  if (!hasNo) {
155
- var _typeMap$_this$type16;
156
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.name)));
156
+ var _typeMap$_this$type17;
157
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.name)));
157
158
  }
158
159
  return Promise.resolve();
159
160
  }
@@ -1,5 +1,5 @@
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
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ 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); }
3
3
  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); } }
4
4
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -64,7 +64,8 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
64
64
  _defineProperty(this, "dataType", void 0);
65
65
  _defineProperty(this, "renderClient", function (record) {
66
66
  var _typeMap$_this$type, _typeMap$_this$type2;
67
- console.log('record', record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)]);
67
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)];
68
+ console.log('renderClient', record, list, _typeof(list));
68
69
  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) {
69
70
  return !isNull(item);
70
71
  }) : false;
@@ -80,7 +81,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
80
81
  _defineProperty(this, "renderPc", function (value, record) {
81
82
  var _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5;
82
83
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.key)];
83
- console.log('renderPc', typeMap, list);
84
+ console.log('renderPc', record, list, _typeof(list));
84
85
  //兼容多个商品
85
86
  return /*#__PURE__*/React.createElement("span", {
86
87
  onClick: function onClick(e) {
@@ -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, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsSystemOrder | 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 | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowMarkSelect | FlowStatusSelect | FlowWorkOrderId | BasicGrade | Handler | HandlerDeadLine | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsTrajectory | BasicMultSelect | NodeDeadLine | NodeStayDuration | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | StatusSelect | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WlnGoods | WorkOrderId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.11.0-alpha.2",
3
+ "version": "0.11.0-alpha.4",
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.11.0-alpha.2",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.2"
29
+ "@kmkf-fe-packages/basic-components": "^0.11.0-alpha.4",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.4"
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": "4082b35353767d77e58b4e29caed4360b03a7d86"
43
+ "gitHead": "f47c64608f4b48735f0f36da337f51c9f2d6a4d3"
44
44
  }