@kmkf-fe-packages/services-components 1.25.2 → 1.26.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.
@@ -20,8 +20,7 @@ import { CopyToClipboard } from "react-copy-to-clipboard";
20
20
  import styles from "./index.module.less";
21
21
  import defaultImg from "./img/default-img.png";
22
22
  import CopyText from "../../commonComponents/CopyText";
23
- import { KM_SYSTEM_ORDER_CONFIG } from "@kmkf-fe-packages/kmkf-utils";
24
- import { getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
23
+ import { KM_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
25
24
  var Paragraph = Typography.Paragraph;
26
25
  export var getFormItem = function getFormItem(_ref) {
27
26
  var name = _ref.name,
@@ -1419,15 +1418,6 @@ export var MsgContent = function MsgContent(_ref14) {
1419
1418
  failValue = _ref14.failValue,
1420
1419
  _ref14$options = _ref14.options,
1421
1420
  options = _ref14$options === void 0 ? [] : _ref14$options;
1422
- var msgTypeCh = {
1423
- ding: "钉钉",
1424
- wechat: "微信",
1425
- qq: "QQ",
1426
- qywx: "企业微信",
1427
- YZDKH: "邮政拦截",
1428
- YT: "圆通拦截",
1429
- feishu: "飞书"
1430
- };
1431
1421
  var getColorByStatus = function getColorByStatus(value) {
1432
1422
  var _options$find2;
1433
1423
  return ((_options$find2 = options.find(function (innerItem) {
@@ -20,42 +20,48 @@ var typeMap = {
20
20
  name: "jst",
21
21
  sendId: "sendId",
22
22
  sendName: "sendName",
23
- platformType: 'default'
23
+ platformType: 'default',
24
+ dataType: "arrayObject"
24
25
  },
25
26
  BS_SEND_GOOD: {
26
27
  key: "bsSendGood",
27
28
  name: "bs",
28
29
  sendId: "bsSendId",
29
30
  sendName: "bsSendName",
30
- platformType: 'default'
31
+ platformType: 'default',
32
+ dataType: "arrayObject"
31
33
  },
32
34
  BS_E3_SEND_GOOD: {
33
35
  key: "bsE3SendGood",
34
36
  name: "bsE3",
35
37
  sendId: "bsE3SendId",
36
38
  sendName: "bsE3SendName",
37
- platformType: 'bsE3'
39
+ platformType: 'bsE3',
40
+ dataType: "arrayObject"
38
41
  },
39
42
  WLN_SEND_GOOD: {
40
43
  key: "wlnSendGood",
41
44
  name: "wln",
42
45
  sendId: "wlnSendId",
43
46
  sendName: "wlnSendName",
44
- platformType: 'default'
47
+ platformType: 'default',
48
+ dataType: "arrayObject"
45
49
  },
46
50
  KM_SEND_GOOD: {
47
51
  key: "kmSendGood",
48
52
  name: "km",
49
53
  sendId: "kmSendId",
50
54
  sendName: "kmSendName",
51
- platformType: 'km'
55
+ platformType: 'km',
56
+ dataType: "weakenArray"
52
57
  },
53
58
  WDT_SEND_GOOD: {
54
59
  key: "wdtSendGood",
55
60
  name: "wdt",
56
61
  sendId: "wdtSendId",
57
62
  sendName: "wdtSendName",
58
- platformType: 'wdt'
63
+ platformType: 'wdt',
64
+ dataType: "weakenArray"
59
65
  }
60
66
  };
61
67
  var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
@@ -63,6 +69,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
63
69
  _typeMap$_options$typ,
64
70
  _typeMap$_options$typ2,
65
71
  _this$componentConfig3,
72
+ _typeMap$_options$typ3,
66
73
  _this$componentConfig4;
67
74
  _classCallCheck(this, JstSendGood);
68
75
  _defineProperty(this, "name", void 0);
@@ -80,17 +87,17 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
80
87
  _defineProperty(this, "dataType", void 0);
81
88
  _defineProperty(this, "format", void 0);
82
89
  _defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
83
- var _typeMap$options$type, _typeMap$options$type2;
90
+ var _typeMap$options$type, _typeMap$options$type2, _typeMap$options$type3;
84
91
  var sendName = {
85
92
  name: "发货仓名称",
86
93
  key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
87
- dataType: "arrayObject",
94
+ dataType: (_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.dataType,
88
95
  disabled: type === 'sendId'
89
96
  };
90
97
  var sendId = {
91
98
  name: "发货仓编码",
92
- key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
93
- dataType: "arrayObject",
99
+ key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.sendId),
100
+ dataType: 'arrayObject',
94
101
  disabled: type === 'sendName'
95
102
  };
96
103
  sendName.options = fieldType && SendDataCenter.getInstance(fieldType).getSendData();
@@ -220,7 +227,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
220
227
  this.componentConfig = _options.componentConfig;
221
228
  this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
222
229
  this.type = _options.type;
223
- this.dataType = "arrayObject";
230
+ this.dataType = (_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.dataType;
224
231
  this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
225
232
  required: true,
226
233
  validator: function validator(_, value) {
@@ -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 MsgStatus 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
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
16
- options: ComponentInterface['options'];
15
+ dataType: ComponentInterface["dataType"];
16
+ options: ComponentInterface["options"];
17
17
  constructor(options: PickOption);
18
18
  renderClient: (record: any) => React.JSX.Element | null;
19
19
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -8,61 +8,52 @@ 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 some from 'lodash/some';
11
+ import React from "react";
12
+ import some from "lodash/some";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import { MsgContent } from "../Common";
15
- import { MsgStatus as Status } from '@kmkf-fe-packages/basic-components';
15
+ import { MsgStatus as Status } from "@kmkf-fe-packages/basic-components";
16
16
  import ItemView from "../../commonComponents/ItemView";
17
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
+ import { isNull, filterFn as _filterFn, msgTypeCh } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { SYMBOL } from "../../constant";
19
19
  var typeMap = {
20
20
  MSG_STATUS: {
21
21
  options: [{
22
- oldValue: '发送成功',
23
- value: '执行成功',
24
- label: '执行成功',
25
- color: '#52c41a'
22
+ oldValue: "发送成功",
23
+ value: "执行成功",
24
+ label: "执行成功",
25
+ color: "#52c41a"
26
26
  }, {
27
- oldValue: '已发送',
28
- value: '执行中',
29
- label: '执行中',
30
- color: '#52c41a'
27
+ oldValue: "已发送",
28
+ value: "执行中",
29
+ label: "执行中",
30
+ color: "#52c41a"
31
31
  }, {
32
- oldValue: '发送失败',
33
- value: '执行失败',
34
- label: '执行失败',
35
- color: '#ff4d4f'
32
+ oldValue: "发送失败",
33
+ value: "执行失败",
34
+ label: "执行失败",
35
+ color: "#ff4d4f"
36
36
  }, {
37
- oldValue: '等待发送',
38
- value: '等待执行',
39
- label: '等待执行',
40
- color: '#e7780f'
37
+ oldValue: "等待发送",
38
+ value: "等待执行",
39
+ label: "等待执行",
40
+ color: "#e7780f"
41
41
  }, {
42
- oldValue: '等待发送',
43
- value: '不满足条件,无需执行',
44
- label: '不满足条件,无需执行',
45
- color: '#8A8A8A'
42
+ oldValue: "等待发送",
43
+ value: "不满足条件,无需执行",
44
+ label: "不满足条件,无需执行",
45
+ color: "#8A8A8A"
46
46
  }],
47
- key: 'msgStatusValues',
48
- code: 'msgStatus4Search',
49
- name: '任务状态',
47
+ key: "msgStatusValues",
48
+ code: "msgStatus4Search",
49
+ name: "任务状态",
50
50
  type: 1,
51
- valueKey: 'status',
52
- idKey: 'systemOrderId',
51
+ valueKey: "status",
52
+ idKey: "systemOrderId",
53
53
  // 添加 发送失败 是为了兼容老数据
54
- failValue: ['执行失败', '发送失败']
54
+ failValue: ["执行失败", "发送失败"]
55
55
  }
56
56
  };
57
- var msgTypeCh = {
58
- ding: '钉钉',
59
- wechat: '微信',
60
- qq: 'QQ',
61
- qywx: '企业微信',
62
- YZDKH: '邮政拦截',
63
- YT: '圆通拦截',
64
- feishu: "飞书"
65
- };
66
57
  var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
67
58
  var _this = this,
68
59
  _typeMap$options$type,
@@ -133,9 +124,9 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
133
124
  var _typeMap$_this$type14;
134
125
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
135
126
  });
136
- var key = item.msgType || 'ding';
137
- return "".concat(msgTypeCh[key], "-").concat(item.ruleName, ":").concat(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]) || '');
138
- }).join(',');
127
+ var key = item.msgType || "ding";
128
+ return "".concat(msgTypeCh[key], "-").concat(item.ruleName, ":").concat(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]) || "");
129
+ }).join(",");
139
130
  });
140
131
  _defineProperty(this, "editRender", function (p) {
141
132
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type16;
@@ -146,7 +137,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
146
137
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
147
138
  display: p === null || p === void 0 ? void 0 : p.display,
148
139
  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,
149
- 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 : '',
140
+ 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 : "",
150
141
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
151
142
  type: (_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.type,
152
143
  failValue: typeMap[_this.type].failValue
@@ -160,12 +151,12 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
160
151
  type: item.type,
161
152
  id: "".concat(item.id, "_").concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.code),
162
153
  name: "".concat(_this.name),
163
- filterComponentType: 'MultipleSelect',
154
+ filterComponentType: "MultipleSelect",
164
155
  props: {
165
156
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
166
157
  fieldNames: {
167
- label: 'label',
168
- value: 'value'
158
+ label: "label",
159
+ value: "value"
169
160
  }
170
161
  },
171
162
  filterFn: function filterFn(value) {
@@ -187,7 +178,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
187
178
  this.isCombinationComponent = false;
188
179
  this.canSort = false;
189
180
  this.children = [];
190
- this.dataType = 'weakenArray';
181
+ this.dataType = "weakenArray";
191
182
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
192
183
  required: true,
193
184
  validator: function validator(_, value) {
@@ -202,7 +193,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
202
193
  return Promise.resolve();
203
194
  }
204
195
  }] : [];
205
- this.align = 'left';
196
+ this.align = "left";
206
197
  this.options = (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.options;
207
198
  });
208
199
  export default MsgStatus;
@@ -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, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsLogistics | CommonSystemOrder | ItemEnCode | JstSendGood | MsgStatus | ReissueLogistics | 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 | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => BsSystemOrder | JstSendGood | MsgStatus | BasicPosting | ReissueLogistics | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsGoods | BsE3Goods | 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.25.2",
3
+ "version": "1.26.1",
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": "1.25.2",
25
- "@kmkf-fe-packages/kmkf-utils": "1.25.2",
24
+ "@kmkf-fe-packages/basic-components": "1.26.1",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.26.1",
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": "b4ff6dc6968a7982ce86c447e3b40b75b045c2c7",
44
+ "gitHead": "e7853cbf5b2a779e8c785541968cf0b1e0fbb033",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }