@kmkf-fe-packages/services-components 2.2.1 → 2.2.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.
@@ -1,18 +1,18 @@
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 CommonMultiStatus 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'];
15
+ dataType: ComponentInterface["dataType"];
16
16
  isSingleValue: boolean;
17
17
  constructor(options: PickOption);
18
18
  renderClient: (record: any) => React.JSX.Element | null;
@@ -8,100 +8,131 @@ 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 { CommonOrderContent } from "../Common";
15
- import { CommonMultiStatus as Status } from '@kmkf-fe-packages/basic-components';
15
+ import { CommonMultiStatus 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 } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { SEARCH_OPTIONS_V2, SYMBOL } from "../../constant";
19
19
  var typeMap = {
20
20
  RETURN_GOODS_STATUS: {
21
21
  options: [{
22
- value: '成功',
23
- label: '成功',
24
- color: '#52c41a'
22
+ value: "成功",
23
+ label: "成功",
24
+ color: "#52c41a"
25
25
  }, {
26
- value: '失败',
27
- label: '失败',
28
- color: '#ff4d4f'
26
+ value: "失败",
27
+ label: "失败",
28
+ color: "#ff4d4f"
29
29
  }],
30
- key: 'returnGoodsStatusList',
31
- code: 'returnGoodsStatusValue',
32
- name: '退货状态',
30
+ key: "returnGoodsStatusList",
31
+ code: "returnGoodsStatusValue",
32
+ name: "退货状态",
33
33
  type: 1,
34
- valueKey: 'status',
35
- idKey: 'systemOrderId',
36
- failValue: '失败'
34
+ valueKey: "status",
35
+ idKey: "systemOrderId",
36
+ failValue: "失败"
37
37
  },
38
38
  EXCHANGE_STATUS: {
39
39
  options: [{
40
- value: '成功',
41
- label: '成功',
42
- color: '#52c41a'
40
+ value: "成功",
41
+ label: "成功",
42
+ color: "#52c41a"
43
43
  }, {
44
- value: '失败',
45
- label: '失败',
46
- color: '#ff4d4f'
44
+ value: "失败",
45
+ label: "失败",
46
+ color: "#ff4d4f"
47
47
  }],
48
- key: 'exchangeReason',
49
- code: 'exchangeStatusValue',
50
- name: '换货状态',
48
+ key: "exchangeReason",
49
+ code: "exchangeStatusValue",
50
+ name: "换货状态",
51
51
  type: 1,
52
- valueKey: 'status',
53
- idKey: 'systemOrderId',
54
- failValue: '失败'
52
+ valueKey: "status",
53
+ idKey: "systemOrderId",
54
+ failValue: "失败"
55
55
  },
56
56
  WAREHOUSING_STATUS: {
57
57
  options: [{
58
- value: '2',
59
- label: '已入库',
60
- color: '#52c41a'
58
+ value: "2",
59
+ label: "已入库",
60
+ color: "#52c41a"
61
61
  }, {
62
- value: '1',
63
- label: '部分入库',
64
- color: '#e7780f'
62
+ value: "1",
63
+ label: "部分入库",
64
+ color: "#e7780f"
65
65
  }, {
66
- value: '0',
67
- label: '未入库',
68
- color: '#ff4d4f'
66
+ value: "0",
67
+ label: "未入库",
68
+ color: "#ff4d4f"
69
69
  }],
70
- key: 'inStockStatusItemList',
71
- code: 'inStockStatusList',
72
- name: '商品入库状态(勿填)',
70
+ key: "inStockStatusItemList",
71
+ code: "inStockStatusList",
72
+ name: "商品入库状态(勿填)",
73
73
  type: 2,
74
- valueKey: 'status',
75
- idKey: 'systemOrderId',
76
- failValue: '失败',
77
- dataType: 'array_object'
74
+ valueKey: "status",
75
+ idKey: "systemOrderId",
76
+ failValue: "失败",
77
+ dataType: "array_object"
78
78
  },
79
79
  BS_E3_WAREHOUSING_STATUS: {
80
80
  options: [{
81
- value: '2',
82
- label: '已入库',
83
- color: '#52c41a'
81
+ value: "2",
82
+ label: "已入库",
83
+ color: "#52c41a"
84
84
  }, {
85
- value: '1',
86
- label: '部分入库',
87
- color: '#e7780f'
85
+ value: "1",
86
+ label: "部分入库",
87
+ color: "#e7780f"
88
88
  }, {
89
- value: '0',
90
- label: '未入库',
91
- color: '#ff4d4f'
89
+ value: "0",
90
+ label: "未入库",
91
+ color: "#ff4d4f"
92
92
  }, {
93
- value: '3',
94
- label: '已退回给客户',
95
- color: '#1B5BF3'
93
+ value: "3",
94
+ label: "已退回给客户",
95
+ color: "#1B5BF3"
96
96
  }],
97
- key: 'bsE3InStockStatusItemList',
98
- code: 'bsE3InStockStatusList',
99
- name: '商品入库状态',
97
+ key: "bsE3InStockStatusItemList",
98
+ code: "bsE3InStockStatusList",
99
+ name: "商品入库状态",
100
100
  type: 2,
101
- valueKey: 'status',
102
- idKey: 'systemOrderId',
103
- failValue: '失败',
104
- dataType: 'array_object'
101
+ valueKey: "status",
102
+ idKey: "systemOrderId",
103
+ failValue: "失败",
104
+ dataType: "array_object"
105
+ },
106
+ WDT_WAREHOUSING_STATUS: {
107
+ options: [{
108
+ value: "0",
109
+ label: "无需入库",
110
+ color: "#333333"
111
+ }, {
112
+ value: "1",
113
+ label: "待入库",
114
+ color: "#ff4d4f"
115
+ }, {
116
+ value: "2",
117
+ label: "部分入库",
118
+ color: "#e7780f"
119
+ }, {
120
+ value: "3",
121
+ label: "全部入库",
122
+ color: "#52c41a"
123
+ }, {
124
+ value: "4",
125
+ label: "终止入库",
126
+ color: "#1B5BF3"
127
+ }],
128
+ key: "wdtInStockStatusItemList",
129
+ code: "wdtInStockStatusList",
130
+ name: "商品入库状态",
131
+ type: 2,
132
+ valueKey: "status",
133
+ idKey: "systemOrderId",
134
+ failValue: "失败",
135
+ dataType: "array_object"
105
136
  }
106
137
  };
