@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
@@ -49,14 +49,14 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
49
49
  _defineProperty(this, "children", void 0);
50
50
  _defineProperty(this, "dataType", void 0);
51
51
  _defineProperty(this, "format", void 0);
52
- _defineProperty(this, "getValue", function (value) {
52
+ _defineProperty(this, "getValues", function (value) {
53
53
  return Array.isArray(value) ? value.join('~') : value;
54
54
  });
55
55
  _defineProperty(this, "renderClient", function (record) {
56
56
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
57
57
  id: _this.id,
58
58
  label: _this.name,
59
- value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
59
+ value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
60
60
  }) : null;
61
61
  });
62
62
  _defineProperty(this, "renderPc", function (value, record) {
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { ComponentInterface, ColumnConfig, Record, PickOption } from "../../type";
3
+ declare class FlowCreator implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ effects: ComponentInterface["effects"];
10
+ isCombinationComponent: boolean;
11
+ formField: string;
12
+ canSort: boolean;
13
+ children: ComponentInterface[];
14
+ dataType: ComponentInterface["dataType"];
15
+ options: ComponentInterface["options"];
16
+ constructor(options: PickOption);
17
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
18
+ renderLog: () => null;
19
+ getComponentValue: (r: Record) => any;
20
+ renderExport: (value: any, record: Record) => any;
21
+ renderClient: () => null;
22
+ editRender: () => null;
23
+ filterConfig: (item: ColumnConfig) => {
24
+ searchDefaultConditions: "in";
25
+ type: string;
26
+ id: string;
27
+ name: string;
28
+ filterComponentType: "MultipleSelect";
29
+ props: {
30
+ options: {
31
+ label: string;
32
+ value: string;
33
+ }[] | undefined;
34
+ };
35
+ formatFilterValue: (val: Array<string>) => (string | undefined)[];
36
+ filterFn: (value: string) => (i: Record) => boolean;
37
+ };
38
+ }
39
+ export default FlowCreator;
@@ -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 FlowCreator = /*#__PURE__*/_createClass(function FlowCreator(options) {
12
+ var _this = this,
13
+ _this$effects3;
14
+ _classCallCheck(this, FlowCreator);
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) || "flowCreator";
77
+ this.type = "FLOW_CREATOR_INPUT";
78
+ this.sortField = "flowCreator";
79
+ this.formField = "flowCreator";
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 FlowCreator;
@@ -0,0 +1,38 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ declare class FlowTag implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ rules: any[];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ constructor(options: PickOption);
17
+ renderPc: (value: any, record: Record) => any;
18
+ renderLog: (r: Record) => any;
19
+ getComponentValue: (r: Record) => any;
20
+ renderExport: (value: any, record: Record) => any;
21
+ renderClient: (record: any) => React.JSX.Element | null;
22
+ editRender: (p: any) => React.JSX.Element;
23
+ filterConfig: (item: ColumnConfig) => {
24
+ searchDefaultConditions: "in";
25
+ type: string;
26
+ id: string;
27
+ name: string;
28
+ filterComponentType: "MultipleSelect";
29
+ props: {
30
+ options: {
31
+ label: string;
32
+ value: string;
33
+ }[];
34
+ };
35
+ filterFn: (value: string[]) => (i: Record) => boolean;
36
+ };
37
+ }
38
+ export default FlowTag;
@@ -0,0 +1,138 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ 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); }
5
+ 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); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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 ItemView from "../../commonComponents/ItemView";
13
+ import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import GetFormItem from "../GetFormItem";
16
+ import { SYMBOL } from "../../constant";
17
+ import reject from "../Common/img/reject.png";
18
+ import reminder from "../Common/img/reminder.png";
19
+ var TAG_MAP = {
20
+ REMINDER: "催单",
21
+ REJECT: "驳回"
22
+ };
23
+ var TAG_ICON_MAP = {
24
+ REMINDER: /*#__PURE__*/React.createElement("img", {
25
+ src: reminder,
26
+ style: {
27
+ width: "16px"
28
+ }
29
+ }),
30
+ REJECT: /*#__PURE__*/React.createElement("img", {
31
+ src: reject,
32
+ style: {
33
+ width: "16px"
34
+ }
35
+ })
36
+ };
37
+ var FlowTag = /*#__PURE__*/_createClass(function FlowTag(options) {
38
+ var _this = this;
39
+ _classCallCheck(this, FlowTag);
40
+ _defineProperty(this, "name", void 0);
41
+ _defineProperty(this, "id", void 0);
42
+ _defineProperty(this, "sortField", void 0);
43
+ _defineProperty(this, "type", void 0);
44
+ _defineProperty(this, "rules", void 0);
45
+ _defineProperty(this, "componentConfig", void 0);
46
+ _defineProperty(this, "effects", void 0);
47
+ _defineProperty(this, "isCombinationComponent", void 0);
48
+ _defineProperty(this, "formField", void 0);
49
+ _defineProperty(this, "canSort", void 0);
50
+ _defineProperty(this, "children", void 0);
51
+ _defineProperty(this, "dataType", void 0);
52
+ _defineProperty(this, "renderPc", function (value, record) {
53
+ var tag = record === null || record === void 0 ? void 0 : record["".concat(_this.id)];
54
+ if (!tag) return null;
55
+ return tag.map(function (t) {
56
+ return TAG_ICON_MAP[t];
57
+ });
58
+ });
59
+ _defineProperty(this, "renderLog", function (r) {
60
+ var tag = r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
61
+ if (!tag) return null;
62
+ return tag.map(function (t) {
63
+ return TAG_ICON_MAP[t];
64
+ });
65
+ });
66
+ _defineProperty(this, "getComponentValue", function (r) {
67
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
68
+ });
69
+ _defineProperty(this, "renderExport", function (value, record) {
70
+ var tag = record !== null && record !== void 0 && record["".concat(_this.id)] ? JSON.parse(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) : [];
71
+ return tag !== null && tag !== void 0 && tag.length ? tag.map(function (t) {
72
+ return TAG_MAP[t];
73
+ }).join(",") : "--";
74
+ });
75
+ _defineProperty(this, "renderClient", function (record) {
76
+ var _record;
77
+ if (!isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
78
+ var tagValue = record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.map(function (t) {
79
+ return TAG_ICON_MAP[t];
80
+ });
81
+ return /*#__PURE__*/React.createElement(ItemView, {
82
+ id: _this.id,
83
+ label: _this.name,
84
+ value: tagValue
85
+ });
86
+ });
87
+ _defineProperty(this, "editRender", function (p) {
88
+ var _this$componentConfig, _this$componentConfig2;
89
+ return /*#__PURE__*/React.createElement(GetFormItem, {
90
+ title: _this.name,
91
+ name: _this.id,
92
+ rules: _this.rules,
93
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
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,
95
+ component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
96
+ placeholder: "\u8BF7\u9009\u62E9".concat(_this.name)
97
+ }))
98
+ });
99
+ });
100
+ _defineProperty(this, "filterConfig", function (item) {
101
+ return {
102
+ searchDefaultConditions: SYMBOL.in,
103
+ type: item.type,
104
+ id: item.id,
105
+ // 过滤组件id
106
+ name: item.name,
107
+ // 过滤组件名称
108
+ filterComponentType: "MultipleSelect",
109
+ props: {
110
+ options: [{
111
+ label: "催单",
112
+ value: "REMINDER"
113
+ }, {
114
+ label: "驳回",
115
+ value: "REJECT"
116
+ }]
117
+ },
118
+ filterFn: function filterFn(value) {
119
+ return function (i) {
120
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
121
+ };
122
+ }
123
+ };
124
+ });
125
+ this.name = "标签";
126
+ this.id = (options === null || options === void 0 ? void 0 : options.id) || "flowTags";
127
+ this.sortField = "flowTags";
128
+ this.formField = "flowTags";
129
+ this.type = "FLOW_TAG";
130
+ this.effects = options.effects;
131
+ this.rules = [];
132
+ this.isCombinationComponent = false;
133
+ this.canSort = false;
134
+ this.children = [];
135
+ this.componentConfig = _objectSpread({}, options.componentConfig);
136
+ this.dataType = "string";
137
+ });
138
+ export default FlowTag;
@@ -9,5 +9,5 @@ declare type GetFormItemProps = {
9
9
  style?: CSSProperties | undefined;
10
10
  [prop: string]: any;
11
11
  };
12
- declare const GetFormItem: ({ rules, required, title, component, name, hidden, style, }: GetFormItemProps) => React.JSX.Element | null;
12
+ declare const GetFormItem: ({ rules, required, title, component, name, hidden, style, validateTrigger }: GetFormItemProps) => React.JSX.Element | null;
13
13
  export default GetFormItem;
@@ -14,7 +14,8 @@ var GetFormItem = function GetFormItem(_ref) {
14
14
  name = _ref.name,
15
15
  _ref$hidden = _ref.hidden,
16
16
  hidden = _ref$hidden === void 0 ? false : _ref$hidden,
17
- style = _ref.style;
17
+ style = _ref.style,
18
+ validateTrigger = _ref.validateTrigger;
18
19
  var newRules = rules;
19
20
  if (required) {
20
21
  newRules = rules.concat({
@@ -33,7 +34,8 @@ var GetFormItem = function GetFormItem(_ref) {
33
34
  name: name,
34
35
  label: title,
35
36
  rules: newRules,
36
- className: "form-item-label--index"
37
+ className: "form-item-label--index",
38
+ validateTrigger: validateTrigger
37
39
  // hidden={hidden}
38
40
  }, component));
39
41
  };
@@ -1,17 +1,19 @@
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 class BasicInput 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
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface["dataType"];
14
+ dataType: ComponentInterface['dataType'];
15
+ templateId?: string;
16
+ workOrderUniqueKey?: string;
15
17
  constructor(options: PickOption);
16
18
  renderPc: (value: any, record: Record) => React.JSX.Element;
17
19
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,4 +1,7 @@
1
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
2
5
  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); }
3
6
  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
7
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -6,12 +9,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
9
  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
10
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
11
  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 { ApaasInput } from "@kmkf-fe-packages/basic-components";
12
+ import React from 'react';
13
+ import { ApaasInput } from '@kmkf-fe-packages/basic-components';
11
14
  import GetFormItem from "../GetFormItem";
12
15
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
17
  import { SYMBOL } from "../../constant";
18
+ import { replaceCheck } from "../../service/api";
15
19
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
16
20
  var _this = this,
17
21
  _options$componentCon;
@@ -27,9 +31,11 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
27
31
  _defineProperty(this, "canSort", void 0);
28
32
  _defineProperty(this, "children", void 0);
29
33
  _defineProperty(this, "dataType", void 0);
34
+ _defineProperty(this, "templateId", void 0);
35
+ _defineProperty(this, "workOrderUniqueKey", void 0);
30
36
  _defineProperty(this, "renderPc", function (value, record) {
31
37
  var _record;
32
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record : "--");
38
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record : '--');
33
39
  });
34
40
  _defineProperty(this, "renderLog", function (r) {
35
41
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_input")])) return null;
@@ -40,7 +46,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
40
46
  });
41
47
  _defineProperty(this, "renderExport", function (value, record) {
42
48
  var _record2;
43
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record2 !== void 0 ? _record2 : "--";
49
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record2 !== void 0 ? _record2 : '--';
44
50
  });
45
51
  _defineProperty(this, "renderClient", function (record) {
46
52
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -56,6 +62,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
56
62
  name: _this.id,
57
63
  rules: _this.rules,
58
64
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
65
+ validateTrigger: ['onBlur', 'onChange'],
59
66
  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,
60
67
  component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
61
68
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
@@ -70,10 +77,10 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
70
77
  // 过滤组件id
71
78
  name: item.name,
72
79
  // 过滤组件名称
73
- filterComponentType: "Input",
80
+ filterComponentType: 'Input',
74
81
  filterFn: function filterFn(value) {
75
82
  return function (i) {
76
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "input")).includes(value);
83
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'input')).includes(value);
77
84
  };
78
85
  }
79
86
  };
@@ -83,7 +90,9 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
83
90
  this.sortField = "".concat(options.id, "_input");
84
91
  this.formField = "".concat(options.id, "_input");
85
92
  this.type = options.type;
93
+ this.templateId = options.templateId;
86
94
  this.componentConfig = options.componentConfig;
95
+ this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
87
96
  this.rules = [{
88
97
  validator: function validator(_, value) {
89
98
  var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
@@ -101,7 +110,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
101
110
  return item.test(value);
102
111
  });
103
112
  if (testList.length && !isTest) {
104
- return Promise.reject(new Error("请填写正确的格式"));
113
+ return Promise.reject(new Error('请填写正确的格式'));
105
114
  }
106
115
  if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && (_this$componentConfig7 = _this$componentConfig6.rulesOptions) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.length) {
107
116
  var _this$componentConfig8;
@@ -126,10 +135,58 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
126
135
  }
127
136
  return Promise.resolve();
128
137
  }
138
+ }, {
139
+ validateTrigger: 'onBlur',
140
+ validator: function () {
141
+ var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
142
+ var _this$componentConfig10;
143
+ var _resultList$, params, _yield$replaceCheck, resultList;
144
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
145
+ while (1) switch (_context.prev = _context.next) {
146
+ case 0:
147
+ if (value) {
148
+ _context.next = 2;
149
+ break;
150
+ }
151
+ return _context.abrupt("return", Promise.resolve());
152
+ case 2:
153
+ if (!((_this$componentConfig10 = _this.componentConfig) !== null && _this$componentConfig10 !== void 0 && _this$componentConfig10.replaceWarn)) {
154
+ _context.next = 10;
155
+ break;
156
+ }
157
+ params = {
158
+ templateId: _this.templateId,
159
+ workOrderUniqueKey: _this.workOrderUniqueKey,
160
+ needCheckComponentList: [{
161
+ componentKey: _this.formField,
162
+ componentValue: String(value)
163
+ }]
164
+ };
165
+ _context.next = 6;
166
+ return replaceCheck(params);
167
+ case 6:
168
+ _yield$replaceCheck = _context.sent;
169
+ resultList = _yield$replaceCheck.data.resultList;
170
+ if (!((resultList === null || resultList === void 0 ? void 0 : (_resultList$ = resultList[0]) === null || _resultList$ === void 0 ? void 0 : _resultList$.repeatCount) > 0)) {
171
+ _context.next = 10;
172
+ break;
173
+ }
174
+ return _context.abrupt("return", Promise.reject(new Error('内容已存在,不能重复提交')));
175
+ case 10:
176
+ case "end":
177
+ return _context.stop();
178
+ }
179
+ }, _callee);
180
+ }));
181
+ function validator(_x, _x2) {
182
+ return _validator.apply(this, arguments);
183
+ }
184
+ return validator;
185
+ }()
129
186
  }];
130
187
  this.isCombinationComponent = false;
131
188
  this.canSort = true;
132
189
  this.children = [];
133
- this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.isNumber ? "number" : "string";
190
+ this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.isNumber ? 'number' : 'string';
134
191
  });
135
192
  export default BasicInput;
@@ -77,7 +77,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
77
77
  detail = _this$getComponentVal.detail,
78
78
  name = _this$getComponentVal.name,
79
79
  mobile = _this$getComponentVal.mobile;
80
- if ([province, detail, name, mobile].every(function (item) {
80
+ if ([province, city, district, detail, name, mobile].every(function (item) {
81
81
  return isNull(item);
82
82
  })) return null;
83
83
  var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ import { ComponentInterface, ColumnConfig, Record, PickOption } from "../../type";
3
+ declare class PrevSubmitter implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ effects: ComponentInterface["effects"];
10
+ isCombinationComponent: boolean;
11
+ formField: string;
12
+ canSort: boolean;
13
+ children: ComponentInterface[];
14
+ dataType: ComponentInterface["dataType"];
15
+ options: ComponentInterface["options"];
16
+ constructor(options: PickOption);
17
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
18
+ renderLog: () => null;
19
+ getComponentValue: (r: Record) => any;
20
+ renderExport: (value: any, record: Record) => any;
21
+ renderClient: () => null;
22
+ editRender: () => null;
23
+ filterConfig: (item: ColumnConfig) => {
24
+ searchDefaultConditions: "in";
25
+ type: string;
26
+ id: string;
27
+ name: string;
28
+ filterComponentType: "MultipleSelect";
29
+ props: {
30
+ options: {
31
+ label: string;
32
+ value: string;
33
+ }[] | undefined;
34
+ };
35
+ formatFilterValue: (val: Array<string>) => (string | undefined)[];
36
+ filterFn: (value: string) => (i: Record) => boolean;
37
+ };
38
+ }
39
+ export default PrevSubmitter;