@kmkf-fe-packages/services-components 0.13.0-beta.8 → 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 (67) 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/CommonMultiStatus/index.js +1 -1
  38. package/dist/esm/components/DataTime/index.d.ts +1 -1
  39. package/dist/esm/components/DataTime/index.js +2 -2
  40. package/dist/esm/components/FlowCreator/index.d.ts +39 -0
  41. package/dist/esm/components/FlowCreator/index.js +87 -0
  42. package/dist/esm/components/FlowTag/index.d.ts +38 -0
  43. package/dist/esm/components/FlowTag/index.js +138 -0
  44. package/dist/esm/components/GetFormItem/index.d.ts +1 -1
  45. package/dist/esm/components/GetFormItem/index.js +4 -2
  46. package/dist/esm/components/Input/index.d.ts +6 -4
  47. package/dist/esm/components/Input/index.js +66 -9
  48. package/dist/esm/components/PostIng/index.js +1 -1
  49. package/dist/esm/components/PrevSubmitter/index.d.ts +39 -0
  50. package/dist/esm/components/PrevSubmitter/index.js +87 -0
  51. package/dist/esm/components/Radio/index.d.ts +5 -5
  52. package/dist/esm/components/Radio/index.js +13 -13
  53. package/dist/esm/components/ReceiverAddress/index.d.ts +5 -5
  54. package/dist/esm/components/ReceiverAddress/index.js +27 -19
  55. package/dist/esm/components/Remark/index.d.ts +3 -3
  56. package/dist/esm/components/Remark/index.js +24 -17
  57. package/dist/esm/components/Submitter/index.js +1 -1
  58. package/dist/esm/factory.d.ts +3 -3
  59. package/dist/esm/factory.js +101 -95
  60. package/dist/esm/index.d.ts +4 -0
  61. package/dist/esm/index.js +4 -0
  62. package/dist/esm/service/api.d.ts +1 -0
  63. package/dist/esm/service/api.js +9 -0
  64. package/dist/esm/service/request.d.ts +17 -0
  65. package/dist/esm/service/request.js +56 -0
  66. package/dist/esm/type.d.ts +16 -14
  67. package/package.json +4 -4
@@ -0,0 +1,76 @@
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 { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
+ import ItemView from "../../../../../commonComponents/ItemView";
12
+ var Province = /*#__PURE__*/_createClass(function Province(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, Province);
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, "rules", void 0);
20
+ _defineProperty(this, "componentConfig", void 0);
21
+ _defineProperty(this, "effects", void 0);
22
+ _defineProperty(this, "align", void 0);
23
+ _defineProperty(this, "width", void 0);
24
+ _defineProperty(this, "isCombinationComponent", void 0);
25
+ _defineProperty(this, "formField", void 0);
26
+ _defineProperty(this, "canSort", void 0);
27
+ _defineProperty(this, "children", void 0);
28
+ _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "addressDateInstance", void 0);
30
+ _defineProperty(this, "renderClient", function (record) {
31
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
32
+ id: _this.id,
33
+ label: _this.name,
34
+ value: _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id])
35
+ }) : null;
36
+ });
37
+ _defineProperty(this, "renderPc", function (value, record) {
38
+ if (Reflect.has(record, "".concat(_this.id))) {
39
+ return _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]);
40
+ } else {
41
+ return '--';
42
+ }
43
+ });
44
+ _defineProperty(this, "renderLog", function (r) {
45
+ return _this.addressDateInstance.getNameByCode(r === null || r === void 0 ? void 0 : r[_this.id]);
46
+ });
47
+ _defineProperty(this, "renderExport", function (value) {
48
+ var _this$addressDateInst;
49
+ return (_this$addressDateInst = _this.addressDateInstance.getNameByCode(value)) !== null && _this$addressDateInst !== void 0 ? _this$addressDateInst : '--';
50
+ });
51
+ _defineProperty(this, "getComponentValue", function (r) {
52
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
53
+ });
54
+ _defineProperty(this, "editRender", function () {
55
+ return null;
56
+ });
57
+ _defineProperty(this, "filterConfig", function () {
58
+ return [];
59
+ });
60
+ this.name = '省';
61
+ this.id = "".concat(options.id, "_bsPostingProvince");
62
+ this.sortField = "".concat(options.id, "_bsPostingProvince");
63
+ this.formField = "".concat(options.id, "_bsPostingProvince");
64
+ this.type = options.type;
65
+ this.isCombinationComponent = false;
66
+ this.canSort = false;
67
+ this.children = [];
68
+ this.align = 'left';
69
+ this.dataType = 'string';
70
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
71
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
72
+ this.rules = [];
73
+ this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
74
+ this.addressDateInstance = BsAddressData.getInstance();
75
+ });
76
+ export default Province;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
3
+ declare class ReceiverMobile 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
+ align: ALignType;
12
+ width: number;
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface['dataType'];
18
+ constructor(options: PickOption);
19
+ renderClient: (record: Record) => React.JSX.Element | null;
20
+ renderPc: (value: unknown, record: Record) => any;
21
+ renderLog: (r: Record) => any;
22
+ renderExport: (value?: string) => string;
23
+ getComponentValue: (r: Record) => any;
24
+ editRender: () => null;
25
+ filterConfig: () => never[];
26
+ }
27
+ export default ReceiverMobile;
@@ -0,0 +1,70 @@
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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
+ import ItemView from "../../../../../commonComponents/ItemView";
11
+ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, ReceiverMobile);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
17
+ _defineProperty(this, "type", void 0);
18
+ _defineProperty(this, "rules", void 0);
19
+ _defineProperty(this, "componentConfig", void 0);
20
+ _defineProperty(this, "effects", void 0);
21
+ _defineProperty(this, "align", void 0);
22
+ _defineProperty(this, "width", void 0);
23
+ _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "formField", void 0);
25
+ _defineProperty(this, "canSort", void 0);
26
+ _defineProperty(this, "children", void 0);
27
+ _defineProperty(this, "dataType", void 0);
28
+ _defineProperty(this, "renderClient", function (record) {
29
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
30
+ id: _this.id,
31
+ label: _this.name,
32
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
33
+ }) : null;
34
+ });
35
+ _defineProperty(this, "renderPc", function (value, record) {
36
+ var _record;
37
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
38
+ });
39
+ _defineProperty(this, "renderLog", function (r) {
40
+ return r === null || r === void 0 ? void 0 : r[_this.id];
41
+ });
42
+ _defineProperty(this, "renderExport", function (value) {
43
+ return value !== null && value !== void 0 ? value : '--';
44
+ });
45
+ _defineProperty(this, "getComponentValue", function (r) {
46
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
47
+ });
48
+ _defineProperty(this, "editRender", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "filterConfig", function () {
52
+ return [];
53
+ });
54
+ this.name = '收件人电话';
55
+ this.id = "".concat(options.id, "_bsPostingReceiverMobile");
56
+ this.sortField = "".concat(options.id, "_bsPostingReceiverMobile");
57
+ this.formField = "".concat(options.id, "_bsPostingReceiverMobile");
58
+ this.type = options.type;
59
+ this.isCombinationComponent = false;
60
+ this.canSort = false;
61
+ this.children = [];
62
+ this.align = 'left';
63
+ this.dataType = 'string';
64
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
65
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
66
+ this.rules = [];
67
+ this.width = 180; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
68
+ });
69
+
70
+ export default ReceiverMobile;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
3
+ declare class ReceiverName 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
+ align: ALignType;
12
+ width: number;
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface['dataType'];
18
+ constructor(options: PickOption);
19
+ renderClient: (record: Record) => React.JSX.Element | null;
20
+ renderPc: (value: unknown, record: Record) => any;
21
+ renderLog: (r: Record) => any;
22
+ renderExport: (value?: string) => string;
23
+ getComponentValue: (r: Record) => any;
24
+ editRender: () => null;
25
+ filterConfig: () => never[];
26
+ }
27
+ export default ReceiverName;
@@ -0,0 +1,70 @@
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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
+ import ItemView from "../../../../../commonComponents/ItemView";
11
+ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, ReceiverName);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
17
+ _defineProperty(this, "type", void 0);
18
+ _defineProperty(this, "rules", void 0);
19
+ _defineProperty(this, "componentConfig", void 0);
20
+ _defineProperty(this, "effects", void 0);
21
+ _defineProperty(this, "align", void 0);
22
+ _defineProperty(this, "width", void 0);
23
+ _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "formField", void 0);
25
+ _defineProperty(this, "canSort", void 0);
26
+ _defineProperty(this, "children", void 0);
27
+ _defineProperty(this, "dataType", void 0);
28
+ _defineProperty(this, "renderClient", function (record) {
29
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
30
+ id: _this.id,
31
+ label: _this.name,
32
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
33
+ }) : null;
34
+ });
35
+ _defineProperty(this, "renderPc", function (value, record) {
36
+ var _record;
37
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
38
+ });
39
+ _defineProperty(this, "renderLog", function (r) {
40
+ return r === null || r === void 0 ? void 0 : r[_this.id];
41
+ });
42
+ _defineProperty(this, "renderExport", function (value) {
43
+ return value !== null && value !== void 0 ? value : '--';
44
+ });
45
+ _defineProperty(this, "getComponentValue", function (r) {
46
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
47
+ });
48
+ _defineProperty(this, "editRender", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "filterConfig", function () {
52
+ return [];
53
+ });
54
+ this.name = '收件人姓名';
55
+ this.id = "".concat(options.id, "_bsPostingReceiverName");
56
+ this.sortField = "".concat(options.id, "_bsPostingReceiverName");
57
+ this.formField = "".concat(options.id, "_bsPostingReceiverName");
58
+ this.type = options.type;
59
+ this.isCombinationComponent = false;
60
+ this.canSort = false;
61
+ this.children = [];
62
+ this.align = 'left';
63
+ this.dataType = 'string';
64
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
65
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
66
+ this.rules = [];
67
+ this.width = 180; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
68
+ });
69
+
70
+ export default ReceiverName;
@@ -0,0 +1,43 @@
1
+ import { ComponentInterface, PickOption, Record } from "../../../type";
2
+ import React from "react";
3
+ import Province from "./components/Province";
4
+ import City from "./components/City";
5
+ import District from "./components/District";
6
+ import Detail from "./components/Detail";
7
+ import ReceiverName from "./components/ReceiverName";
8
+ import ReceiverMobile from "./components/ReceiverMobile";
9
+ declare class BsPosting implements ComponentInterface {
10
+ name: string;
11
+ id: string;
12
+ sortField: string;
13
+ type: string;
14
+ rules: any[];
15
+ componentConfig: ComponentInterface["componentConfig"];
16
+ isCombinationComponent: boolean;
17
+ formField: string;
18
+ canSort: boolean;
19
+ children: ComponentInterface[];
20
+ dataType: ComponentInterface["dataType"];
21
+ province: Province;
22
+ city: City;
23
+ district: District;
24
+ detail: Detail;
25
+ receiverName: ReceiverName;
26
+ receiverMobile: ReceiverMobile;
27
+ constructor(options: PickOption);
28
+ renderPc: () => null;
29
+ renderLog: (r: Record) => React.JSX.Element;
30
+ getComponentValue: (r: Record) => {
31
+ province: any;
32
+ city: any;
33
+ district: any;
34
+ detail: any;
35
+ name: any;
36
+ mobile: any;
37
+ };
38
+ renderExport: () => null;
39
+ renderClient: (record: any) => React.JSX.Element;
40
+ editRender: (p: any) => React.JSX.Element;
41
+ filterConfig: () => never[];
42
+ }
43
+ export default BsPosting;
@@ -0,0 +1,106 @@
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 { ApaasPosting } from "@kmkf-fe-packages/basic-components";
13
+ import GetFormItem from "../../GetFormItem";
14
+ import Province from "./components/Province";
15
+ import City from "./components/City";
16
+ import District from "./components/District";
17
+ import Detail from "./components/Detail";
18
+ import ReceiverName from "./components/ReceiverName";
19
+ import ReceiverMobile from "./components/ReceiverMobile";
20
+ var BsPosting = /*#__PURE__*/_createClass(function BsPosting(options) {
21
+ var _this = this,
22
+ _options$componentCon;
23
+ _classCallCheck(this, BsPosting);
24
+ _defineProperty(this, "name", void 0);
25
+ _defineProperty(this, "id", void 0);
26
+ _defineProperty(this, "sortField", void 0);
27
+ _defineProperty(this, "type", void 0);
28
+ _defineProperty(this, "rules", void 0);
29
+ _defineProperty(this, "componentConfig", void 0);
30
+ _defineProperty(this, "isCombinationComponent", void 0);
31
+ _defineProperty(this, "formField", void 0);
32
+ _defineProperty(this, "canSort", void 0);
33
+ _defineProperty(this, "children", void 0);
34
+ _defineProperty(this, "dataType", void 0);
35
+ _defineProperty(this, "province", void 0);
36
+ _defineProperty(this, "city", void 0);
37
+ _defineProperty(this, "district", void 0);
38
+ _defineProperty(this, "detail", void 0);
39
+ _defineProperty(this, "receiverName", void 0);
40
+ _defineProperty(this, "receiverMobile", void 0);
41
+ _defineProperty(this, "renderPc", function () {
42
+ return null;
43
+ });
44
+ _defineProperty(this, "renderLog", function (r) {
45
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.province.renderLog(r), _this.city.renderLog(r), _this.district.renderLog(r), _this.detail.renderLog(r), "/", _this.receiverName.renderLog(r), _this.receiverMobile.renderLog(r));
46
+ });
47
+ _defineProperty(this, "getComponentValue", function (r) {
48
+ return {
49
+ province: _this.province.getComponentValue(r),
50
+ city: _this.city.getComponentValue(r),
51
+ district: _this.district.getComponentValue(r),
52
+ detail: _this.detail.getComponentValue(r),
53
+ name: _this.receiverName.getComponentValue(r),
54
+ mobile: _this.receiverMobile.getComponentValue(r)
55
+ };
56
+ });
57
+ _defineProperty(this, "renderExport", function () {
58
+ return null;
59
+ });
60
+ _defineProperty(this, "renderClient", function (record) {
61
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.province.renderClient(record), _this.city.renderClient(record), _this.district.renderClient(record), _this.detail.renderClient(record), _this.receiverName.renderClient(record), _this.receiverMobile.renderClient(record));
62
+ });
63
+ _defineProperty(this, "editRender", function (p) {
64
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
65
+ return /*#__PURE__*/React.createElement(GetFormItem, {
66
+ title: _this.name,
67
+ name: _this.id,
68
+ rules: _this.rules,
69
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
70
+ 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,
71
+ component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
72
+ type: _this.type === "POSTING" || ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) === "workOrder" ? "workOrder" : "bs"
73
+ }))
74
+ });
75
+ });
76
+ _defineProperty(this, "filterConfig", function () {
77
+ return [];
78
+ });
79
+ this.name = options.name;
80
+ this.id = options.id;
81
+ this.sortField = "".concat(options.id);
82
+ this.formField = "".concat(options.id);
83
+ this.type = options.type;
84
+ this.componentConfig = options.componentConfig;
85
+ this.isCombinationComponent = true;
86
+ this.canSort = false;
87
+ this.children = [];
88
+ this.dataType = "object";
89
+ this.province = new Province(_objectSpread({}, options));
90
+ this.city = new City(_objectSpread({}, options));
91
+ this.district = new District(_objectSpread({}, options));
92
+ this.detail = new Detail(_objectSpread({}, options));
93
+ this.receiverName = new ReceiverName(_objectSpread({}, options));
94
+ this.receiverMobile = new ReceiverMobile(_objectSpread({}, options));
95
+ this.children = [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile];
96
+ this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
97
+ validator: function validator(_, value) {
98
+ var _value$postingAddress;
99
+ if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
100
+ return Promise.reject(new Error("请填写地址"));
101
+ }
102
+ return Promise.resolve();
103
+ }
104
+ }] : [];
105
+ });
106
+ export default BsPosting;
@@ -21,7 +21,10 @@ declare class BsReissue implements ComponentInterface {
21
21
  renderClient: (record: any) => React.JSX.Element | null;
22
22
  renderPc: () => null;
23
23
  renderLog: (r: Record) => React.JSX.Element;
24
- getComponentValue: (r: Record) => any;
24
+ getComponentValue: (r: Record) => {
25
+ bsReissueType: any;
26
+ bsReissueGoods: any;
27
+ };
25
28
  renderExport: () => null;
26
29
  editRender: (p: any) => React.JSX.Element;
27
30
  filterConfig: (item: ColumnConfig) => ({
@@ -50,14 +50,17 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
50
50
  return null;
51
51
  });
52
52
  _defineProperty(this, "renderLog", function (r) {
53
- var _this$componentConfig2;
54
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
53
+ var _r, _r2, _this$componentConfig2;
54
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_bsReissueType")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_bsReissueGoods")]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
55
55
  list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")]) || [],
56
56
  showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
57
- })));
57
+ })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
58
58
  });
59
59
  _defineProperty(this, "getComponentValue", function (r) {
60
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")];
60
+ return {
61
+ bsReissueType: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueType")],
62
+ bsReissueGoods: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")]
63
+ };
61
64
  });
62
65
  _defineProperty(this, "renderExport", function () {
63
66
  return null;
@@ -50,11 +50,11 @@ var BsReturn = /*#__PURE__*/_createClass(function BsReturn(options) {
50
50
  return null;
51
51
  });
52
52
  _defineProperty(this, "renderLog", function (r) {
53
- var _this$componentConfig2;
54
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
53
+ var _r, _r2, _this$componentConfig2;
54
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_bsReturnType")]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_bsReturnGoods")]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
55
55
  list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReturnGoods")]) || [],
56
56
  showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
57
- })));
57
+ })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
58
58
  });
59
59
  _defineProperty(this, "getComponentValue", function (r) {
60
60
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReturnGoods")];
@@ -1,17 +1,17 @@
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 BsSystemOrder 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'];
10
- effects: ComponentInterface['effects'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
- dataType: ComponentInterface['dataType'];
14
+ dataType: ComponentInterface["dataType"];
15
15
  children: ComponentInterface[];
16
16
  constructor(options: PickOption);
17
17
  renderClient: (record: any) => React.JSX.Element | null;
@@ -8,26 +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';
11
+ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
15
- import { BsSystemOrder as SystemOrder } from '@kmkf-fe-packages/basic-components';
14
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { BsSystemOrder as SystemOrder } from "@kmkf-fe-packages/basic-components";
16
16
  import { BsSystemOrderTable } from "../../Common";
17
17
  import { BsHeaderChild } from "../common/index";
18
18
  import { SYMBOL } from "../../../constant";
19
19
  var typeMap = {
20
20
  BS_SYSTEM_ORDER: {
21
- key: 'bsSystemShowOrder',
22
- name: 'bs',
23
- typeName: '单据类型',
24
- tagName: '标签'
21
+ key: "bsSystemShowOrder",
22
+ name: "bs",
23
+ typeName: "单据类型",
24
+ tagName: "标签",
25
+ selectId: "bsSystemSelectIds"
25
26
  },
26
27
  WLN_SYSTEM_ORDER: {
27
- key: 'wlnSystemShowOrder',
28
- name: '万里牛',
29
- typeName: '订单类型',
30
- tagName: '标记'
28
+ key: "wlnSystemShowOrder",
29
+ name: "万里牛",
30
+ typeName: "订单类型",
31
+ tagName: "标记",
32
+ selectId: "wlnSystemSelectIds"
31
33
  }
32
34
  };
33
35
  var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
@@ -62,12 +64,15 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
62
64
  _defineProperty(this, "renderLog", function (r) {
63
65
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)])) return null;
64
66
  return /*#__PURE__*/React.createElement(BsSystemOrderTable, {
65
- value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)],
67
+ value: {
68
+ showOrderInfo: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)],
69
+ selectIds: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].selectId)]
70
+ },
66
71
  type: _this.type
67
72
  });
68
73
  });
69
74
  _defineProperty(this, "getComponentValue", function (r) {
70
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
75
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)];
71
76
  });
72
77
  _defineProperty(this, "renderExport", function () {
73
78
  return null;
@@ -93,7 +98,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
93
98
  // 过滤组件id
94
99
  name: item.name,
95
100
  // 过滤组件名称
96
- filterComponentType: 'Input'
101
+ filterComponentType: "Input"
97
102
  }];
98
103
  });
99
104
  this.name = options.name;
@@ -109,7 +114,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
109
114
  id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billType"),
110
115
  width: 150
111
116
  })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
112
- name: '系统订单号',
117
+ name: "系统订单号",
113
118
  id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billNo"),
114
119
  width: 150
115
120
  })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
@@ -128,6 +133,6 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
128
133
  return Promise.resolve();
129
134
  }
130
135
  }] : [];
131
- this.dataType = 'object';
136
+ this.dataType = "object";
132
137
  });
133
138
  export default BsSystemOrder;
@@ -6,7 +6,7 @@ declare class BasicCascader implements ComponentInterface {
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
9
+ componentConfig: ComponentInterface['componentConfig'];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
@@ -19,7 +19,7 @@ declare class BasicCascader implements ComponentInterface {
19
19
  * @param value
20
20
  * @returns
21
21
  */
22
- getValue: (value: any) => string;
22
+ getValues: (value: any) => string;
23
23
  renderClient: (record: any) => React.JSX.Element | null;
24
24
  renderPc: (value: any, record: Record) => React.JSX.Element;
25
25
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -27,13 +27,15 @@ declare class BasicCascader implements ComponentInterface {
27
27
  renderExport: (value: any, record: Record) => string;
28
28
  editRender: (p: any) => React.JSX.Element;
29
29
  filterConfig: (item: ColumnConfig) => {
30
- searchDefaultConditions: "eq";
30
+ searchDefaultConditions: "in";
31
31
  type: string;
32
32
  id: string;
33
33
  name: string;
34
34
  filterComponentType: "Cascader";
35
35
  props: {
36
36
  options: any;
37
+ multiple: boolean;
38
+ maxTagCount: string;
37
39
  fieldNames: {
38
40
  label: string;
39
41
  value: string;
@@ -41,7 +43,7 @@ declare class BasicCascader implements ComponentInterface {
41
43
  };
42
44
  };
43
45
  filterFn: (value: string) => (i: Record) => boolean;
44
- formatFilterValue: (val: Array<string>) => string | undefined;
46
+ formatFilterValue: (val: Array<string>) => (string | undefined)[] | undefined;
45
47
  };
46
48
  }
47
49
  export default BasicCascader;