@kmkf-fe-packages/services-components 2.2.25 → 2.2.26

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.
@@ -16,6 +16,7 @@ declare class BasicSelect implements ComponentInterface {
16
16
  optionsMap: ComponentInterface["optionsMap"];
17
17
  constructor(options: PickOption);
18
18
  getKeyByComponentType: (type: string) => any;
19
+ getIsValue: () => boolean;
19
20
  editRender: (p: any) => React.JSX.Element;
20
21
  renderClient: (record: any) => React.JSX.Element | null;
21
22
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -34,11 +34,14 @@ var typeMap = {
34
34
  },
35
35
  ERP_ORDER_STATUS: {
36
36
  key: "erpOrderStatus"
37
+ },
38
+ JST_OUTBOUND_STATUS: {
39
+ key: "jstOutboundStatus"
37
40
  }
38
41
  };
39
42
  var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
40
43
  var _this = this,
41
- _this$componentConfig8,
44
+ _this$componentConfig6,
42
45
  _this$options;
43
46
  _classCallCheck(this, BasicSelect);
44
47
  _defineProperty(this, "name", void 0);
@@ -57,16 +60,20 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
57
60
  _defineProperty(this, "getKeyByComponentType", function (type) {
58
61
  return typeMap[type].key || "";
59
62
  });
63
+ _defineProperty(this, "getIsValue", function () {
64
+ var _this$componentConfig;
65
+ return ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.webUniqueKey) === "PLATFORM_STATUS" || _this.type === "JST_OUTBOUND_STATUS";
66
+ });
60
67
  _defineProperty(this, "editRender", function (p) {
61
- var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
68
+ var _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
62
69
  return /*#__PURE__*/React.createElement(GetFormItem, {
63
70
  title: _this.name,
64
71
  name: _this.id,
65
72
  rules: _this.rules,
66
73
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
67
74
  display: p === null || p === void 0 ? void 0 : p.display,
68
- 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,
69
- 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 : "",
75
+ required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
76
+ tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
70
77
  component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
71
78
  placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
72
79
  showSearch: true,
@@ -75,9 +82,10 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
75
82
  });
76
83
  });
77
84
  _defineProperty(this, "renderClient", function (record) {
78
- var _this$componentConfig5, _this$optionsMap;
85
+ var _this$optionsMap;
86
+ console.log("renderClient", record, _this.getIsValue());
79
87
  // 特殊自定义组件为平台状态时匹配出label
80
- var label = ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.webUniqueKey) === "PLATFORM_STATUS" ? (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
88
+ var label = _this.getIsValue() ? (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
81
89
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
82
90
  id: _this.id,
83
91
  label: _this.name,
@@ -85,11 +93,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
85
93
  }) : null;
86
94
  });
87
95
  _defineProperty(this, "renderPc", function (value, record) {
88
- var _this$componentConfig6, _this$optionsMap2;
96
+ var _this$optionsMap2;
89
97
  var type = _this.type;
90
98
  var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
91
99
  // 特殊自定义组件为平台状态时匹配出label
92
- var label = ((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.webUniqueKey) === "PLATFORM_STATUS" ? ((_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[key]) || "" : key;
100
+ var label = _this.getIsValue() ? ((_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[key]) || "" : key;
93
101
  return /*#__PURE__*/React.createElement("span", null, label !== null && label !== void 0 ? label : "--");
94
102
  });
95
103
  _defineProperty(this, "renderLog", function (r) {
@@ -102,11 +110,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
102
110
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
103
111
  });
104
112
  _defineProperty(this, "renderExport", function (value, record) {
105
- var _this$componentConfig7, _this$optionsMap3;
113
+ var _this$optionsMap3;
106
114
  var type = _this.type;
107
115
  var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
108
116
  // 特殊自定义组件为平台状态时匹配出label
109
- var label = ((_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.webUniqueKey) === "PLATFORM_STATUS" ? ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || "" : key;
117
+ var label = _this.getIsValue() ? ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || "" : key;
110
118
  return label !== null && label !== void 0 ? label : "--";
111
119
  });
112
120
  _defineProperty(this, "filterConfig", function (item) {
@@ -141,7 +149,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
141
149
  this.canSort = true;
142
150
  this.children = [];
143
151
  this.dataType = "string";
144
- this.options = ((_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.options) || [];
152
+ this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
145
153
  this.optionsMap = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.reduce(function (prev, next) {
146
154
  prev[next.value] = next.label;
147
155
  return prev;
@@ -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, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsLogistics | BasicFile | JstSendGood | MsgStatus | BasicPicture | BasicPicturePro | BasicSelect | ShopInput | WdtReissue | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelectOption | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | BasicFile | JstSendGood | MsgStatus | BasicPicture | BasicPicturePro | BasicSelect | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelectOption | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | 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 | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
@@ -35,6 +35,7 @@ export var factory = function factory(type, options) {
35
35
  case "REFUND_TYPE":
36
36
  case "EXECUTE_ACTION_TYPE":
37
37
  case "ERP_ORDER_STATUS":
38
+ case "JST_OUTBOUND_STATUS":
38
39
  return new BasicSelect(options);
39
40
  case "PICTURE":
40
41
  return new BasicPicture(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.2.25",
3
+ "version": "2.2.26",
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.25",
25
- "@kmkf-fe-packages/kmkf-utils": "2.2.24",
24
+ "@kmkf-fe-packages/basic-components": "2.2.26",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.2.26",
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": "eb88c3c93e2a120ed15b41688edff56c7faaf043",
44
+ "gitHead": "786169beb384512f2dd49ceb5ecee234058f4434",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }