@kmkf-fe-packages/services-components 1.4.2 → 1.4.3-rc.1

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 (28) hide show
  1. package/dist/esm/commonComponents/SelectMark/img/xingxing-grey.png +0 -0
  2. package/dist/esm/commonComponents/SelectMark/index.js +9 -0
  3. package/dist/esm/components/AfterSalesOrderId/index.d.ts +35 -0
  4. package/dist/esm/components/AfterSalesOrderId/index.js +107 -0
  5. package/dist/esm/components/BS/common/BsMemo.js +2 -1
  6. package/dist/esm/components/BS/common/BsType.js +2 -1
  7. package/dist/esm/components/Common/index.d.ts +1 -1
  8. package/dist/esm/components/Common/index.js +187 -5
  9. package/dist/esm/components/CommonHeaderGood/index.js +182 -0
  10. package/dist/esm/components/CommonMultiStatus/index.js +25 -19
  11. package/dist/esm/components/CommonSystemOrder/index.js +10 -8
  12. package/dist/esm/components/FlowMarkSelect/index.js +14 -1
  13. package/dist/esm/components/KmErpSendGood/index.d.ts +53 -0
  14. package/dist/esm/components/KmErpSendGood/index.js +213 -0
  15. package/dist/esm/components/Label/index.d.ts +15 -2
  16. package/dist/esm/components/Label/index.js +34 -7
  17. package/dist/esm/components/MsgStatus/index.js +2 -1
  18. package/dist/esm/components/StatusSelect/index.js +3 -0
  19. package/dist/esm/components/WDT/WdtExchange/index.d.ts +35 -0
  20. package/dist/esm/components/WDT/WdtExchange/index.js +183 -0
  21. package/dist/esm/components/WDT/WdtReturn/index.d.ts +54 -0
  22. package/dist/esm/components/WDT/WdtReturn/index.js +150 -0
  23. package/dist/esm/factory.d.ts +2 -2
  24. package/dist/esm/factory.js +11 -1
  25. package/dist/esm/index.d.ts +4 -0
  26. package/dist/esm/index.js +4 -0
  27. package/dist/esm/type.d.ts +1 -0
  28. package/package.json +5 -4
@@ -80,7 +80,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
80
80
  var _this = this,
81
81
  _typeMap$options$type,
82
82
  _typeMap$options$type2,
83
- _this$componentConfig3;
83
+ _this$componentConfig6;
84
84
  _classCallCheck(this, CommonMultiStatus);
85
85
  _defineProperty(this, "name", void 0);
86
86
  _defineProperty(this, "id", void 0);
@@ -95,7 +95,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
95
95
  _defineProperty(this, "children", void 0);
96
96
  _defineProperty(this, "dataType", void 0);
97
97
  _defineProperty(this, "renderClient", function (record) {
98
- var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
98
+ var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3, _this$componentConfig;
99
99
  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) {
100
100
  return !isNull(item);
101
101
  }) : false;
@@ -106,12 +106,13 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
106
106
  list: record === null || record === void 0 ? void 0 : record[_this.id],
107
107
  valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
108
108
  failValue: (_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.failValue,
109
- options: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.options
109
+ options: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.options,
110
+ isShowPopover: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.belongType) !== "wdt"
110
111
  })
111
112
  }) : null;
112
113
  });
113
114
  _defineProperty(this, "renderPc", function (value, record) {
114
- var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
115
+ var _typeMap$_this$type4, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _this$componentConfig2;
115
116
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
116
117
  //兼容多个商品
117
118
  return /*#__PURE__*/React.createElement("span", {
@@ -122,7 +123,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
122
123
  list: list,
123
124
  valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey,
124
125
  failValue: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.failValue,
125
- options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options
126
+ options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options,
127
+ isShowPopover: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.belongType) !== "wdt"
126
128
  }));
127
129
  });
128
130
  _defineProperty(this, "renderLog", function (r) {
@@ -139,35 +141,39 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
139
141
  var _typeMap$_this$type10;
140
142
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
141
143
  return (list || []).map(function (item) {
142
- var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15, _typeMap$_this$type16;
144
+ var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _this$componentConfig3, _typeMap$_this$type16, _typeMap$_this$type17;
143
145
  var currentOption = (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : (_typeMap$_this$type12 = _typeMap$_this$type11.options) === null || _typeMap$_this$type12 === void 0 ? void 0 : (_typeMap$_this$type13 = _typeMap$_this$type12.find) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.call(_typeMap$_this$type12, function (option) {
144
146
  var _typeMap$_this$type14;
145
147
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
146
148
  });
147
- return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || '');
149
+ if (((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.belongType) === "wdt") {
150
+ var _typeMap$_this$type15;
151
+ return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || '';
152
+ }
153
+ return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || '');
148
154
  }).join(',');
149
155
  });
150
156
  _defineProperty(this, "editRender", function (p) {
151
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
157
+ var _this$componentConfig4, _this$componentConfig5, _typeMap$_this$type18;
152
158
  return /*#__PURE__*/React.createElement(GetFormItem, {
153
159
  title: _this.name,
154
160
  name: _this.id,
155
161
  rules: _this.rules,
156
162
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
157
163
  display: p === null || p === void 0 ? void 0 : p.display,
158
- 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
+ required: (_this$componentConfig4 = (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required) !== null && _this$componentConfig4 !== void 0 ? _this$componentConfig4 : false,
159
165
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
160
- type: (_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.type,
166
+ type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
161
167
  failValue: typeMap[_this.type].failValue
162
168
  }))
163
169
  });
164
170
  });
165
171
  _defineProperty(this, "filterConfig", function (item) {
166
- var _typeMap$_this$type18, _item$templateConfig;
172
+ var _typeMap$_this$type19, _item$templateConfig;
167
173
  return {
168
174
  searchDefaultConditions: _this.type === 'WAREHOUSING_STATUS' ? SYMBOL.in : SYMBOL.like,
169
175
  type: item.type,
170
- id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
176
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
171
177
  name: "".concat(_this.name),
172
178
  filterComponentType: _this.type === 'WAREHOUSING_STATUS' ? 'MultipleSelect' : 'SelectInput',
173
179
  props: {
@@ -179,8 +185,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
179
185
  },
180
186
  filterFn: function filterFn(value) {
181
187
  return function (i) {
182
- var _typeMap$_this$type19;
183
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code), value);
188
+ var _typeMap$_this$type20;
189
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.code), value);
184
190
  };
185
191
  },
186
192
  formatFilterValue: _this.type === 'WAREHOUSING_STATUS' ? null : function (value) {
@@ -204,16 +210,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
204
210
  this.canSort = false;
205
211
  this.children = [];
206
212
  this.dataType = 'object';
207
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
213
+ this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
208
214
  required: true,
209
215
  validator: function validator(_, value) {
210
216
  var hasNo = (value || []).some(function (item) {
211
- var _typeMap$_this$type20;
212
- return item[(_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.valueKey];
217
+ var _typeMap$_this$type21;
218
+ return item[(_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.valueKey];
213
219
  });
214
220
  if (!hasNo) {
215
- var _typeMap$_this$type21;
216
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.name)));
221
+ var _typeMap$_this$type22;
222
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type22 = typeMap[_this.type]) === null || _typeMap$_this$type22 === void 0 ? void 0 : _typeMap$_this$type22.name)));
217
223
  }
218
224
  return Promise.resolve();
219
225
  }
@@ -48,7 +48,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
48
48
  var _this = this,
49
49
  _typeMap$options$type,
50
50
  _typeMap$options$type2,
51
- _this$componentConfig3;
51
+ _this$componentConfig5;
52
52
  _classCallCheck(this, CommonSystemOrder);
53
53
  _defineProperty(this, "name", void 0);
54
54
  _defineProperty(this, "id", void 0);
@@ -63,7 +63,7 @@ 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;
66
+ var _typeMap$_this$type, _this$componentConfig;
67
67
  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) {
68
68
  return !isNull(item);
69
69
  }) : false;
@@ -72,12 +72,13 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
72
72
  label: _this.name,
73
73
  value: /*#__PURE__*/React.createElement(CommonOrderContent, {
74
74
  list: record === null || record === void 0 ? void 0 : record[_this.id],
75
- valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey
75
+ valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
76
+ isShowPopover: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.belongType) !== "wdt"
76
77
  })
77
78
  }) : null;
78
79
  });
79
80
  _defineProperty(this, "renderPc", function (value, record) {
80
- var _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4;
81
+ var _typeMap$_this$type2, _typeMap$_this$type3, _typeMap$_this$type4, _this$componentConfig2;
81
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)];
82
83
  //兼容多个商品
83
84
  return /*#__PURE__*/React.createElement("span", {
@@ -87,7 +88,8 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
87
88
  }, /*#__PURE__*/React.createElement(CommonOrderContent, {
88
89
  list: list,
89
90
  type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type,
90
- valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey
91
+ valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey,
92
+ isShowPopover: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.belongType) !== "wdt"
91
93
  }));
92
94
  });
93
95
  _defineProperty(this, "renderLog", function (r) {
@@ -109,14 +111,14 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
109
111
  }).join(',');
110
112
  });
111
113
  _defineProperty(this, "editRender", function (p) {
112
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type9;
114
+ var _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type9;
113
115
  return /*#__PURE__*/React.createElement(GetFormItem, {
114
116
  title: _this.name,
115
117
  name: _this.id,
116
118
  rules: _this.rules,
117
119
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
118
120
  display: p === null || p === void 0 ? void 0 : p.display,
119
- 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,
121
+ required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
120
122
  component: /*#__PURE__*/React.createElement(SystemOrder, _extends({}, _this.componentConfig, {
121
123
  type: (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.type
122
124
  }))
@@ -151,7 +153,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
151
153
  this.canSort = false;
152
154
  this.children = [];
153
155
  this.dataType = 'object';
154
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
156
+ this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
155
157
  required: true,
156
158
  validator: function validator(_, value) {
157
159
  var hasNo = (value || []).some(function (item) {
@@ -21,6 +21,7 @@ import xingYellow from "../../commonComponents/SelectMark/img/xingxing-yellow.pn
21
21
  import xingBlue from "../../commonComponents/SelectMark/img/xingxing-blue.png";
22
22
  import xingGreen from "../../commonComponents/SelectMark/img/xingxing-green.png";
23
23
  import xingPurple from "../../commonComponents/SelectMark/img/xingxing-purple.png";
24
+ import xingGrey from "../../commonComponents/SelectMark/img/xingxing-grey.png";
24
25
  var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options) {
25
26
  var _this = this;
26
27
  _classCallCheck(this, FlowMarkSelect);
@@ -65,7 +66,8 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
65
66
  3: "黄色",
66
67
  4: "蓝色",
67
68
  5: "绿色",
68
- 6: "紫色"
69
+ 6: "紫色",
70
+ 7: "灰色"
69
71
  };
70
72
  var mark = _this.workOrderMark.find(function (item) {
71
73
  return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
@@ -111,6 +113,9 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
111
113
  options: [{
112
114
  label: "空白",
113
115
  value: "1"
116
+ }, {
117
+ label: "灰色",
118
+ value: "7"
114
119
  }, {
115
120
  label: "红色",
116
121
  value: "2"
@@ -153,6 +158,14 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
153
158
  }
154
159
  }),
155
160
  value: "1"
161
+ }, {
162
+ label: /*#__PURE__*/React.createElement("img", {
163
+ src: xingGrey,
164
+ style: {
165
+ width: "16px"
166
+ }
167
+ }),
168
+ value: "7"
156
169
  }, {
157
170
  label: /*#__PURE__*/React.createElement("img", {
158
171
  src: xingRed,
@@ -0,0 +1,53 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class JstSendGood implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ sortChildField: {
8
+ name: string;
9
+ key: string;
10
+ dataType: string;
11
+ [key: string]: any;
12
+ }[];
13
+ type: string;
14
+ rules: any[];
15
+ componentConfig: ComponentInterface["componentConfig"];
16
+ align: ALignType;
17
+ isCombinationComponent: boolean;
18
+ formField: string;
19
+ canSort: boolean;
20
+ children: ComponentInterface[];
21
+ dataType: ComponentInterface["dataType"];
22
+ suffixKey: string;
23
+ suffixSendId: string;
24
+ suffixSendName: string;
25
+ constructor(options: PickOption);
26
+ getSortChildFields: (type: string, options: PickOption) => any;
27
+ renderClient: (record: Record) => React.JSX.Element | null;
28
+ renderPc: (value: any, record: Record) => React.JSX.Element;
29
+ renderLog: (r: Record) => React.JSX.Element | null;
30
+ getComponentValue: (r: Record) => any;
31
+ renderExport: (value: any, record: any) => any;
32
+ editRender: (p: any) => React.JSX.Element;
33
+ filterConfig: (item: ColumnConfig) => ({
34
+ searchDefaultConditions: "in";
35
+ type: string;
36
+ id: string;
37
+ name: string;
38
+ filterComponentType: "MultipleSelect";
39
+ props: {
40
+ options: any[];
41
+ };
42
+ filterFn: (value: string) => (i: Record) => any;
43
+ } | {
44
+ searchDefaultConditions: "like";
45
+ type: string;
46
+ id: string;
47
+ name: string;
48
+ filterComponentType: "Input";
49
+ filterFn: (value: string) => (i: Record) => any;
50
+ props?: undefined;
51
+ })[];
52
+ }
53
+ export default JstSendGood;
@@ -0,0 +1,213 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ import React from "react";
10
+ import some from "lodash/some";
11
+ import GetFormItem from "../GetFormItem";
12
+ import { JstGoodImage } from "../Common";
13
+ import { JstGoods } from "@kmkf-fe-packages/basic-components";
14
+ import ItemView from "../../commonComponents/ItemView";
15
+ import { isNull, filterFn as _filterFn, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { SYMBOL } from "../../constant";
17
+ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
18
+ var _this = this,
19
+ _this$componentConfig,
20
+ _this$componentConfig2;
21
+ _classCallCheck(this, JstSendGood);
22
+ _defineProperty(this, "name", void 0);
23
+ _defineProperty(this, "id", void 0);
24
+ _defineProperty(this, "sortField", void 0);
25
+ _defineProperty(this, "sortChildField", void 0);
26
+ _defineProperty(this, "type", void 0);
27
+ _defineProperty(this, "rules", void 0);
28
+ _defineProperty(this, "componentConfig", void 0);
29
+ _defineProperty(this, "align", 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, "suffixKey", void 0);
36
+ _defineProperty(this, "suffixSendId", void 0);
37
+ _defineProperty(this, "suffixSendName", void 0);
38
+ _defineProperty(this, "getSortChildFields", function (type, options) {
39
+ if (type === 'all') {
40
+ return [{
41
+ name: "发货仓名称",
42
+ key: "".concat(options.id, "_").concat(_this.suffixSendName),
43
+ dataType: "string"
44
+ }, {
45
+ name: "发货仓编码",
46
+ key: "".concat(options.id, "_").concat(_this.suffixSendId),
47
+ dataType: "string"
48
+ }];
49
+ }
50
+ if (type === 'sendName') {
51
+ return [{
52
+ name: "发货仓名称",
53
+ key: "".concat(options.id, "_").concat(_this.suffixSendName),
54
+ dataType: "string"
55
+ }];
56
+ }
57
+ if (type === 'sendId') {
58
+ return [{
59
+ name: "发货仓编码",
60
+ key: "".concat(options.id, "_").concat(_this.suffixSendId),
61
+ dataType: "string"
62
+ }];
63
+ }
64
+ return [];
65
+ });
66
+ _defineProperty(this, "renderClient", function (record) {
67
+ 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) {
68
+ return !isNull(item);
69
+ }) : false;
70
+ return isShow ? /*#__PURE__*/React.createElement(ItemView, {
71
+ id: _this.id,
72
+ label: _this.name,
73
+ value: /*#__PURE__*/React.createElement(JstGoodImage, {
74
+ list: record === null || record === void 0 ? void 0 : record[_this.id],
75
+ type: 3,
76
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
77
+ })
78
+ }) : null;
79
+ });
80
+ _defineProperty(this, "renderPc", function (value, record) {
81
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)];
82
+ //兼容多个商品
83
+ return /*#__PURE__*/React.createElement("span", {
84
+ onClick: function onClick(e) {
85
+ return e.stopPropagation();
86
+ }
87
+ }, /*#__PURE__*/React.createElement(JstGoodImage, {
88
+ list: list,
89
+ type: 3,
90
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
91
+ }));
92
+ });
93
+ _defineProperty(this, "renderLog", function (r) {
94
+ var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.suffixKey)];
95
+ if (isNull(list)) return null;
96
+ return _this.renderPc(undefined, r);
97
+ });
98
+ _defineProperty(this, "getComponentValue", function (r) {
99
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(_this.suffixKey)];
100
+ });
101
+ _defineProperty(this, "renderExport", function (value, record) {
102
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.suffixKey)];
103
+ return (list || []).map(function (item) {
104
+ return [item === null || item === void 0 ? void 0 : item.sendId, _this.type === 'WDT_SEND_GOOD' ? WdtSendData.getInstance().getWdtSendNameByCode(item === null || item === void 0 ? void 0 : item.sendName) : item === null || item === void 0 ? void 0 : item.sendName].join("/");
105
+ }).join(",");
106
+ });
107
+ _defineProperty(this, "editRender", function (p) {
108
+ return /*#__PURE__*/React.createElement(GetFormItem, {
109
+ title: _this.name,
110
+ name: _this.id,
111
+ rules: _this.rules,
112
+ required: false,
113
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
114
+ display: p === null || p === void 0 ? void 0 : p.display,
115
+ component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
116
+ type: 3,
117
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
118
+ }))
119
+ });
120
+ });
121
+ _defineProperty(this, "filterConfig", function (item) {
122
+ return [_this.type === 'WDT_SEND_GOOD' ? {
123
+ searchDefaultConditions: SYMBOL.in,
124
+ type: item.type,
125
+ id: "".concat(item.id, "_").concat(_this.suffixSendName),
126
+ name: "".concat(_this.name, "\u540D\u79F0"),
127
+ filterComponentType: "MultipleSelect",
128
+ props: {
129
+ options: WdtSendData.getInstance().getWdtSendData() || []
130
+ },
131
+ filterFn: function filterFn(value) {
132
+ return function (i) {
133
+ var _ref;
134
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "sendName").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
135
+ var _String;
136
+ var sendName = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
137
+ return sendName;
138
+ });
139
+ };
140
+ }
141
+ } : {
142
+ searchDefaultConditions: SYMBOL.like,
143
+ type: item.type,
144
+ id: "".concat(item.id, "_").concat(_this.suffixSendName),
145
+ name: "".concat(_this.name, "\u540D\u79F0"),
146
+ filterComponentType: "Input",
147
+ filterFn: function filterFn(value) {
148
+ return function (i) {
149
+ var _ref2;
150
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, _this.suffixKey) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
151
+ var _String2;
152
+ var name = item !== null && item !== void 0 && item.sendName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.sendName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
153
+ return name;
154
+ });
155
+ };
156
+ }
157
+ }, {
158
+ searchDefaultConditions: SYMBOL.like,
159
+ type: item.type,
160
+ id: "".concat(item.id, "_").concat(_this.suffixSendId),
161
+ name: "".concat(_this.name, "\u7F16\u7801"),
162
+ filterComponentType: "Input",
163
+ filterFn: function filterFn(value) {
164
+ return function (i) {
165
+ var _ref3;
166
+ return (_ref3 = _filterFn.filterTableListItemColumnValue(i, item.id, _this.suffixKey) || []) === null || _ref3 === void 0 ? void 0 : _ref3.some(function (item) {
167
+ var _String3;
168
+ var id = item !== null && item !== void 0 && item.sendId ? (_String3 = String(item === null || item === void 0 ? void 0 : item.sendId)) === null || _String3 === void 0 ? void 0 : _String3.includes(value) : false;
169
+ return id;
170
+ });
171
+ };
172
+ }
173
+ }];
174
+ });
175
+ this.name = _options.name;
176
+ this.id = _options.id;
177
+ this.suffixKey = 'kmSendGood';
178
+ this.suffixSendId = 'kmSendId';
179
+ this.suffixSendName = 'kmSendName';
180
+ this.sortField = "".concat(_options.id, "_").concat(this.suffixKey);
181
+ this.formField = "".concat(_options.id, "_").concat(this.suffixKey);
182
+ this.componentConfig = _options.componentConfig;
183
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig = this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showField) || '', _options);
184
+ this.type = _options.type;
185
+ this.dataType = "object";
186
+ this.rules = (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
187
+ required: true,
188
+ validator: function validator(_, value) {
189
+ if (!value || !value.length) {
190
+ return Promise.reject(new Error("请选择宝贝"));
191
+ }
192
+ var hasNo = (value || []).some(function (item) {
193
+ var _this$componentConfig3, _this$componentConfig4;
194
+ if (["sendName"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "")) {
195
+ return item.sendName;
196
+ } else if (["sendId"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "")) {
197
+ return item.sendId;
198
+ } else {
199
+ return item.sendId && item.sendName;
200
+ }
201
+ });
202
+ if (!hasNo) {
203
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684\u53D1\u8D27\u4ED3\u4FE1\u606F"));
204
+ }
205
+ return Promise.resolve();
206
+ }
207
+ }] : [];
208
+ this.align = "left";
209
+ this.isCombinationComponent = false;
210
+ this.canSort = false;
211
+ this.children = [];
212
+ });
213
+ export default JstSendGood;
@@ -27,7 +27,20 @@ declare class Label implements ComponentInterface {
27
27
  }>) => React.JSX.Element;
28
28
  renderPc: (value: any, record: Record) => React.JSX.Element;
29
29
  renderLog: (r: Record) => React.JSX.Element;
30
- renderExport: (value: any, record: Record) => any;
31
- filterConfig: (item: ColumnConfig) => never[];
30
+ renderExport: (value: any, record: Record) => string;
31
+ filterConfig: (item: ColumnConfig) => {
32
+ searchDefaultConditions: "in";
33
+ type: string;
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "MultipleSelect";
37
+ props: {
38
+ options: any;
39
+ };
40
+ filterFn: (value: string) => (i: Record) => boolean;
41
+ };
42
+ formDataTransform: (v: Array<{
43
+ labelShowName: string;
44
+ }>) => string[];
32
45
  }
33
46
  export default Label;
@@ -8,9 +8,12 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
8
8
  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); }
9
9
  import React from "react";
10
10
  import { Tag, Select, Space } from 'antd';
11
- import { LabelData, isNull } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { groupBy } from 'lodash';
12
+ import { LabelData, isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
13
+ import intersection from "lodash/intersection";
12
14
  import GetFormItem from "../GetFormItem";
13
15
  import ItemView from "../../commonComponents/ItemView";
16
+ import { SYMBOL } from "../../constant";
14
17
  var EditRenderItem = function EditRenderItem(props) {
15
18
  var value = props.value;
16
19
  var tagRender = function tagRender(prop) {
@@ -90,14 +93,17 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
90
93
  }) : null;
91
94
  });
92
95
  _defineProperty(this, "showDetail", function (value) {
96
+ var _Object$keys;
93
97
  return /*#__PURE__*/React.createElement(Space, {
94
98
  style: {
95
99
  flexWrap: 'wrap'
96
100
  }
97
- }, Array.isArray(value) ? value === null || value === void 0 ? void 0 : value.map(function (v) {
101
+ }, Array.isArray(value) ? (_Object$keys = Object.keys(groupBy(value, function (item) {
102
+ return item.labelShowName;
103
+ }))) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (labelShowName) {
98
104
  var _this$labelDateInstan;
99
105
  var label = ((_this$labelDateInstan = _this.labelDateInstance.labelData) === null || _this$labelDateInstan === void 0 ? void 0 : _this$labelDateInstan.find(function (item) {
100
- return item.value === (v === null || v === void 0 ? void 0 : v.labelShowName);
106
+ return item.value === labelShowName;
101
107
  })) || {};
102
108
  if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
103
109
  color: label === null || label === void 0 ? void 0 : label.color
@@ -112,13 +118,34 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
112
118
  return _this.renderPc(undefined, r);
113
119
  });
114
120
  _defineProperty(this, "renderExport", function (value, record) {
115
- var _record, _record$map;
116
- return record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : (_record$map = _record.map(function (item) {
121
+ var _Array$from, _record;
122
+ return (_Array$from = Array.from(new Set(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : _record.map(function (item) {
117
123
  return item === null || item === void 0 ? void 0 : item.labelShowName;
118
- })) === null || _record$map === void 0 ? void 0 : _record$map.join('、');
124
+ })))) === null || _Array$from === void 0 ? void 0 : _Array$from.join('、');
119
125
  });
120
126
  _defineProperty(this, "filterConfig", function (item) {
121
- return [];
127
+ return {
128
+ searchDefaultConditions: SYMBOL.in,
129
+ type: item.type,
130
+ id: "".concat(item.id, "_label"),
131
+ // 过滤组件id
132
+ name: item.name,
133
+ // 过滤组件名称
134
+ filterComponentType: "MultipleSelect",
135
+ props: {
136
+ options: _this.labelDateInstance.labelData || []
137
+ },
138
+ filterFn: function filterFn(value) {
139
+ return function (i) {
140
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "label")).length > 0;
141
+ };
142
+ }
143
+ };
144
+ });
145
+ _defineProperty(this, "formDataTransform", function (v) {
146
+ return v === null || v === void 0 ? void 0 : v.map(function (item) {
147
+ return item.labelShowName;
148
+ });
122
149
  });
123
150
  this.name = options.name;
124
151
  this.id = options.id;
@@ -48,7 +48,8 @@ var msgTypeCh = {
48
48
  ding: '钉钉',
49
49
  wechat: '微信',
50
50
  qq: 'QQ',
51
- qywx: '企业微信'
51
+ qywx: '企业微信',
52
+ YZDKH: '邮政大客户'
52
53
  };
53
54
  var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
54
55
  var _this = this,
@@ -112,6 +112,9 @@ var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
112
112
  display: p === null || p === void 0 ? void 0 : p.display,
113
113
  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,
114
114
  component: /*#__PURE__*/React.createElement(CommonStatus, _extends({}, _this.componentConfig, {
115
+ style: {
116
+ width: 200
117
+ },
115
118
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
116
119
  failValue: selectTypeMap[_this.type].failValue
117
120
  }))