107
138
  var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
@@ -180,10 +211,10 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
180
211
  });
181
212
  if (_this.isSingleValue) {
182
213
  var _typeMap$_this$type15;
183
- 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]) || '';
214
+ 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]) || "";
184
215
  }
185
- 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]) || '');
186
- }).join(',');
216
+ 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]) || "");
217
+ }).join(",");
187
218
  });
188
219
  _defineProperty(this, "editRender", function (p) {
189
220
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
@@ -194,7 +225,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
194
225
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
195
226
  display: p === null || p === void 0 ? void 0 : p.display,
196
227
  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,
197
- 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 : '',
228
+ 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 : "",
198
229
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
199
230
  type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
200
231
  failValue: typeMap[_this.type].failValue
@@ -204,16 +235,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
204
235
  _defineProperty(this, "filterConfig", function (item) {
205
236
  var _typeMap$_this$type19, _item$templateConfig;
206
237
  return {
207
- searchDefaultConditions: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
238
+ searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
208
239
  type: item.type,
209
240
  id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
210
241
  name: "".concat(_this.name),
211
- filterComponentType: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? 'MultipleSelect' : 'SelectInput',
242
+ filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
212
243
  props: {
213
244
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
214
245
  fieldNames: {
215
- label: 'label',
216
- value: 'value'
246
+ label: "label",
247
+ value: "value"
217
248
  },
218
249
  filterOptions: SEARCH_OPTIONS_V2
219
250
  },
@@ -223,8 +254,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
223
254
  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);
224
255
  };
225
256
  },
226
- formatFilterValue: ['BS_E3_WAREHOUSING_STATUS', 'WAREHOUSING_STATUS'].includes(_this.type) ? null : function (value) {
227
- if (value.type === 'in') {
257
+ formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
258
+ if (value.type === "in") {
228
259
  return value.keywords;
229
260
  } else {
230
261
  return value;
@@ -243,7 +274,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
243
274
  this.isCombinationComponent = false;
244
275
  this.canSort = false;
245
276
  this.children = [];
246
- this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : 'object';
277
+ this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : "object";
247
278
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
248
279
  required: true,
249
280
  validator: function validator(_, value) {
@@ -258,7 +289,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
258
289
  return Promise.resolve();
259
290
  }
260
291
  }] : [];
261
- this.align = 'left';
262
- this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === 'wdt' || this.type === 'BS_E3_WAREHOUSING_STATUS';
292
+ this.align = "left";
293
+ this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS" || this.type === "WDT_WAREHOUSING_STATUS";
263
294
  });
264
295
  export default CommonMultiStatus;
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | BuyerNick | BasicCheckbox | BasicFile | FlowTag | GyGoods | GyReissue | GyReturn | JstSendGood | MsgStatus | BasicMultSelect | PublicGoods | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicPicturePro | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | 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 | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | AsyncSelect;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | BuyerNick | BasicCheckbox | CommonMultiStatus | BasicFile | FlowTag | GyGoods | GyReissue | GyReturn | JstSendGood | MsgStatus | BasicMultSelect | PublicGoods | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicPicturePro | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | AsyncSelect;
@@ -220,6 +220,7 @@ export var factory = function factory(type, options) {
220
220
  case "EXCHANGE_STATUS":
221
221
  case "WAREHOUSING_STATUS":
222
222
  case "BS_E3_WAREHOUSING_STATUS":
223
+ case "WDT_WAREHOUSING_STATUS":
223
224
  return new CommonMultiStatus(options);
224
225
  case "MSG_STATUS":
225
226
  return new MsgStatus(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.2.1",
25
- "@kmkf-fe-packages/kmkf-utils": "2.2.1",
24
+ "@kmkf-fe-packages/basic-components": "2.2.2",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.2.2",
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": "b37647c66086182f9995b97478b26a9c892f63b9",
44
+ "gitHead": "e64669cc6f32f9d152afbb1af40c8d10da055f04",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }