@kmkf-fe-packages/services-components 0.13.0-beta.9 → 0.13.0

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.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/commonComponents/OperationLog/index.d.ts +0 -1
  3. package/dist/esm/commonComponents/OperationLog/index.js +19 -13
  4. package/dist/esm/components/Address/index.d.ts +6 -6
  5. package/dist/esm/components/Address/index.js +32 -26
  6. package/dist/esm/components/BS/BsExchange/index.d.ts +5 -1
  7. package/dist/esm/components/BS/BsExchange/index.js +10 -6
  8. package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +29 -0
  9. package/dist/esm/components/BS/BsPosting/components/City/index.js +76 -0
  10. package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +27 -0
  11. package/dist/esm/components/BS/BsPosting/components/Detail/index.js +70 -0
  12. package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +29 -0
  13. package/dist/esm/components/BS/BsPosting/components/District/index.js +76 -0
  14. package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +29 -0
  15. package/dist/esm/components/BS/BsPosting/components/Province/index.js +76 -0
  16. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +27 -0
  17. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +70 -0
  18. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +27 -0
  19. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +70 -0
  20. package/dist/esm/components/BS/BsPosting/index.d.ts +43 -0
  21. package/dist/esm/components/BS/BsPosting/index.js +106 -0
  22. package/dist/esm/components/BS/BsReissue/index.d.ts +4 -1
  23. package/dist/esm/components/BS/BsReissue/index.js +7 -4
  24. package/dist/esm/components/BS/BsReturn/index.js +3 -3
  25. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +5 -5
  26. package/dist/esm/components/BS/BsSystemOrder/index.js +21 -16
  27. package/dist/esm/components/Cascader/index.d.ts +6 -4
  28. package/dist/esm/components/Cascader/index.js +18 -14
  29. package/dist/esm/components/Checkbox/index.d.ts +1 -1
  30. package/dist/esm/components/Checkbox/index.js +2 -2
  31. package/dist/esm/components/Common/img/reject.png +0 -0
  32. package/dist/esm/components/Common/img/reminder.png +0 -0
  33. package/dist/esm/components/Common/index.d.ts +1 -1
  34. package/dist/esm/components/Common/index.js +142 -137
  35. package/dist/esm/components/CommonDataTime/index.d.ts +1 -1
  36. package/dist/esm/components/CommonDataTime/index.js +2 -2
  37. package/dist/esm/components/DataTime/index.d.ts +1 -1
  38. package/dist/esm/components/DataTime/index.js +2 -2
  39. package/dist/esm/components/FlowCreator/index.d.ts +39 -0
  40. package/dist/esm/components/FlowCreator/index.js +87 -0
  41. package/dist/esm/components/FlowTag/index.d.ts +38 -0
  42. package/dist/esm/components/FlowTag/index.js +138 -0
  43. package/dist/esm/components/GetFormItem/index.d.ts +1 -1
  44. package/dist/esm/components/GetFormItem/index.js +4 -2
  45. package/dist/esm/components/Input/index.d.ts +6 -4
  46. package/dist/esm/components/Input/index.js +66 -9
  47. package/dist/esm/components/PostIng/index.js +1 -1
  48. package/dist/esm/components/PrevSubmitter/index.d.ts +39 -0
  49. package/dist/esm/components/PrevSubmitter/index.js +87 -0
  50. package/dist/esm/components/Radio/index.d.ts +5 -5
  51. package/dist/esm/components/Radio/index.js +13 -13
  52. package/dist/esm/components/ReceiverAddress/index.d.ts +5 -5
  53. package/dist/esm/components/ReceiverAddress/index.js +27 -19
  54. package/dist/esm/components/Remark/index.d.ts +3 -3
  55. package/dist/esm/components/Remark/index.js +24 -17
  56. package/dist/esm/components/Submitter/index.js +1 -1
  57. package/dist/esm/factory.d.ts +3 -3
  58. package/dist/esm/factory.js +101 -95
  59. package/dist/esm/index.d.ts +4 -0
  60. package/dist/esm/index.js +4 -0
  61. package/dist/esm/service/api.d.ts +1 -0
  62. package/dist/esm/service/api.js +9 -0
  63. package/dist/esm/service/request.d.ts +17 -0
  64. package/dist/esm/service/request.js +56 -0
  65. package/dist/esm/type.d.ts +16 -14
  66. package/package.json +4 -4
@@ -0,0 +1,87 @@
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 { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { SYMBOL } from "../../constant";
11
+ var PrevSubmitter = /*#__PURE__*/_createClass(function PrevSubmitter(options) {
12
+ var _this = this,
13
+ _this$effects3;
14
+ _classCallCheck(this, PrevSubmitter);
15
+ _defineProperty(this, "name", void 0);
16
+ _defineProperty(this, "id", void 0);
17
+ _defineProperty(this, "sortField", void 0);
18
+ _defineProperty(this, "type", void 0);
19
+ _defineProperty(this, "componentConfig", void 0);
20
+ _defineProperty(this, "effects", void 0);
21
+ _defineProperty(this, "isCombinationComponent", void 0);
22
+ _defineProperty(this, "formField", void 0);
23
+ _defineProperty(this, "canSort", void 0);
24
+ _defineProperty(this, "children", void 0);
25
+ _defineProperty(this, "dataType", void 0);
26
+ _defineProperty(this, "options", void 0);
27
+ _defineProperty(this, "renderPc", function (value, record) {
28
+ var _record;
29
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--");
30
+ });
31
+ _defineProperty(this, "renderLog", function () {
32
+ return null;
33
+ });
34
+ _defineProperty(this, "getComponentValue", function (r) {
35
+ return r === null || r === void 0 ? void 0 : r[_this.id];
36
+ });
37
+ _defineProperty(this, "renderExport", function (value, record) {
38
+ var _record2;
39
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : "--";
40
+ });
41
+ _defineProperty(this, "renderClient", function () {
42
+ return null;
43
+ });
44
+ _defineProperty(this, "editRender", function () {
45
+ return null;
46
+ });
47
+ _defineProperty(this, "filterConfig", function (item) {
48
+ var _this$effects;
49
+ return {
50
+ searchDefaultConditions: SYMBOL.in,
51
+ type: item.type,
52
+ id: item.id,
53
+ // 过滤组件id
54
+ name: item.name,
55
+ // 过滤组件名称
56
+ filterComponentType: "MultipleSelect",
57
+ props: {
58
+ options: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.userList
59
+ },
60
+ formatFilterValue: function formatFilterValue(val) {
61
+ return val === null || val === void 0 ? void 0 : val.map(function (v) {
62
+ var _this$effects2, _this$effects2$userLi, _this$effects2$userLi2;
63
+ return (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : (_this$effects2$userLi = _this$effects2.userList) === null || _this$effects2$userLi === void 0 ? void 0 : (_this$effects2$userLi2 = _this$effects2$userLi.find(function (u) {
64
+ return u.value === v;
65
+ })) === null || _this$effects2$userLi2 === void 0 ? void 0 : _this$effects2$userLi2.label;
66
+ });
67
+ },
68
+ filterFn: function filterFn(value) {
69
+ return function (i) {
70
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
71
+ };
72
+ }
73
+ };
74
+ });
75
+ this.name = options.name || "流程创建人";
76
+ this.id = (options === null || options === void 0 ? void 0 : options.id) || "prevSubmitter";
77
+ this.type = "PREV_SUBMITTER_INPUT";
78
+ this.sortField = "prevSubmitter";
79
+ this.formField = "prevSubmitter";
80
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
81
+ this.isCombinationComponent = false;
82
+ this.canSort = true;
83
+ this.children = [];
84
+ this.dataType = "string";
85
+ this.options = ((_this$effects3 = this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.userList) || [];
86
+ });
87
+ export default PrevSubmitter;
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare type Value = {
4
4
  value?: string;
5
5
  other?: string;
@@ -10,13 +10,13 @@ declare class BasicRadio implements ComponentInterface {
10
10
  sortField: string;
11
11
  type: string;
12
12
  rules: any[];
13
- componentConfig: ComponentInterface['componentConfig'];
13
+ componentConfig: ComponentInterface["componentConfig"];
14
14
  isCombinationComponent: boolean;
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
  render: (value: Value) => React.JSX.Element;
22
22
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -6,15 +6,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  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; }
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
- import React from 'react';
10
- import { ApaasRadio } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import { ApaasRadio } from "@kmkf-fe-packages/basic-components";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
- import get from 'lodash/get';
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
+ import get from "lodash/get";
15
15
  import { SYMBOL } from "../../constant";
16
16
  var typeMap = {
17
- RADIO: 'radio'
17
+ RADIO: "radio"
18
18
  };
19
19
  var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
20
20
  var _this = this,
@@ -35,7 +35,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
35
35
  _defineProperty(this, "options", void 0);
36
36
  _defineProperty(this, "render", function (value) {
37
37
  var _value$value;
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, ")"));
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, ")"));
39
39
  });
40
40
  _defineProperty(this, "renderPc", function (value, record) {
41
41
  var type = _this.type;
@@ -59,12 +59,12 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
59
59
  _defineProperty(this, "renderExport", function (value, record) {
60
60
  var type = _this.type;
61
61
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) === undefined) {
62
- return '--';
62
+ return "--";
63
63
  }
64
- return "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])], " ").concat(get(record, "".concat(_this.id, "_").concat(typeMap[type], "Other"), ''));
64
+ return "".concat(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])], " ").concat(get(record, "".concat(_this.id, "_").concat(typeMap[type], "Other"), ""));
65
65
  });
66
66
  _defineProperty(this, "getKeyByComponentType", function (type) {
67
- return typeMap[type] || '';
67
+ return typeMap[type] || "";
68
68
  });
69
69
  _defineProperty(this, "renderClient", function (record) {
70
70
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -96,11 +96,11 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
96
96
  // 过滤组件id
97
97
  name: item.name,
98
98
  // 过滤组件名称
99
- filterComponentType: 'MultipleSelect',
99
+ filterComponentType: "MultipleSelect",
100
100
  props: {
101
101
  options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
102
- label: '其他',
103
- value: '其他'
102
+ label: "其他",
103
+ value: "其他"
104
104
  }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || []
105
105
  },
106
106
  filterFn: function filterFn(value) {
@@ -130,7 +130,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
130
130
  return Promise.resolve();
131
131
  }
132
132
  }] : [];
133
- this.dataType = 'string';
133
+ this.dataType = "string";
134
134
  this.options = ((_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.options) || [];
135
135
  });
136
136
  export default BasicRadio;
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, Record } from '../../type';
2
- import React from 'react';
3
- import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
1
+ import { ComponentInterface, PickOption, Record } from "../../type";
2
+ import React from "react";
3
+ import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
4
4
  declare type Value = {
5
5
  address?: (string | number)[];
6
6
  detail?: string;
@@ -18,12 +18,12 @@ declare class BasicInput implements ComponentInterface {
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
20
  addressDateInstance: InstanceType<typeof AddressData>;
21
- dataType: ComponentInterface['dataType'];
21
+ dataType: ComponentInterface["dataType"];
22
22
  constructor(options: PickOption);
23
23
  render: (value: Value) => React.JSX.Element;
24
24
  transTextToNumber: (value?: string) => string | number | undefined;
25
25
  renderPc: (value: any, record: Record) => React.JSX.Element;
26
- renderLog: (r: Record) => React.JSX.Element | null;
26
+ renderLog: (r: Record) => string;
27
27
  getComponentValue: (r: Record) => {
28
28
  address: any[];
29
29
  detail: any;
@@ -5,13 +5,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
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
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import React from 'react';
9
- import { Address } from '@kmkf-fe-packages/basic-components';
10
- import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
8
+ import React from "react";
9
+ import { Address } from "@kmkf-fe-packages/basic-components";
10
+ import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
- import every from 'lodash/every';
13
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
+ import every from "lodash/every";
15
15
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
16
16
  var _this = this,
17
17
  _this$componentConfig3;
@@ -35,7 +35,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
35
35
  className: "pointer"
36
36
  }, value === null || value === void 0 ? void 0 : (_value$address = value.address) === null || _value$address === void 0 ? void 0 : _value$address.map(function (suffix) {
37
37
  return _this.addressDateInstance.getNameByCode(suffix);
38
- }).join(''), value === null || value === void 0 ? void 0 : value.detail);
38
+ }).join(""), value === null || value === void 0 ? void 0 : value.detail);
39
39
  });
40
40
  _defineProperty(this, "transTextToNumber", function (value) {
41
41
  return value ? +value : value;
@@ -54,17 +54,25 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
54
54
  className: "pointer",
55
55
  onClick: function onClick(e) {
56
56
  var _this$effects, _this$effects2;
57
- typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
57
+ typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
58
58
  e.stopPropagation();
59
59
  }
60
60
  }, (_address = address) === null || _address === void 0 ? void 0 : _address.map(function () {
61
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
61
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
62
62
  return _this.addressDateInstance.getNameByCode(suffix);
63
- }).join(''), detail);
63
+ }).join(""), detail);
64
64
  });
65
65
  _defineProperty(this, "renderLog", function (r) {
66
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_province")])) return null;
67
- return _this.renderPc(undefined, r);
66
+ var _address2;
67
+ var address = [_this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_province")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_city")]), _this.transTextToNumber(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_district")])];
68
+ address = every(address, function (item) {
69
+ return !item;
70
+ }) ? [] : address;
71
+ var detail = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_address")];
72
+ return "".concat((_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
73
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
74
+ return _this.addressDateInstance.getNameByCode(suffix);
75
+ }).join(""), " ").concat(detail || "");
68
76
  });
69
77
  _defineProperty(this, "getComponentValue", function (r) {
70
78
  return {
@@ -73,19 +81,19 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
73
81
  };
74
82
  });
75
83
  _defineProperty(this, "renderExport", function (value, record) {
76
- var _address2;
84
+ var _address3;
77
85
  if (record["".concat(_this.id, "_province")] === undefined) {
78
- return '--';
86
+ return "--";
79
87
  }
80
88
  var address = [_this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_province")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_city")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_district")])];
81
89
  address = every(address, function (item) {
82
90
  return !item;
83
91
  }) ? [] : address;
84
92
  var detail = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_address")];
85
- return "".concat((_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
86
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
93
+ return "".concat((_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.map(function () {
94
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
87
95
  return _this.addressDateInstance.getNameByCode(suffix);
88
- }).join(''), " ").concat(detail || '');
96
+ }).join(""), " ").concat(detail || "");
89
97
  });
90
98
  _defineProperty(this, "renderClient", function (record) {
91
99
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -121,16 +129,16 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
121
129
  validator: function validator(_, value) {
122
130
  var _value$address2;
123
131
  if (!(value !== null && value !== void 0 && (_value$address2 = value.address) !== null && _value$address2 !== void 0 && _value$address2.length)) {
124
- return Promise.reject(new Error('请选择地址'));
132
+ return Promise.reject(new Error("请选择地址"));
125
133
  }
126
134
  if (!(value !== null && value !== void 0 && value.detail)) {
127
- return Promise.reject(new Error('请填写详细地址'));
135
+ return Promise.reject(new Error("请填写详细地址"));
128
136
  }
129
137
  return Promise.resolve();
130
138
  }
131
139
  }] : [];
132
140
  this.effects = options.effects;
133
141
  this.addressDateInstance = AddressData.getInstance();
134
- this.dataType = 'object';
142
+ this.dataType = "object";
135
143
  });
136
144
  export default BasicInput;
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare type Value = {
4
4
  flag?: number | string;
5
5
  remark?: string;
@@ -17,7 +17,7 @@ declare class ERemark implements ComponentInterface {
17
17
  formField: string;
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
- dataType: ComponentInterface['dataType'];
20
+ dataType: ComponentInterface["dataType"];
21
21
  constructor(options: PickOption);
22
22
  render: (value: Value) => React.JSX.Element;
23
23
  renderClient: (record: Record) => React.JSX.Element | null;
@@ -5,8 +5,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
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
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- import React from 'react';
9
- import { Remark } from '@kmkf-fe-packages/basic-components';
8
+ import React from "react";
9
+ import { Remark } from "@kmkf-fe-packages/basic-components";
10
10
  import GetFormItem from "../GetFormItem";
11
11
  import trade0 from "./flag/trade-icon-flag-0.png";
12
12
  import trade1 from "./flag/trade-icon-flag-1.png";
@@ -14,9 +14,9 @@ import trade2 from "./flag/trade-icon-flag-2.png";
14
14
  import trade3 from "./flag/trade-icon-flag-3.png";
15
15
  import trade4 from "./flag/trade-icon-flag-4.png";
16
16
  import trade5 from "./flag/trade-icon-flag-5.png";
17
- import get from 'lodash/get';
17
+ import get from "lodash/get";
18
18
  import ItemView from "../../commonComponents/ItemView";
19
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
19
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
20
20
  import { SYMBOL } from "../../constant";
21
21
  var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
22
22
  var _this = this,
@@ -36,14 +36,14 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
36
36
  _defineProperty(this, "children", void 0);
37
37
  _defineProperty(this, "dataType", void 0);
38
38
  _defineProperty(this, "render", function (value) {
39
- var index = get(value, 'flag');
39
+ var index = get(value, "flag");
40
40
  return /*#__PURE__*/React.createElement("div", {
41
41
  style: {
42
- display: 'inline-block'
42
+ display: "inline-block"
43
43
  }
44
44
  }, index !== undefined && /*#__PURE__*/React.createElement("img", {
45
45
  src: _this.imgList[Number(index)]
46
- }), /*#__PURE__*/React.createElement("span", null, get(value, 'remark')));
46
+ }), /*#__PURE__*/React.createElement("span", null, get(value, "remark")));
47
47
  });
48
48
  _defineProperty(this, "renderClient", function (record) {
49
49
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -56,13 +56,20 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
56
56
  if (get(record, "".concat(_this.id, "_flag")) === undefined && get(record, "".concat(_this.id, "_remark")) === undefined) {
57
57
  return /*#__PURE__*/React.createElement("span", null, "--");
58
58
  }
59
+ var index = get(record, "".concat(_this.id, "_flag"));
59
60
  return /*#__PURE__*/React.createElement("div", {
60
61
  style: {
61
- display: 'inline-block'
62
+ display: "inline-block"
62
63
  }
63
- }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? /*#__PURE__*/React.createElement("i", {
64
- className: "dz-iconfont dz-beizhu_qizhi f-lt ft_12 mr_5 ".concat(_this.flagColors[Number(get(record, "".concat(_this.id, "_flag")))])
65
- }) : null, /*#__PURE__*/React.createElement("span", null, get(record, "".concat(_this.id, "_remark"))));
64
+ }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? index !== undefined && /*#__PURE__*/React.createElement("img", {
65
+ src: _this.imgList[Number(index)]
66
+ }) :
67
+ // <i
68
+ // className={`dz-iconfont dz-beizhu_qizhi f-lt ft_12 mr_5 ${
69
+ // this.flagColors[Number(get(record, `${this.id}_flag`))]
70
+ // }`}
71
+ // />
72
+ null, /*#__PURE__*/React.createElement("span", null, get(record, "".concat(_this.id, "_remark"))));
66
73
  });
67
74
  _defineProperty(this, "renderLog", function (r) {
68
75
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_flag")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_remark")])) return null;
@@ -96,10 +103,10 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
96
103
  // 过滤组件id
97
104
  name: item.name,
98
105
  // 过滤组件名称
99
- filterComponentType: 'Input',
106
+ filterComponentType: "Input",
100
107
  filterFn: function filterFn(value) {
101
108
  return function (i) {
102
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'remark')).includes(value);
109
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "remark")).includes(value);
103
110
  };
104
111
  }
105
112
  };
@@ -110,21 +117,21 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
110
117
  this.formField = "".concat(options.id, "_remark");
111
118
  this.type = options.type;
112
119
  this.componentConfig = options.componentConfig;
113
- this.dataType = 'object';
120
+ this.dataType = "object";
114
121
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
115
122
  validator: function validator(_, value) {
116
123
  var _this$componentConfig4;
117
124
  if (!(value !== null && value !== void 0 && value.remark)) {
118
- return Promise.reject(new Error('请输入备注'));
125
+ return Promise.reject(new Error("请输入备注"));
119
126
  }
120
127
  if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
121
- return Promise.reject(new Error('请选择旗帜'));
128
+ return Promise.reject(new Error("请选择旗帜"));
122
129
  }
123
130
  return Promise.resolve();
124
131
  }
125
132
  }] : [];
126
133
  this.imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
127
- this.flagColors = ['gray', 'red', 'yellow', 'green', 'blue', 'purple'];
134
+ this.flagColors = ["gray", "red", "yellow", "green", "blue", "purple"];
128
135
  this.isCombinationComponent = false;
129
136
  this.canSort = true;
130
137
  this.children = [];
@@ -72,7 +72,7 @@ var Submitter = /*#__PURE__*/_createClass(function Submitter(options) {
72
72
  }
73
73
  };
74
74
  });
75
- this.name = "提交人";
75
+ this.name = options.name || "提交人";
76
76
  this.id = (options === null || options === void 0 ? void 0 : options.id) || "submitter";
77
77
  this.type = "OPERATOR_INPUT";
78
78
  this.sortField = "submitter";
@@ -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, 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
- import { PickOption } from './type';
3
- export declare const factory: (type: string, options: PickOption) => BsExchange | BsReissue | BsSystemOrder | CommonMultiStatus | ERemark | 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 | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
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, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
2
+ import { PickOption } from "./type";
3
+ export declare const factory: (type: string, options: PickOption) => BsPosting | CommonMultiStatus | FlowTag | BasicPosting | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | 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 | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;