@kmkf-fe-packages/services-components 2.0.47 → 2.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
2
+ import { ComponentInterface, PickOption, ALignType, Record, ColumnConfig } from '../../../../../type';
3
3
  declare class Detail 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
  align: ALignType;
12
12
  width: number;
13
13
  isCombinationComponent: boolean;
@@ -15,6 +15,7 @@ declare class Detail implements ComponentInterface {
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
17
  dataType: ComponentInterface['dataType'];
18
+ parentName?: string;
18
19
  constructor(options: PickOption);
19
20
  renderClient: (record: Record) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => any;
@@ -22,6 +23,12 @@ declare class Detail implements ComponentInterface {
22
23
  renderExport: (value?: string) => string;
23
24
  getComponentValue: (r: Record) => any;
24
25
  editRender: () => null;
25
- filterConfig: () => never[];
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "like";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "Input";
32
+ } | null;
26
33
  }
27
34
  export default Detail;
@@ -8,6 +8,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
8
8
  import React from 'react';
9
9
  import { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
10
  import ItemView from "../../../../../commonComponents/ItemView";
11
+ import { SYMBOL } from "../../../../../constant";
11
12
  var Detail = /*#__PURE__*/_createClass(function Detail(options) {
12
13
  var _this = this;
13
14
  _classCallCheck(this, Detail);
@@ -25,6 +26,7 @@ var Detail = /*#__PURE__*/_createClass(function Detail(options) {
25
26
  _defineProperty(this, "canSort", void 0);
26
27
  _defineProperty(this, "children", void 0);
27
28
  _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "parentName", void 0);
28
30
  _defineProperty(this, "renderClient", function (record) {
29
31
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
30
32
  id: _this.id,
@@ -48,8 +50,14 @@ var Detail = /*#__PURE__*/_createClass(function Detail(options) {
48
50
  _defineProperty(this, "editRender", function () {
49
51
  return null;
50
52
  });
51
- _defineProperty(this, "filterConfig", function () {
52
- return [];
53
+ _defineProperty(this, "filterConfig", function (item) {
54
+ return _this.parentName ? {
55
+ searchDefaultConditions: SYMBOL.like,
56
+ type: item.type,
57
+ id: "".concat(_this.id),
58
+ name: "".concat(_this.parentName, "-").concat(_this.name),
59
+ filterComponentType: 'Input'
60
+ } : null;
53
61
  });
54
62
  this.name = options.name;
55
63
  this.id = options.id;
@@ -65,6 +73,8 @@ var Detail = /*#__PURE__*/_createClass(function Detail(options) {
65
73
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
66
74
  this.rules = [];
67
75
  this.width = 200; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
76
+ if (options.parentName) {
77
+ this.parentName = options.parentName;
78
+ }
68
79
  });
69
-
70
80
  export default Detail;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
2
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
3
3
  import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
4
4
  declare class District implements ComponentInterface {
5
5
  name: string;
@@ -7,8 +7,8 @@ declare class District implements ComponentInterface {
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
11
- effects: ComponentInterface["effects"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
+ effects: ComponentInterface['effects'];
12
12
  align: ALignType;
13
13
  width: number;
14
14
  isCombinationComponent: boolean;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
1
+ import React from "react";
2
+ import { ComponentInterface, PickOption, ALignType, Record, ColumnConfig } from "../../../../../type";
3
3
  declare class ReceiverMobile implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -14,7 +14,8 @@ declare class ReceiverMobile implements ComponentInterface {
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface['dataType'];
17
+ dataType: ComponentInterface["dataType"];
18
+ parentName?: string;
18
19
  constructor(options: PickOption);
19
20
  renderClient: (record: Record) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => any;
@@ -22,6 +23,13 @@ declare class ReceiverMobile implements ComponentInterface {
22
23
  renderExport: (value?: string) => string;
23
24
  getComponentValue: (r: Record) => any;
24
25
  editRender: () => null;
25
- filterConfig: () => never[];
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "in";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "Input";
32
+ formatFilterValue: (input: string) => string | string[];
33
+ } | null;
26
34
  }
27
35
  export default ReceiverMobile;
@@ -5,9 +5,10 @@ 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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
8
+ import React from "react";
9
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
10
10
  import ItemView from "../../../../../commonComponents/ItemView";
11
+ import { SYMBOL, batchInput } from "../../../../../constant";
11
12
  var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options) {
12
13
  var _this = this;
13
14
  _classCallCheck(this, ReceiverMobile);
@@ -25,6 +26,7 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
25
26
  _defineProperty(this, "canSort", void 0);
26
27
  _defineProperty(this, "children", void 0);
27
28
  _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "parentName", void 0);
28
30
  _defineProperty(this, "renderClient", function (record) {
29
31
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
30
32
  id: _this.id,
@@ -34,13 +36,13 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
34
36
  });
35
37
  _defineProperty(this, "renderPc", function (value, record) {
36
38
  var _record;
37
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
39
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
38
40
  });
39
41
  _defineProperty(this, "renderLog", function (r) {
40
42
  return r === null || r === void 0 ? void 0 : r[_this.id];
41
43
  });
42
44
  _defineProperty(this, "renderExport", function (value) {
43
- return value !== null && value !== void 0 ? value : '--';
45
+ return value !== null && value !== void 0 ? value : "--";
44
46
  });
45
47
  _defineProperty(this, "getComponentValue", function (r) {
46
48
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
@@ -48,8 +50,17 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
48
50
  _defineProperty(this, "editRender", function () {
49
51
  return null;
50
52
  });
51
- _defineProperty(this, "filterConfig", function () {
52
- return [];
53
+ _defineProperty(this, "filterConfig", function (item) {
54
+ return _this.parentName ? {
55
+ searchDefaultConditions: SYMBOL.in,
56
+ type: item.type,
57
+ id: "".concat(_this.id),
58
+ name: "".concat(_this.parentName, "-").concat(_this.name),
59
+ filterComponentType: "Input",
60
+ formatFilterValue: function formatFilterValue(input) {
61
+ return batchInput(input);
62
+ }
63
+ } : null;
53
64
  });
54
65
  this.name = options.name;
55
66
  this.id = options.id;
@@ -59,12 +70,14 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
59
70
  this.isCombinationComponent = false;
60
71
  this.canSort = false;
61
72
  this.children = [];
62
- this.align = 'left';
63
- this.dataType = 'string';
73
+ this.align = "left";
74
+ this.dataType = "string";
64
75
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
65
76
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
66
77
  this.rules = [];
67
78
  this.width = 180; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
79
+ if (options.parentName) {
80
+ this.parentName = options.parentName;
81
+ }
68
82
  });
69
-
70
83
  export default ReceiverMobile;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
1
+ import React from "react";
2
+ import { ComponentInterface, PickOption, ALignType, Record, ColumnConfig } from "../../../../../type";
3
3
  declare class ReceiverName implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -14,7 +14,8 @@ declare class ReceiverName implements ComponentInterface {
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface['dataType'];
17
+ dataType: ComponentInterface["dataType"];
18
+ parentName?: string;
18
19
  constructor(options: PickOption);
19
20
  renderClient: (record: Record) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => any;
@@ -22,6 +23,13 @@ declare class ReceiverName implements ComponentInterface {
22
23
  renderExport: (value?: string) => string;
23
24
  getComponentValue: (r: Record) => any;
24
25
  editRender: () => null;
25
- filterConfig: () => never[];
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "in";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "Input";
32
+ formatFilterValue: (input: string) => string | string[];
33
+ } | null;
26
34
  }
27
35
  export default ReceiverName;
@@ -5,9 +5,10 @@ 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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
8
+ import React from "react";
9
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
10
10
  import ItemView from "../../../../../commonComponents/ItemView";
11
+ import { SYMBOL, batchInput } from "../../../../../constant";
11
12
  var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
12
13
  var _this = this;
13
14
  _classCallCheck(this, ReceiverName);
@@ -25,6 +26,7 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
25
26
  _defineProperty(this, "canSort", void 0);
26
27
  _defineProperty(this, "children", void 0);
27
28
  _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "parentName", void 0);
28
30
  _defineProperty(this, "renderClient", function (record) {
29
31
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
30
32
  id: _this.id,
@@ -34,13 +36,13 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
34
36
  });
35
37
  _defineProperty(this, "renderPc", function (value, record) {
36
38
  var _record;
37
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
39
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
38
40
  });
39
41
  _defineProperty(this, "renderLog", function (r) {
40
42
  return r === null || r === void 0 ? void 0 : r[_this.id];
41
43
  });
42
44
  _defineProperty(this, "renderExport", function (value) {
43
- return value !== null && value !== void 0 ? value : '--';
45
+ return value !== null && value !== void 0 ? value : "--";
44
46
  });
45
47
  _defineProperty(this, "getComponentValue", function (r) {
46
48
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
@@ -48,8 +50,17 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
48
50
  _defineProperty(this, "editRender", function () {
49
51
  return null;
50
52
  });
51
- _defineProperty(this, "filterConfig", function () {
52
- return [];
53
+ _defineProperty(this, "filterConfig", function (item) {
54
+ return _this.parentName ? {
55
+ searchDefaultConditions: SYMBOL.in,
56
+ type: item.type,
57
+ id: "".concat(_this.id),
58
+ name: "".concat(_this.parentName, "-").concat(_this.name),
59
+ filterComponentType: "Input",
60
+ formatFilterValue: function formatFilterValue(input) {
61
+ return batchInput(input);
62
+ }
63
+ } : null;
53
64
  });
54
65
  this.name = options.name;
55
66
  this.id = options.id;
@@ -59,12 +70,14 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
59
70
  this.isCombinationComponent = false;
60
71
  this.canSort = false;
61
72
  this.children = [];
62
- this.align = 'left';
63
- this.dataType = 'string';
73
+ this.align = "left";
74
+ this.dataType = "string";
64
75
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
65
76
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
66
77
  this.rules = [];
67
78
  this.width = 180; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
79
+ if (options.parentName) {
80
+ this.parentName = options.parentName;
81
+ }
68
82
  });
69
-
70
83
  export default ReceiverName;
@@ -1,24 +1,24 @@
1
- import { ComponentInterface, PickOption, Record } from "../../type";
2
- import React from "react";
3
- import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
4
- import Province from "../BS/BsPosting/components/Province";
5
- import City from "../BS/BsPosting/components//City";
6
- import District from "../BS/BsPosting/components//District";
7
- import Detail from "../BS/BsPosting/components//Detail";
8
- import ReceiverName from "../BS/BsPosting/components//ReceiverName";
9
- import ReceiverMobile from "../BS/BsPosting/components//ReceiverMobile";
1
+ import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type';
2
+ import React from 'react';
3
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
4
+ import Province from '../BS/BsPosting/components/Province';
5
+ import City from '../BS/BsPosting/components//City';
6
+ import District from '../BS/BsPosting/components//District';
7
+ import Detail from '../BS/BsPosting/components//Detail';
8
+ import ReceiverName from '../BS/BsPosting/components//ReceiverName';
9
+ import ReceiverMobile from '../BS/BsPosting/components//ReceiverMobile';
10
10
  declare class BasicPosting implements ComponentInterface {
11
11
  name: string;
12
12
  id: string;
13
13
  sortField: string;
14
14
  type: string;
15
15
  rules: any[];
16
- componentConfig: ComponentInterface["componentConfig"];
16
+ componentConfig: ComponentInterface['componentConfig'];
17
17
  isCombinationComponent: boolean;
18
18
  formField: string;
19
19
  canSort: boolean;
20
20
  children: ComponentInterface[];
21
- dataType: ComponentInterface["dataType"];
21
+ dataType: ComponentInterface['dataType'];
22
22
  addressDateInstance: InstanceType<typeof AddressData>;
23
23
  province: Province;
24
24
  city: City;
@@ -41,6 +41,12 @@ declare class BasicPosting implements ComponentInterface {
41
41
  renderExport: (value: any, record: Record) => string | null;
42
42
  renderClient: (record: any) => React.JSX.Element | null;
43
43
  editRender: (p: any) => React.JSX.Element;
44
- filterConfig: () => never[];
44
+ filterConfig: (item: ColumnConfig) => ({
45
+ searchDefaultConditions: "eq";
46
+ type: string;
47
+ id: string;
48
+ name: string;
49
+ filterComponentType: "Input";
50
+ } | null)[];
45
51
  }
46
52
  export default BasicPosting;
@@ -8,12 +8,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
- import React from "react";
12
- import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
11
+ import React from 'react';
12
+ import { ApaasPosting } from '@kmkf-fe-packages/basic-components';
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
16
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData } from '@kmkf-fe-packages/kmkf-utils';
17
17
  import Province from "../BS/BsPosting/components/Province";
18
18
  import City from "../BS/BsPosting/components//City";
19
19
  import District from "../BS/BsPosting/components//District";
@@ -54,21 +54,21 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
54
54
  var province = record["".concat(_this.id, "_postingProvince")];
55
55
  var city = record["".concat(_this.id, "_postingCity")];
56
56
  var district = record["".concat(_this.id, "_postingDistrict")];
57
- var detail = record["".concat(_this.id, "_postingDetail")] || "";
58
- var name = record["".concat(_this.id, "_postingReceiverName")] || "";
59
- var mobile = record["".concat(_this.id, "_postingReceiverMobile")] || "";
57
+ var detail = record["".concat(_this.id, "_postingDetail")] || '';
58
+ var name = record["".concat(_this.id, "_postingReceiverName")] || '';
59
+ var mobile = record["".concat(_this.id, "_postingReceiverMobile")] || '';
60
60
  if (province === undefined) {
61
61
  return /*#__PURE__*/React.createElement("span", null, "--");
62
62
  }
63
63
  var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
64
64
  return _this.addressDateInstance.getNameByCode(suffix);
65
- }).join("");
65
+ }).join('');
66
66
  return /*#__PURE__*/React.createElement(CopyText, {
67
67
  text: "".concat(addressText).concat(detail, " ").concat(name, " ").concat(mobile),
68
68
  showText: /*#__PURE__*/React.createElement("div", {
69
69
  style: {
70
- maxHeight: "100px",
71
- overflowY: "auto"
70
+ maxHeight: '100px',
71
+ overflowY: 'auto'
72
72
  }
73
73
  }, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile))
74
74
  });
@@ -90,7 +90,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
90
90
  })) return null;
91
91
  var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
92
92
  return _this.addressDateInstance.getNameByCode(suffix);
93
- }).join("");
93
+ }).join('');
94
94
  return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
95
95
  });
96
96
  _defineProperty(this, "getComponentValue", function (r) {
@@ -108,9 +108,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
108
108
  province: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingProvince")],
109
109
  city: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingCity")],
110
110
  district: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingDistrict")],
111
- detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingDetail")]) || "",
112
- name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingReceiverName")]) || "",
113
- mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingReceiverMobile")]) || ""
111
+ detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingDetail")]) || '',
112
+ name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingReceiverName")]) || '',
113
+ mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_postingReceiverMobile")]) || ''
114
114
  };
115
115
  });
116
116
  _defineProperty(this, "renderExport", function (value, record) {
@@ -130,7 +130,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
130
130
  })) return null;
131
131
  var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
132
132
  return _this.addressDateInstance.getNameByCode(suffix);
133
- }).join("/");
133
+ }).join('/');
134
134
  return "".concat(addressText, "/").concat(detail, "/ ").concat(name, "/").concat(mobile);
135
135
  });
136
136
  _defineProperty(this, "renderClient", function (record) {
@@ -143,9 +143,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
143
143
  var mobile = record["".concat(_this.id, "_postingReceiverMobile")];
144
144
  var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
145
145
  return _this.addressDateInstance.getNameByCode(suffix);
146
- }).join("");
146
+ }).join('');
147
147
  var hasValue = addressText || detail || name || mobile;
148
- var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
148
+ var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join('/'), /*#__PURE__*/React.createElement("br", null), [name, mobile].join('/')) : null;
149
149
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
150
150
  id: _this.id,
151
151
  label: _this.name,
@@ -161,14 +161,16 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
161
161
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
162
162
  display: p === null || p === void 0 ? void 0 : p.display,
163
163
  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,
164
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
164
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
165
165
  component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
166
- type: _this.type === "BS_POSTING" ? "bs" : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField
166
+ type: _this.type === 'BS_POSTING' ? 'bs' : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField
167
167
  }))
168
168
  });
169
169
  });
170
- _defineProperty(this, "filterConfig", function () {
171
- return [];
170
+ _defineProperty(this, "filterConfig", function (item) {
171
+ return [
172
+ // this.detail.filterConfig(item),
173
+ _this.receiverName.filterConfig(item), _this.receiverMobile.filterConfig(item)];
172
174
  });
173
175
  this.name = options.name;
174
176
  this.id = options.id;
@@ -179,7 +181,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
179
181
  this.componentConfig = options.componentConfig;
180
182
  this.isCombinationComponent = this.isSplitColumns;
181
183
  this.canSort = false;
182
- this.dataType = "string";
184
+ this.dataType = 'string';
183
185
  var showField = (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField;
184
186
  this.addressDateInstance = (showField && {
185
187
  bs: BsAddressData,
@@ -189,40 +191,43 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
189
191
  }[showField] || AddressData).getInstance();
190
192
  this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
191
193
  id: "".concat(options.id, "_postingProvince"),
192
- name: "",
194
+ name: '',
193
195
  addressDateInstance: this.addressDateInstance
194
196
  }));
195
197
  this.city = new City(_objectSpread(_objectSpread({}, options), {}, {
196
198
  id: "".concat(options.id, "_postingCity"),
197
- name: "",
199
+ name: '',
198
200
  addressDateInstance: this.addressDateInstance
199
201
  }));
200
202
  this.district = new District(_objectSpread(_objectSpread({}, options), {}, {
201
203
  id: "".concat(options.id, "_postingDistrict"),
202
- name: "区/县",
204
+ name: '区/县',
203
205
  addressDateInstance: this.addressDateInstance
204
206
  }));
205
207
  this.detail = new Detail(_objectSpread(_objectSpread({}, options), {}, {
206
208
  id: "".concat(options.id, "_postingDetail"),
207
- name: "详细地址"
209
+ parentName: this.name,
210
+ name: '详细地址'
208
211
  }));
209
212
  this.receiverName = new ReceiverName(_objectSpread(_objectSpread({}, options), {}, {
210
213
  id: "".concat(options.id, "_postingReceiverName"),
211
- name: "收件人姓名"
214
+ parentName: this.name,
215
+ name: '收件人姓名'
212
216
  }));
213
217
  this.receiverMobile = new ReceiverMobile(_objectSpread(_objectSpread({}, options), {}, {
214
218
  id: "".concat(options.id, "_postingReceiverMobile"),
215
- name: "收件人电话"
219
+ parentName: this.name,
220
+ name: '收件人电话'
216
221
  }));
217
222
  this.children = this.isSplitColumns ? [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile] : [];
218
223
  this.rules = options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
219
224
  validator: function validator(_, value) {
220
225
  var _options$componentCon4, _value$postingAddress, _value$postingAddress2;
221
- var addressLen = (options === null || options === void 0 ? void 0 : (_options$componentCon4 = options.componentConfig) === null || _options$componentCon4 === void 0 ? void 0 : _options$componentCon4.showField) === "bs" ? !(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || (value === null || value === void 0 ? void 0 : value.postingAddress.some(function (t) {
226
+ var addressLen = (options === null || options === void 0 ? void 0 : (_options$componentCon4 = options.componentConfig) === null || _options$componentCon4 === void 0 ? void 0 : _options$componentCon4.showField) === 'bs' ? !(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || (value === null || value === void 0 ? void 0 : value.postingAddress.some(function (t) {
222
227
  return !t;
223
228
  })) : !(value !== null && value !== void 0 && (_value$postingAddress2 = value.postingAddress) !== null && _value$postingAddress2 !== void 0 && _value$postingAddress2.length);
224
229
  if (addressLen || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
225
- return Promise.reject(new Error("请填写地址"));
230
+ return Promise.reject(new Error('请填写地址'));
226
231
  }
227
232
  return Promise.resolve();
228
233
  }
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
- import React from "react";
3
- import CommonHeaderGoods from "../../CommonHeaderGood";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
2
+ import React from 'react';
3
+ import CommonHeaderGoods from '../../CommonHeaderGood';
4
4
  import { type FormInstance } from "antd";
5
5
  declare type ConfigType = {
6
6
  goodsKey: string;
@@ -12,13 +12,13 @@ declare class Exchange implements ComponentInterface {
12
12
  sortField: string;
13
13
  type: string;
14
14
  rules: any[];
15
- componentConfig: ComponentInterface["componentConfig"];
16
- effects: ComponentInterface["effects"];
15
+ componentConfig: ComponentInterface['componentConfig'];
16
+ effects: ComponentInterface['effects'];
17
17
  isCombinationComponent: boolean;
18
18
  formField: string;
19
19
  canSort: boolean;
20
20
  children: ComponentInterface[];
21
- dataType: ComponentInterface["dataType"];
21
+ dataType: ComponentInterface['dataType'];
22
22
  returnGoods: CommonHeaderGoods;
23
23
  config: ConfigType;
24
24
  form?: FormInstance;
@@ -8,20 +8,20 @@ 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 { BsGoodsTable } from "../../Common";
14
14
  import ItemView from "../../../commonComponents/ItemView";
15
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import { SYMBOL } from "../../../constant";
17
17
  // import { BsType, BsMemo } from "../../Bs/common";
18
- import { CommonExchangeGoods } from "@kmkf-fe-packages/basic-components";
18
+ import { CommonExchangeGoods } from '@kmkf-fe-packages/basic-components';
19
19
  import CommonHeaderGoods from "../../CommonHeaderGood";
20
20
  function toNum(value) {
21
- if (typeof value === "string") {
21
+ if (typeof value === 'string') {
22
22
  return value ? +value : void 0;
23
23
  }
24
- if (typeof value === "number") {
24
+ if (typeof value === 'number') {
25
25
  return value;
26
26
  }
27
27
  return void 0;
@@ -31,10 +31,10 @@ var CONF_MAP = {
31
31
  goodsKey: 'jstExchangeGoods',
32
32
  validator: function validator(_rule, value) {
33
33
  if (!_rule.required) return Promise.resolve();
34
- var goodsName = "";
34
+ var goodsName = '';
35
35
  if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
36
36
  var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
37
- var res = typeof qty === "number" ? qty < 1 : true;
37
+ var res = typeof qty === 'number' ? qty < 1 : true;
38
38
  if (res) {
39
39
  goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
40
40
  }
@@ -44,7 +44,7 @@ var CONF_MAP = {
44
44
  }
45
45
  if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
46
46
  var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
47
- var res = typeof v === "number" ? v < 0 : true;
47
+ var res = typeof v === 'number' ? v < 0 : true;
48
48
  if (res) {
49
49
  goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
50
50
  }
@@ -79,7 +79,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
79
79
  _defineProperty(this, "form", void 0);
80
80
  _defineProperty(this, "renderClient", function (record) {
81
81
  var _this$componentConfig;
82
- var exchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || "[]");
82
+ var exchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || '[]');
83
83
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
84
84
  id: "".concat(_this.id, "-out"),
85
85
  label: "".concat(_this.name, "-\u6362\u51FA"),
@@ -134,7 +134,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
134
134
  type: item.type,
135
135
  id: "".concat(item.id, "_").concat(_this.config.goodsKey),
136
136
  name: "".concat(_this.name, "-\u6362\u51FA"),
137
- filterComponentType: "Input"
137
+ filterComponentType: 'Input'
138
138
  }];
139
139
  });
140
140
  this.name = options.name;
@@ -149,7 +149,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
149
149
  this.form = (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.form;
150
150
  this.returnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
151
151
  id: "".concat(options.id, "_").concat(this.config.goodsKey),
152
- name: "商品信息"
152
+ name: '商品信息'
153
153
  }));
154
154
  this.children = [this.returnGoods];
155
155
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
@@ -158,7 +158,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
158
158
  validator: function validator(_, value) {
159
159
  var _this$componentConfig7, _value$_this$config$g;
160
160
  if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required && !(value !== null && value !== void 0 && (_value$_this$config$g = value[_this.config.goodsKey]) !== null && _value$_this$config$g !== void 0 && _value$_this$config$g.length)) {
161
- return Promise.reject(new Error("请选择换货商品"));
161
+ return Promise.reject(new Error('请选择换货商品'));
162
162
  }
163
163
  return Promise.resolve();
164
164
  }
@@ -168,6 +168,6 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
168
168
  return Promise.resolve();
169
169
  }
170
170
  }];
171
- this.dataType = "object";
171
+ this.dataType = 'object';
172
172
  });
173
173
  export default Exchange;
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, 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, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => JstSendGood | MsgStatus | BasicSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn;
3
+ export declare const factory: (type: string, options: PickOption) => JstSendGood | MsgStatus | BasicSelect | BasicDataTime | TradeDateTime | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.47",
3
+ "version": "2.0.48",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.0.47",
25
- "@kmkf-fe-packages/kmkf-utils": "2.0.47",
24
+ "@kmkf-fe-packages/basic-components": "2.0.48",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.0.48",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "a680d7d4952b6e9ac0d19f567b827244f8e6b9fd",
44
+ "gitHead": "c73160ce1d8542bbff5b17946e75bc0a269ce846",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }