@kmkf-fe-packages/services-components 2.10.2 → 2.10.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.
@@ -41,7 +41,7 @@ export declare const BsGoodsTable: ({ list, showHeader, text, type, }: {
41
41
  export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
42
42
  export declare const KmVideoRender: ({ fileList, canDownload }: any) => React.JSX.Element;
43
43
  export declare const BsSystemOrderTable: ({ value, type, showHeader }: any) => React.JSX.Element;
44
- export declare const MsgContent: ({ horizontal, list, valueKey, failValue, options, }: any) => React.JSX.Element;
44
+ export declare const MsgContent: ({ horizontal, list, valueKey, failValue, options, hasMoreBtn, }: any) => React.JSX.Element;
45
45
  export declare const AlipayBill: (props: any) => React.JSX.Element;
46
46
  export declare const RenderPicturePro: (props: any) => React.JSX.Element;
47
47
  export {};
@@ -337,15 +337,15 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
337
337
  idKey = _ref8.idKey;
338
338
  var getContentData = function getContentData(item, index) {
339
339
  if (item.platformId) return {
340
- text: "平台售后单号",
340
+ text: item.hiddenPrefix ? undefined : "平台售后单号",
341
341
  id: item.platformId
342
342
  };
343
343
  if (item.returnLogisticsCode) return {
344
- text: "物流单号",
344
+ text: item.hiddenPrefix ? undefined : "物流单号",
345
345
  id: item.returnLogisticsCode
346
346
  };
347
347
  return {
348
- text: "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1),
348
+ text: item.hiddenPrefix ? undefined : "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1),
349
349
  id: item.systemOrderId || item.systemOrderNo || (item === null || item === void 0 ? void 0 : item[idKey])
350
350
  };
351
351
  };
@@ -355,7 +355,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
355
355
  style: {
356
356
  textAlign: "center"
357
357
  }
358
- }, contentData.text, "\uFF1A", contentData.id));
358
+ }, contentData.text ? "".concat(contentData.text, "\uFF1A") : "", contentData.id));
359
359
  };
360
360
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
361
361
  var _options$find;
@@ -377,7 +377,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
377
377
  var currentOption = options.find(function (option) {
378
378
  return item[valueKey] === option.value;
379
379
  });
380
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, isShowPopover ? /*#__PURE__*/React.createElement(Popover, {
380
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, isShowPopover && getContentData(item, index).text ? /*#__PURE__*/React.createElement(Popover, {
381
381
  content: orderContent(item, index),
382
382
  overlayStyle: {
383
383
  zIndex: 1080
@@ -769,7 +769,7 @@ export var KmVideoRender = function KmVideoRender(_ref13) {
769
769
  src: fileUrl
770
770
  })));
771
771
  };
772
- var RADIO_TABLE_KEYS = ['PLATFORM_AFTER_SALES_ORDER'];
772
+ var RADIO_TABLE_KEYS = ["PLATFORM_AFTER_SALES_ORDER"];
773
773
  export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
774
774
  var value = _ref14.value,
775
775
  type = _ref14.type,
@@ -803,7 +803,7 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
803
803
  PLATFORM_AFTER_SALES_ORDER: "afterSaleOrderId"
804
804
  };
