@kmkf-fe-packages/services-components 0.12.0-alpha.3 → 0.12.0-alpha.4

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.
@@ -270,6 +270,9 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
270
270
  var color = ((_options$find = options.find(function (item) {
271
271
  return item[valueKey] === failValue;
272
272
  })) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
273
+ var currentOption = options.find(function (option) {
274
+ return item[valueKey] === option.value;
275
+ });
273
276
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
274
277
  content: orderContent(item, index),
275
278
  overlayStyle: {
@@ -285,7 +288,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
285
288
  style: {
286
289
  color: color
287
290
  }
288
- }, (item === null || item === void 0 ? void 0 : item[valueKey]) || '')), item.reason && (item === null || item === void 0 ? void 0 : item[valueKey]) !== "成功" && /*#__PURE__*/React.createElement("div", {
291
+ }, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '')), item.reason && (item === null || item === void 0 ? void 0 : item[valueKey]) !== "成功" && /*#__PURE__*/React.createElement("div", {
289
292
  className: "c-red"
290
293
  }, item.reason));
291
294
  }) : null;
@@ -52,6 +52,28 @@ var typeMap = {
52
52
  valueKey: 'status',
53
53
  idKey: 'systemOrderId',
54
54
  failValue: '失败'
55
+ },
56
+ WAREHOUSING_STATUS: {
57
+ options: [{
58
+ value: 2,
59
+ label: '已入库',
60
+ color: '#52c41a'
61
+ }, {
62
+ value: 1,
63
+ label: '部分入库',
64
+ color: '#e7780f'
65
+ }, {
66
+ value: 0,
67
+ label: '未入库',
68
+ color: '#ff4d4f'
69
+ }],
70
+ key: 'inStockStatusItemList',
71
+ code: 'inStockStatusList',
72
+ name: '退货入库状态',
73
+ type: 2,
74
+ valueKey: 'status',
75
+ idKey: 'systemOrderId',
76
+ failValue: '失败'
55
77
  }
56
78
  };
57
79
  var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
@@ -117,12 +139,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
117
139
  var _typeMap$_this$type10;
118
140
  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)];
119
141
  return (list || []).map(function (item) {
120
- var _typeMap$_this$type11, _typeMap$_this$type12;
121
- return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.idKey], ":").concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.valueKey]);
142
+ var _typeMap$_this$type11, _typeMap$_this$type12, _typeMap$_this$type13, _typeMap$_this$type15, _typeMap$_this$type16;
143
+ 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
+ var _typeMap$_this$type14;
145
+ return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
146
+ });
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.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]);
122
148
  }).join(',');
123
149
  });
124
150
  _defineProperty(this, "editRender", function (p) {
125
- var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type13;
151
+ var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type17;
126
152
  return /*#__PURE__*/React.createElement(GetFormItem, {
127
153
  title: _this.name,
128
154
  name: _this.id,
@@ -130,23 +156,23 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
130
156
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
131
157
  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,
132
158
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
133
- type: (_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.type,
159
+ type: (_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.type,
134
160
  failValue: typeMap[_this.type].failValue
135
161
  }))
136
162
  });
137
163
  });
138
164
  _defineProperty(this, "filterConfig", function (item) {
139
- var _typeMap$_this$type14;
165
+ var _typeMap$_this$type18;
140
166
  return {
141
167
  searchDefaultConditions: SYMBOL.like,
142
168
  type: item.type,
143
- id: "".concat(item.id, "_").concat((_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.code),
169
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
144
170
  name: "".concat(_this.name),
145
171
  filterComponentType: 'Input',
146
172
  filterFn: function filterFn(value) {
147
173
  return function (i) {
148
- var _typeMap$_this$type15;
149
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.code), value);
174
+ var _typeMap$_this$type19;
175
+ 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);
150
176
  };
151
177
  }
152
178
  };
@@ -167,12 +193,12 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
167
193
  required: true,
168
194
  validator: function validator(_, value) {
169
195
  var hasNo = (value || []).some(function (item) {
170
- var _typeMap$_this$type16;
171
- return item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey];
196
+ var _typeMap$_this$type20;
197
+ return item[(_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.valueKey];
172
198
  });
173
199
  if (!hasNo) {
174
- var _typeMap$_this$type17;
175
- return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684".concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.name)));
200
+ var _typeMap$_this$type21;
201
+ 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)));
176
202
  }
177
203
  return Promise.resolve();
178
204
  }
@@ -1,3 +1,3 @@
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, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from './index';
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) => BsExchange | BsLogistics | BsReissue | 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 | BsReturn | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | CommonTradeId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
3
+ export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | 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 | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
@@ -1,4 +1,6 @@
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, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
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,
2
+ // CommonTradeId,
3
+ CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from "./index";
2
4
  export var factory = function factory(type, options) {
3
5
  var _options$componentCon;
4
6
  switch (type) {
@@ -130,9 +132,9 @@ export var factory = function factory(type, options) {
130
132
  return new BsReissue(options);
131
133
  case 'BS_RETURN_GOODS':
132
134
  return new BsReturn(options);
133
- // case 'REISSUE_TRADE_ID':
134
135
  case 'BS_DELIVERY_NO':
135
136
  case 'RETURN_GOODS_TRADE_ID':
137
+ case 'REISSUE_TRADE_ID':
136
138
  case 'EXCHANGE_TRADE_ID':
137
139
  return new CommonSystemOrder(options);
138
140
  case 'BS_LOGISTICS':
@@ -149,10 +151,11 @@ export var factory = function factory(type, options) {
149
151
  return new StatusSelect(options);
150
152
  case 'RETURN_GOODS_STATUS':
151
153
  case 'EXCHANGE_STATUS':
154
+ case 'WAREHOUSING_STATUS':
152
155
  return new CommonMultiStatus(options);
153
- case 'REISSUE_TRADE_ID':
154
- // case 'EXCHANGE_TRADE_ID':
155
- return new CommonTradeId(options);
156
+ // case 'REISSUE_TRADE_ID':
157
+ // case 'EXCHANGE_TRADE_ID':
158
+ // return new CommonTradeId(options)
156
159
  case 'NUMERICAL_CALCULATION':
157
160
  return new Calculation(options);
158
161
  case 'NODE_DEAD_LINE_INPUT':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.12.0-alpha.3",
3
+ "version": "0.12.0-alpha.4",
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.12.0-alpha.0",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.12.0-alpha.0"
29
+ "@kmkf-fe-packages/basic-components": "^0.12.0-alpha.4",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.12.0-alpha.4"
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": "4dc9fbc169377f53164f33d87a83ac7ef18f81c6"
43
+ "gitHead": "3591e470c205df0cfc3058b422616a79d03395e3"
44
44
  }