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

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.
@@ -12,9 +12,23 @@ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
14
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
15
- import { BsSystemOrder as Goods } from "@kmkf-fe-packages/basic-components";
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
+ var typeMap = {
19
+ BS_SYSTEM_ORDER: {
20
+ key: "bsSystemShowOrder",
21
+ name: "bs",
22
+ typeName: "单据类型",
23
+ tagName: "标签"
24
+ },
25
+ WLN_SYSTEM_ORDER: {
26
+ key: "wlnSystemShowOrder",
27
+ name: "万里牛",
28
+ typeName: "订单类型",
29
+ tagName: "标记"
30
+ }
31
+ };
18
32
  var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
19
33
  var _this = this,
20
34
  _this$componentConfig;
@@ -36,7 +50,8 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
36
50
  id: _this.id,
37
51
  label: _this.name,
38
52
  value: /*#__PURE__*/React.createElement(BsSystemOrderTable, {
39
- value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
53
+ value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
54
+ type: _this.type
40
55
  })
41
56
  })) : null;
42
57
  });
@@ -44,9 +59,10 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
44
59
  return null;
45
60
  });
46
61
  _defineProperty(this, "renderLog", function (r) {
47
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsSystemShowOrder")])) return null;
62
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)])) return null;
48
63
  return /*#__PURE__*/React.createElement(BsSystemOrderTable, {
49
- value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsSystemShowOrder")]
64
+ value: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[_this.type].key)],
65
+ type: _this.type
50
66
  });
51
67
  });
52
68
  _defineProperty(this, "getComponentValue", function (r) {
@@ -62,8 +78,9 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
62
78
  rules: _this.rules,
63
79
  required: false,
64
80
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
65
- component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
66
- onChange: p === null || p === void 0 ? void 0 : p.onChange
81
+ component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
82
+ onChange: p === null || p === void 0 ? void 0 : p.onChange,
83
+ type: _this.type
67
84
  }))
68
85
  });
69
86
  });
@@ -72,23 +89,23 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
72
89
  });
73
90
  this.name = options.name;
74
91
  this.id = options.id;
75
- this.sortField = "".concat(options.id, "_bsSystemShowOrder");
76
- this.formField = "".concat(options.id, "_bsSystemShowOrder");
92
+ this.sortField = "".concat(options.id, "_").concat(typeMap[options.type].key);
93
+ this.formField = "".concat(options.id, "_").concat(typeMap[options.type].key);
77
94
  this.type = options.type;
78
95
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
79
96
  this.isCombinationComponent = true;
80
97
  this.canSort = false;
81
98
  this.children = [new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
82
- name: "单据类型",
83
- id: "".concat(options.id, "_bsSystemShowOrder_billType"),
99
+ name: typeMap[options.type].typeName,
100
+ id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billType"),
84
101
  width: 150
85
102
  })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
86
103
  name: "系统订单号",
87
- id: "".concat(options.id, "_bsSystemShowOrder_billNo"),
104
+ id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billNo"),
88
105
  width: 150
89
106
  })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
90
- name: "标签",
91
- id: "".concat(options.id, "_bsSystemShowOrder_billTag"),
107
+ name: typeMap[options.type].tagName,
108
+ id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billTag"),
92
109
  width: 150
93
110
  }))];
94
111
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
@@ -97,7 +114,7 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
97
114
  validator: function validator(_, value) {
98
115
  var _value$selectIds;
99
116
  if (!value || !(value !== null && value !== void 0 && (_value$selectIds = value.selectIds) !== null && _value$selectIds !== void 0 && _value$selectIds.length)) {
100
- return Promise.reject(new Error("请选择bs系统订单号"));
117
+ return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat(typeMap[options.type].name, "\u7CFB\u7EDF\u8BA2\u5355\u53F7")));
101
118
  }
102
119
  return Promise.resolve();
103
120
  }
@@ -1,19 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
3
  declare class ExpressCode implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  align: ALignType;
11
11
  width: number;
12
12
  isCombinationComponent: boolean;
13
13
  formField: string;
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
- dataType: ComponentInterface['dataType'];
16
+ dataType: ComponentInterface["dataType"];
17
17
  constructor(options: PickOption);
18
18
  renderClient: () => null;
19
19
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -11,10 +11,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
- import React from 'react';
14
+ import React from "react";
15
15
  import { BsExpressRender } from "../../Common";
16
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { SYMBOL } from "../../../constant";
18
+ var typeMap = {
19
+ BS_SYSTEM_ORDER: {
20
+ key: "bsLogisticsItem"
21
+ },
22
+ WLN_SYSTEM_ORDER: {
23
+ key: "wlnLogisticsItem"
24
+ }
25
+ };
18
26
  var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
19
27
  var _this = this,
20
28
  _this$componentConfig;
@@ -36,17 +44,17 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
36
44
  return null;
37
45
  });
38
46
  _defineProperty(this, "renderPc", function (value, record) {
39
- var _this$id$split = _this.id.split('_'),
47
+ var _this$id$split = _this.id.split("_"),
40
48
  _this$id$split2 = _slicedToArray(_this$id$split, 3),
41
49
  key = _this$id$split2[0],
42
50
  parentKey = _this$id$split2[1],
43
51
  childKey = _this$id$split2[2];
44
- if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_bsLogisticsItem")])) {
52
+ if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)])) {
45
53
  return /*#__PURE__*/React.createElement("span", null, "--");
46
54
  }
47
55
  return /*#__PURE__*/React.createElement(BsExpressRender, {
48
- list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_bsLogisticsItem")],
49
- showField: 'code'
56
+ list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
57
+ showField: "code"
50
58
  });
51
59
  });
52
60
  _defineProperty(this, "renderLog", function (r) {
@@ -58,7 +66,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
58
66
  });
59
67
  _defineProperty(this, "renderExport", function (value, record) {
60
68
  var _record;
61
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
69
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
62
70
  });
63
71
  _defineProperty(this, "editRender", function () {
64
72
  return null;
@@ -70,10 +78,10 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
70
78
  type: item.type,
71
79
  id: "".concat(item.id, "_").concat(subKey),
72
80
  name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
73
- filterComponentType: 'Input',
81
+ filterComponentType: "Input",
74
82
  filterFn: function filterFn(value) {
75
83
  return function (i) {
76
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCode'), value);
84
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
77
85
  };
78
86
  }
79
87
  };
@@ -89,14 +97,14 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
89
97
  if (/^[0-9a-zA-Z]*$/.test(value)) {
90
98
  return Promise.resolve();
91
99
  }
92
- return Promise.reject(new Error('只能输入数字和字母'));
100
+ return Promise.reject(new Error("只能输入数字和字母"));
93
101
  }
94
102
  }] : [];
95
- this.align = 'left';
103
+ this.align = "left";
96
104
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
97
105
  this.isCombinationComponent = false;
98
106
  this.canSort = false;
99
- this.dataType = 'string';
107
+ this.dataType = "string";
100
108
  this.children = [];
101
109
  });
102
110
  export default ExpressCode;
@@ -1,13 +1,13 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../../type';
2
- import React from 'react';
3
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
4
  declare class Express implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface['componentConfig'];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
11
  align: ALignType;
12
12
  expressDateInstance: InstanceType<typeof ExpressData>;
13
13
  width: number;
@@ -15,8 +15,8 @@ declare class Express implements ComponentInterface {
15
15
  formField: string;
16
16
  canSort: boolean;
17
17
  children: ComponentInterface[];
18
- dataType: ComponentInterface['dataType'];
19
- options: ComponentInterface['options'];
18
+ dataType: ComponentInterface["dataType"];
19
+ options: ComponentInterface["options"];
20
20
  constructor(options: PickOption);
21
21
  renderClient: () => null;
22
22
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -11,11 +11,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
11
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
13
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
- import React from 'react';
15
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
14
+ import React from "react";
15
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { BsExpressRender } from "../../Common";
17
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { SYMBOL } from "../../../constant";
19
+ var typeMap = {
20
+ BS_SYSTEM_ORDER: {
21
+ key: "bsLogisticsItem"
22
+ },
23
+ WLN_SYSTEM_ORDER: {
24
+ key: "wlnLogisticsItem"
25
+ }
26
+ };
19
27
  var Express = /*#__PURE__*/_createClass(function Express(options) {
20
28
  var _this = this;
21
29
  _classCallCheck(this, Express);
@@ -38,17 +46,17 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
38
46
  return null;
39
47
  });
40
48
  _defineProperty(this, "renderPc", function (value, record) {
41
- var _this$id$split = _this.id.split('_'),
49
+ var _this$id$split = _this.id.split("_"),
42
50
  _this$id$split2 = _slicedToArray(_this$id$split, 3),
43
51
  key = _this$id$split2[0],
44
52
  parentKey = _this$id$split2[1],
45
53
  childKey = _this$id$split2[2];
46
- if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_bsLogisticsItem")])) {
54
+ if (!(record !== null && record !== void 0 && record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)])) {
47
55
  return /*#__PURE__*/React.createElement("span", null, "--");
48
56
  }
49
57
  return /*#__PURE__*/React.createElement(BsExpressRender, {
50
- list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_bsLogisticsItem")],
51
- showField: 'company'
58
+ list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
59
+ showField: "company"
52
60
  });
53
61
  });
54
62
  _defineProperty(this, "renderLog", function (r) {
@@ -59,7 +67,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
59
67
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
60
68
  });
61
69
  _defineProperty(this, "renderExport", function (value, record) {
62
- return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || '--';
70
+ return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || "--";
63
71
  });
64
72
  _defineProperty(this, "editRender", function () {
65
73
  return null;
@@ -71,14 +79,14 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
71
79
  type: item.type,
72
80
  id: "".concat(item.id, "_").concat(subKey),
73
81
  name: "".concat(_this.name),
74
- filterComponentType: 'MultipleSelect',
82
+ filterComponentType: "MultipleSelect",
75
83
  props: {
76
84
  options: _this.expressDateInstance.getExpressData() || []
77
85
  },
78
86
  filterFn: function filterFn(value) {
79
87
  return function (i) {
80
88
  var _ref;
81
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCompany').split(',') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
89
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
82
90
  var _String;
83
91
  var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
84
92
  return logisticsCompany;
@@ -94,13 +102,13 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
94
102
  this.type = options.type;
95
103
  this.componentConfig = options.componentConfig;
96
104
  this.rules = [];
97
- this.align = 'left';
105
+ this.align = "left";
98
106
  this.expressDateInstance = ExpressData.getInstance();
99
107
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
100
108
  this.isCombinationComponent = false;
101
109
  this.canSort = false;
102
110
  this.children = [];
103
- this.dataType = 'string';
111
+ this.dataType = "string";
104
112
  this.options = this.expressDateInstance.getExpressData() || [];
105
113
  });
106
114
  export default Express;
@@ -29,5 +29,5 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
29
29
  text?: string | undefined;
30
30
  }) => React.JSX.Element;
31
31
  export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
32
- export declare const BsSystemOrderTable: ({ value }: any) => React.JSX.Element;
32
+ export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
33
33
  export {};
@@ -258,6 +258,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
258
258
  failValue = _ref8.failValue,
259
259
  _ref8$options = _ref8.options,
260
260
  options = _ref8$options === void 0 ? [] : _ref8$options;
261
+ console.log("CommonOrderContent", list);
261
262
  var orderContent = function orderContent(item, index) {
262
263
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
263
264
  style: {
@@ -528,7 +529,7 @@ export var FileRender = function FileRender(_ref12) {
528
529
  style: {
529
530
  color: "#1890ff",
530
531
  cursor: "pointer",
531
- display: 'block'
532
+ display: "block"
532
533
  },
533
534
  onClick: function onClick(e) {
534
535
  e.preventDefault();
@@ -571,8 +572,9 @@ export var FileRender = function FileRender(_ref12) {
571
572
  })));
572
573
  };
573
574
  export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
574
- var value = _ref13.value;
575
- var columns = [{
575
+ var value = _ref13.value,
576
+ type = _ref13.type;
577
+ var columns = type === "WLN_SYSTEM_ORDER" ? [{
576
578
  dataIndex: "billType",
577
579
  title: "单据类型"
578
580
  }, {
@@ -581,6 +583,15 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
581
583
  }, {
582
584
  dataIndex: "billTag",
583
585
  title: "标签"
586
+ }] : [{
587
+ dataIndex: "billType",
588
+ title: "订单类型"
589
+ }, {
590
+ dataIndex: "billNo",
591
+ title: "系统订单号"
592
+ }, {
593
+ dataIndex: "billTag",
594
+ title: "标记"
584
595
  }];
585
596
  var rowSelection = {
586
597
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
@@ -63,8 +63,8 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
63
63
  _defineProperty(this, "children", void 0);
64
64
  _defineProperty(this, "dataType", void 0);
65
65
  _defineProperty(this, "renderClient", function (record) {
66
- var _typeMap$_this$type;
67
- console.log('record', record, record === null || record === void 0 ? void 0 : record[_this.id]);
66
+ var _typeMap$_this$type, _typeMap$_this$type2;
67
+ console.log('record', record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)]);
68
68
  var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
69
69
  return !isNull(item);
70
70
  }) : false;
@@ -73,13 +73,14 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
73
73
  label: _this.name,
74
74
  value: /*#__PURE__*/React.createElement(CommonOrderContent, {
75
75
  list: record === null || record === void 0 ? void 0 : record[_this.id],
76
- valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey
76
+ valueKey: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.valueKey
77
77
  })
78
78
  }) : null;
79
79
  });
80
80
  _defineProperty(this, "renderPc", function (value, record) {
81
- var _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
82
- var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
81
+ var _typeMap$_this$type3, _typeMap$_this$type4, _typeMap$_this$type5;
82
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.key)];
83
+ console.log('renderPc', typeMap, list);
83
84
  //兼容多个商品
84
85
  return /*#__PURE__*/React.createElement("span", {
85
86
  onClick: function onClick(e) {
@@ -87,30 +88,30 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
87
88
  }
88
89
  }, /*#__PURE__*/React.createElement(CommonOrderContent, {
89
90
  list: list,
90
- type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type,
91
- valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey
91
+ type: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.type,
92
+ valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey
92
93
  }));
93
94
  });
94
95
  _defineProperty(this, "renderLog", function (r) {
95
- var _typeMap$_this$type5;
96
- var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
96
+ var _typeMap$_this$type6;
97
+ var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
97
98
  if (isNull(list)) return null;
98
99
  return _this.renderPc(undefined, r);
99
100
  });
100
101
  _defineProperty(this, "getComponentValue", function (r) {
101
- var _typeMap$_this$type6;
102
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
102
+ var _typeMap$_this$type7;
103
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
103
104
  });
104
105
  _defineProperty(this, "renderExport", function (value, record) {
105
- var _typeMap$_this$type7;
106
- var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key)];
106
+ var _typeMap$_this$type8;
107
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key)];
107
108
  return (list || []).map(function (item) {
108
- var _typeMap$_this$type8;
109
- return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.valueKey];
109
+ var _typeMap$_this$type9;
110
+ return item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.valueKey];
110
111
  }).join(',');
111
112
  });
112
113
  _defineProperty(this, "editRender", function (p) {
113
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type9;
114
+ var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type10;
114
115
  return /*#__PURE__*/React.createElement(GetFormItem, {
115
116
  title: _this.name,
116
117
  name: _this.id,
@@ -118,22 +119,22 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
118
119
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
119
120
  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,
120
121
  component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
121
- type: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.type
122
+ type: (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.type
122
123
  }))
123
124
  });
124
125
  });
125
126
  _defineProperty(this, "filterConfig", function (item) {
126
- var _typeMap$_this$type10;
127
+ var _typeMap$_this$type11;
127
128
  return {
128
129
  searchDefaultConditions: SYMBOL.like,
129
130
  type: item.type,
130
- id: "".concat(item.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.code),
131
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code),
131
132
  name: "".concat(_this.name),
132
133
  filterComponentType: 'Input',
133
134
  filterFn: function filterFn(value) {
134
135
  return function (i) {
135
- var _typeMap$_this$type11;
136
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.code), value);
136
+ var _typeMap$_this$type12;
137
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.code), value);
137
138
  };
138
139
  }
139
140
  };
@@ -152,12 +153,12 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
152
153
  required: true,
153
154
  validator: function validator(_, value) {
154
155
  var hasNo = (value || []).some(function (item) {
155
- var _typeMap$_this$type12;
156
- return item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey];
156
+ var _typeMap$_this$type13;
157
+ return item[(_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.valueKey];
157
158
  });
158
159
  if (!hasNo) {
159
- var _typeMap$_this$type13;
160
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.name)));
160
+ var _typeMap$_this$type14;
161
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.name)));
161
162
  }
162
163
  return Promise.resolve();
163
164
  }
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsGoods | BsLogistics | CommonSystemOrder | JstSendGood | WlnGoods | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration;
3
+ export declare const factory: (type: string, options: PickOption) => BsSystemOrder | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
@@ -116,6 +116,7 @@ export var factory = function factory(type, options) {
116
116
  case "JST_SUPPLY":
117
117
  return new JstSupply(options);
118
118
  case "BS_SYSTEM_ORDER":
119
+ case "WLN_SYSTEM_ORDER":
119
120
  return new BsSystemOrder(options);
120
121
  case "JST_SEND_GOOD":
121
122
  case "BS_SEND_GOOD":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.11.0-alpha.0",
3
+ "version": "0.11.0-alpha.2",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.11.0-alpha.0",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.0"
29
+ "@kmkf-fe-packages/basic-components": "^0.11.0-alpha.2",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.11.0-alpha.2"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "aeaa0dda1d182b6b2cfaf5b475f2cf77c65b4c5b"
43
+ "gitHead": "4082b35353767d77e58b4e29caed4360b03a7d86"
44
44
  }