805
805
  var rowSelection = {
806
- type: isRadio ? 'radio' : 'checkbox',
806
+ type: isRadio ? "radio" : "checkbox",
807
807
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
808
808
  if (next.select) {
809
809
  prv.push(next[rowKeyMap[type]] || "billNo");
@@ -852,7 +852,9 @@ export var MsgContent = function MsgContent(_ref15) {
852
852
  valueKey = _ref15.valueKey,
853
853
  failValue = _ref15.failValue,
854
854
  _ref15$options = _ref15.options,
855
- options = _ref15$options === void 0 ? [] : _ref15$options;
855
+ options = _ref15$options === void 0 ? [] : _ref15$options,
856
+ _ref15$hasMoreBtn = _ref15.hasMoreBtn,
857
+ hasMoreBtn = _ref15$hasMoreBtn === void 0 ? false : _ref15$hasMoreBtn;
856
858
  var getColorByStatus = function getColorByStatus(value) {
857
859
  var _options$find2;
858
860
  return ((_options$find2 = options.find(function (innerItem) {
@@ -878,9 +880,7 @@ export var MsgContent = function MsgContent(_ref15) {
878
880
  }
879
881
  }, "\u5931\u8D25\u539F\u56E0\uFF1A", item.failReason)));
880
882
  };
881
- return /*#__PURE__*/React.createElement(Space, {
882
- direction: !horizontal ? "vertical" : "horizontal"
883
- }, Array.isArray(list) ? (list || []).map(function (item, index) {
883
+ var renderMsgItem = function renderMsgItem(item, index) {
884
884
  var _item$msgReceivers2;
885
885
  var color = getColorByStatus(item[valueKey]);
886
886
  var currentOption = options.find(function (option) {
@@ -904,6 +904,23 @@ export var MsgContent = function MsgContent(_ref15) {
904
904
  zIndex: 9999
905
905
  }
906
906
  }, formatMsgContent) : formatMsgContent);
907
+ };
908
+ return /*#__PURE__*/React.createElement(Space, {
909
+ direction: !horizontal ? "vertical" : "horizontal"
910
+ }, Array.isArray(list) && list.length > 0 ? hasMoreBtn && list.length > 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, renderMsgItem(list[0], 0), /*#__PURE__*/React.createElement(Popover, {
911
+ content: /*#__PURE__*/React.createElement(Space, {
912
+ direction: "vertical"
913
+ }, list.slice(1).map(function (item, index) {
914
+ return renderMsgItem(item, index + 1);
915
+ })),
916
+ overlayStyle: {
917
+ zIndex: 9999
918
+ }
919
+ }, /*#__PURE__*/React.createElement(Button, {
920
+ type: "link",
921
+ size: "small"
922
+ }, "\u66F4\u591A (", list.length - 1, ")"))) : list.map(function (item, index) {
923
+ return renderMsgItem(item, index);
907
924
  }) : null);
908
925
  };
909
926
  //获取付款凭证
@@ -88,7 +88,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
88
88
  value: /*#__PURE__*/React.createElement(CommonOrderContent, {
89
89
  list: record === null || record === void 0 ? void 0 : record[_this.id],
90
90
  valueKey: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.valueKey,
91
- isShowPopover: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.belongType) !== "wdt"
91
+ isShowPopover: !["wdt", "jst"].includes((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.belongType)
92
92
  })
93
93
  }) : null;
94
94
  });
@@ -104,7 +104,7 @@ var CommonSystemOrder = /*#__PURE__*/_createClass(function CommonSystemOrder(opt
104
104
  list: list,
105
105
  type: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.type,
106
106
  valueKey: (_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.valueKey,
107
- isShowPopover: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.belongType) !== "wdt"
107
+ isShowPopover: !["wdt", "jst"].includes((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.belongType)
108
108
  }));
109
109
  });
110
110
  _defineProperty(this, "renderLog", function (r) {
@@ -102,6 +102,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
102
102
  }, /*#__PURE__*/React.createElement(MsgContent, {
103
103
  horizontal: false,
104
104
  list: list,
105
+ hasMoreBtn: true,
105
106
  valueKey: (_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.valueKey,
106
107
  failValue: (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.failValue,
107
108
  options: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.options
@@ -17,6 +17,7 @@ import { SYMBOL } from "../../../constant";
17
17
  // import { BsType, BsMemo } from "../../Bs/common";
18
18
  import { CommonExchangeGoods } from '@kmkf-fe-packages/basic-components';
19
19
  import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ import { erpFormValidator } from "@kmkf-fe-packages/basic-components";
20
21
  function toNum(value) {
21
22
  if (typeof value === 'string') {
22
23
  return value ? +value : void 0;
@@ -29,28 +30,11 @@ function toNum(value) {
29
30
  var CONF_MAP = {
30
31
  JST_EXCHANGE_GOODS: {
31
32
  goodsKey: 'jstExchangeGoods',
32
- validator: function validator(_rule, value) {
33
+ validator: function validator(_rule, value, type) {
33
34
  if (!_rule.required) return Promise.resolve();
34
- var goodsName = '';
35
- if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
36
- var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
37
- var res = typeof qty === 'number' ? qty < 1 : true;
38
- if (res) {
39
- goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
40
- }
41
- return res;
42
- })) {
43
- return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
44
- }
45
- if (((value === null || value === void 0 ? void 0 : value.jstExchangeGoods) || []).some(function (goods) {
46
- var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
47
- var res = typeof v === 'number' ? v < 0 : true;
48
- if (res) {
49
- goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
50
- }
51
- return res;
52
- })) {
53
- return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
35
+ var validatorFlag = erpFormValidator(_rule, value, type);
36
+ if (validatorFlag) {
37
+ return validatorFlag;
54
38
  }
55
39
  return Promise.resolve();
56
40
  }
@@ -164,8 +148,11 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
164
148
  }
165
149
  }, {
166
150
  required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
167
- validator: this.config.validator || function () {
168
- return Promise.resolve();
151
+ validator: function validator(_rule, value) {
152
+ var _CONF_MAP$options$typ, _CONF_MAP$options$typ2;
153
+ return ((_CONF_MAP$options$typ = CONF_MAP[options.type]) === null || _CONF_MAP$options$typ === void 0 ? void 0 : (_CONF_MAP$options$typ2 = _CONF_MAP$options$typ.validator) === null || _CONF_MAP$options$typ2 === void 0 ? void 0 : _CONF_MAP$options$typ2.call(_CONF_MAP$options$typ, _rule, value, options.type, _this.componentConfig)) || function () {
154
+ return Promise.resolve();
155
+ };
169
156
  }
170
157
  }];
171
158
  this.dataType = 'object';
@@ -43,11 +43,11 @@ var typeMap = {
43
43
  typeName: "jstReturnType",
44
44
  remark: "jstReturnType_memo",
45
45
  systemOrderNo: "jstSystemOrderNo",
46
- systemOrderBillType: "jstSystemOrderBillType",
46
+ // systemOrderBillType: "jstSystemOrderBillType",
47
47
  errMsg: "请选择聚水潭退货商品",
48
48
  name: "聚水潭",
49
49
  compType: "退货",
50
- hasSystemOrderType: true,
50
+ hasSystemOrderType: false,
51
51
  validator: function validator(_rule, value, type) {
52
52
  if (!_rule.required) return Promise.resolve();
53
53
  var validatorFlag = erpFormValidator(_rule, value, type);
@@ -15,8 +15,8 @@ import React from "react";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  var componentType = {
18
- JST_REISSUE_GOODS: "jstSystemOrderBillType",
19
- JST_RETURN_GOODS: "jstSystemOrderBillType"
18
+ JST_REISSUE_GOODS: "jstSystemOrderBillType"
19
+ // JST_RETURN_GOODS: "jstSystemOrderBillType",
20
20
  };
21
21
  var SystemOrderType = /*#__PURE__*/_createClass(function SystemOrderType(options) {
22
22
  var _this = this;
@@ -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, 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, ReturnWarehouse, KmExchange } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | PublicExchange | PublicReissueGoods | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | 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 | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | 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 | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
3
+ export declare const factory: (type: string, options: PickOption) => CommonSystemOrder | MsgStatus | PublicExchange | PublicReissueGoods | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | 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 | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
@@ -185,6 +185,7 @@ export var factory = function factory(type, options) {
185
185
  case "KM_RETURN_GOODS":
186
186
  case "JY_REISSUE_GOODS":
187
187
  case "JKY_REISSUE_GOODS":
188
+ case "JST_RETURN_GOODS":
188
189
  return new PublicReissueGoods(options);
189
190
  case "BS_E3_REISSUE_GOODS":
190
191
  return new BsE3Reissue(options);
@@ -208,8 +209,6 @@ export var factory = function factory(type, options) {
208
209
  return new WdtReturn(options);
209
210
  case "GY_RETURN_GOODS":
210
211
  return new GyReturn(options);
211
- case "JST_RETURN_GOODS":
212
- return new PublicReissueGoods(options);
213
212
  case "REISSUE_TRADE_ID":
214
213
  case "SWAP_OUT_TRADE_ID":
215
214
  case "ERP_AFTER_SALE_TRADE_ID":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.10.2",
3
+ "version": "2.10.4",
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.10.2",
25
- "@kmkf-fe-packages/kmkf-utils": "2.10.2",
24
+ "@kmkf-fe-packages/basic-components": "2.10.4",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.10.4",
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": "387ea03be973184576757f0edf49a85e9eae8ea4",
44
+ "gitHead": "545af3d105d59a2b0b8f92cb0dd8804f4e5631f6",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }