@kmkf-fe-packages/services-components 2.10.9-beta.3 → 2.10.9-beta.31

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.
Files changed (76) hide show
  1. package/dist/esm/Hooks/useColumnsConfig.d.ts +1 -1
  2. package/dist/esm/Hooks/useColumnsConfig.js +1 -1
  3. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
  4. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +3 -2
  5. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +13 -12
  6. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +12 -9
  7. package/dist/esm/components/BS/BsExchange/index.d.ts +7 -0
  8. package/dist/esm/components/BS/BsExchange/index.js +6 -0
  9. package/dist/esm/components/BS/BsGoods/index.d.ts +7 -0
  10. package/dist/esm/components/BS/BsGoods/index.js +6 -0
  11. package/dist/esm/components/BS/BsLogistics/index.js +9 -0
  12. package/dist/esm/components/BS/BsReissue/index.d.ts +7 -0
  13. package/dist/esm/components/BS/BsReissue/index.js +6 -0
  14. package/dist/esm/components/BS/BsReturn/index.d.ts +7 -0
  15. package/dist/esm/components/BS/BsReturn/index.js +6 -0
  16. package/dist/esm/components/BS/BsSystemOrder/index.js +3 -2
  17. package/dist/esm/components/BS/common/expressCode.js +3 -0
  18. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  19. package/dist/esm/components/BsE3/BsGoods/index.d.ts +7 -0
  20. package/dist/esm/components/BsE3/BsGoods/index.js +6 -0
  21. package/dist/esm/components/BsE3/BsReissueE3/index.d.ts +7 -0
  22. package/dist/esm/components/BsE3/BsReissueE3/index.js +6 -0
  23. package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +6 -0
  24. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +18 -2
  25. package/dist/esm/components/Common/index.js +6 -3
  26. package/dist/esm/components/CommonHeaderGood/index.js +54 -35
  27. package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -1
  28. package/dist/esm/components/CommonMultiStatus/index.js +61 -6
  29. package/dist/esm/components/GY/GyGoods/index.d.ts +7 -0
  30. package/dist/esm/components/GY/GyGoods/index.js +6 -0
  31. package/dist/esm/components/GY/GyReissue/index.d.ts +7 -0
  32. package/dist/esm/components/GY/GyReissue/index.js +6 -0
  33. package/dist/esm/components/GY/GyReturn/index.d.ts +7 -0
  34. package/dist/esm/components/GY/GyReturn/index.js +6 -0
  35. package/dist/esm/components/JST/JstSendGood/index.d.ts +2 -1
  36. package/dist/esm/components/JST/JstSendGood/index.js +16 -2
  37. package/dist/esm/components/JST/JstSupply/index.d.ts +1 -1
  38. package/dist/esm/components/JST/JstSupply/index.js +3 -0
  39. package/dist/esm/components/KM/KmExchange/index.d.ts +7 -0
  40. package/dist/esm/components/KM/KmExchange/index.js +6 -0
  41. package/dist/esm/components/KmErpSendGood/index.d.ts +1 -1
  42. package/dist/esm/components/KmErpSendGood/index.js +3 -0
  43. package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
  44. package/dist/esm/components/LogisticsInterception/index.js +14 -7
  45. package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.d.ts +39 -0
  46. package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.js +103 -0
  47. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +2 -0
  48. package/dist/esm/components/LogisticsMoreInterception/index.js +19 -5
  49. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.d.ts +39 -0
  50. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.js +108 -0
  51. package/dist/esm/components/Public/Exchange/index.d.ts +7 -0
  52. package/dist/esm/components/Public/Exchange/index.js +6 -0
  53. package/dist/esm/components/Public/Goods/index.js +6 -12
  54. package/dist/esm/components/Public/ReissueGoods/index.d.ts +7 -0
  55. package/dist/esm/components/Public/ReissueGoods/index.js +6 -0
  56. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +1 -1
  57. package/dist/esm/components/Public/ReturnWarehouse/index.js +3 -0
  58. package/dist/esm/components/Reissue/Logistics/index.d.ts +1 -1
  59. package/dist/esm/components/Reissue/Logistics/index.js +3 -0
  60. package/dist/esm/components/Remark/index.d.ts +4 -1
  61. package/dist/esm/components/Remark/index.js +36 -8
  62. package/dist/esm/components/SKX/SkxGoods/index.d.ts +7 -0
  63. package/dist/esm/components/SKX/SkxGoods/index.js +6 -0
  64. package/dist/esm/components/WDT/WdtExchange/index.d.ts +7 -0
  65. package/dist/esm/components/WDT/WdtExchange/index.js +6 -0
  66. package/dist/esm/components/WDT/WdtGoods/index.d.ts +7 -0
  67. package/dist/esm/components/WDT/WdtGoods/index.js +6 -0
  68. package/dist/esm/components/WDT/WdtRessuie/index.d.ts +7 -0
  69. package/dist/esm/components/WDT/WdtRessuie/index.js +6 -0
  70. package/dist/esm/components/WDT/WdtReturn/index.d.ts +7 -0
  71. package/dist/esm/components/WDT/WdtReturn/index.js +6 -0
  72. package/dist/esm/factory.d.ts +1 -1
  73. package/dist/esm/factory.js +10 -1
  74. package/dist/esm/service/api.d.ts +1 -0
  75. package/dist/esm/service/api.js +6 -0
  76. package/package.json +4 -4
@@ -0,0 +1,108 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ 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; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ 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); }
8
+ import React from "react";
9
+ import { filterFn as _filterFn, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { SYMBOL } from "../../constant";
11
+ var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, InterceptLogisticsCustomerCode);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
17
+ _defineProperty(this, "type", void 0);
18
+ _defineProperty(this, "rules", void 0);
19
+ _defineProperty(this, "componentConfig", void 0);
20
+ _defineProperty(this, "effects", void 0);
21
+ _defineProperty(this, "align", void 0);
22
+ _defineProperty(this, "width", void 0);
23
+ _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "formField", void 0);
25
+ _defineProperty(this, "canSort", void 0);
26
+ _defineProperty(this, "children", void 0);
27
+ _defineProperty(this, "dataType", void 0);
28
+ _defineProperty(this, "options", void 0);
29
+ _defineProperty(this, "getComponentValue", function (record) {
30
+ return ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_logisticsInterceptList")]) || []).map(function (item) {
31
+ return item === null || item === void 0 ? void 0 : item.interceptLogisticsCustomerCode;
32
+ }).filter(Boolean).join(",");
33
+ });
34
+ _defineProperty(this, "renderCustomerCodes", function (record) {
35
+ var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_logisticsInterceptList")]) || [];
36
+ return list.map(function (item, index) {
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ key: "".concat((item === null || item === void 0 ? void 0 : item.interceptCode) || "customer-code", "-").concat(index)
39
+ }, "\u5305\u88F9".concat(index + 1, ":"), (item === null || item === void 0 ? void 0 : item.interceptLogisticsCustomerCode) || "--");
40
+ });
41
+ });
42
+ _defineProperty(this, "renderClient", function () {
43
+ return null;
44
+ });
45
+ _defineProperty(this, "renderPc", function (_value, record) {
46
+ return _this.renderCustomerCodes(record);
47
+ });
48
+ _defineProperty(this, "renderLog", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "renderExport", function (_value, record) {
52
+ return _this.getComponentValue(record) || "--";
53
+ });
54
+ _defineProperty(this, "editRender", function () {
55
+ return null;
56
+ });
57
+ _defineProperty(this, "filterConfig", function (item) {
58
+ return {
59
+ searchDefaultConditions: SYMBOL.in,
60
+ type: item.type,
61
+ id: "".concat(item.id, "_logisticsInterceptCustomerCodeList"),
62
+ name: "".concat(item.name, "-\u5BA2\u6237\u7F16\u7801"),
63
+ filterComponentType: "MultipleSelect",
64
+ props: {
65
+ options: _this.options || []
66
+ },
67
+ formatFilterValue: function formatFilterValue(value) {
68
+ var _value$map;
69
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (option) {
70
+ return option === null || option === void 0 ? void 0 : option.split(",");
71
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
72
+ },
73
+ filterFn: function filterFn(value) {
74
+ return function (record) {
75
+ var _value$map2, _value$map2$flat;
76
+ return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (option) {
77
+ return option === null || option === void 0 ? void 0 : option.split(",");
78
+ })) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.some(function (customerCode) {
79
+ return "".concat(_filterFn.filterTableListItemColumnValue(record, item.id, "logisticsInterceptCustomerCodeList")).split(",").includes(customerCode);
80
+ });
81
+ };
82
+ }
83
+ };
84
+ });
85
+ this.name = "客户编码";
86
+ this.id = options.id;
87
+ this.sortField = "".concat(options.id, "_logisticsInterceptCustomerCodeList");
88
+ this.formField = this.sortField;
89
+ this.type = options.type;
90
+ this.componentConfig = options.componentConfig;
91
+ this.rules = [];
92
+ this.align = "left";
93
+ this.width = 220;
94
+ this.isCombinationComponent = false;
95
+ this.canSort = true;
96
+ this.children = [];
97
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
98
+ this.dataType = "string";
99
+ this.options = (LogisticsAddressData.getInstance().getAddressData() || []).filter(function (item) {
100
+ return item.cpCode === "JD" && item.customerCode;
101
+ }).map(function (item) {
102
+ return {
103
+ label: item.remark ? "".concat(item.customerCode, "\uFF08").concat(item.remark, "\uFF09") : item.customerCode,
104
+ value: item.customerCode
105
+ };
106
+ });
107
+ });
108
+ export default InterceptLogisticsCustomerCode;
@@ -19,10 +19,17 @@ declare class Exchange implements ComponentInterface {
19
19
  canSort: boolean;
20
20
  children: ComponentInterface[];
21
21
  dataType: ComponentInterface['dataType'];
22
+ sortChildField: NonNullable<ComponentInterface['sortChildField']>;
22
23
  returnGoods: CommonHeaderGoods;
23
24
  config: ConfigType;
24
25
  form?: FormInstance;
25
26
  constructor(options: PickOption);
27
+ getSortChildFields: () => {
28
+ name: any;
29
+ key: string;
30
+ dataType: string;
31
+ conditionOptionsSetting: any;
32
+ }[];
26
33
  renderClient: (record: any) => React.JSX.Element | null;
27
34
  renderPc: () => null;
28
35
  renderLog: (r: Record) => React.JSX.Element;
@@ -18,6 +18,7 @@ import { SYMBOL } from "../../../constant";
18
18
  import { CommonExchangeGoods } from '@kmkf-fe-packages/basic-components';
19
19
  import CommonHeaderGoods from "../../CommonHeaderGood";
20
20
  import { erpFormValidator } from "@kmkf-fe-packages/basic-components";
21
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
21
22
  function toNum(value) {
22
23
  if (typeof value === 'string') {
23
24
  return value ? +value : void 0;
@@ -58,9 +59,13 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
58
59
  _defineProperty(this, "canSort", void 0);
59
60
  _defineProperty(this, "children", void 0);
60
61
  _defineProperty(this, "dataType", void 0);
62
+ _defineProperty(this, "sortChildField", void 0);
61
63
  _defineProperty(this, "returnGoods", void 0);
62
64
  _defineProperty(this, "config", void 0);
63
65
  _defineProperty(this, "form", void 0);
66
+ _defineProperty(this, "getSortChildFields", function () {
67
+ return getGoodsSortChildFields(_this.type, _this.id);
68
+ });
64
69
  _defineProperty(this, "renderClient", function (record) {
65
70
  var _this$componentConfig;
66
71
  var exchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || '[]');
@@ -156,5 +161,6 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
156
161
  }
157
162
  }];
158
163
  this.dataType = 'object';
164
+ this.sortChildField = this.getSortChildFields();
159
165
  });
160
166
  export default Exchange;
@@ -15,7 +15,7 @@ import CommonHeaderGoods from "../../CommonHeaderGood";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
- import { getColumnsMap } from "../../Common/constants/columnsBaseInfoMap";
18
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
19
19
  import { SYMBOL } from "../../../constant";
20
20
  var CONFIG_MAP = {
21
21
  JST_GOODS: {
@@ -43,6 +43,10 @@ var CONFIG_MAP = {
43
43
  name: "大希地供应商",
44
44
  key: "dxdSuppliers"
45
45
  },
46
+ TTX_GOODS: {
47
+ name: "通天晓",
48
+ key: "ttxGoods"
49
+ },
46
50
  WDT_AFTERSALE_GOODS: {
47
51
  name: "旺店通售后",
48
52
  key: "wdtAftersaleGoods"
@@ -79,17 +83,7 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
79
83
  _defineProperty(this, "standardDateType", void 0);
80
84
  _defineProperty(this, "sortChildField", void 0);
81
85
  _defineProperty(this, "getSortChildFields", function () {
82
- var Columns = getColumnsMap();
83
- return Columns[_this.type].filter(function (item) {
84
- return !["picUrl"].includes(item.dataIndex);
85
- }).map(function (item) {
86
- return {
87
- name: item.title,
88
- key: "".concat(_this.id, "_").concat(item.dataIndex),
89
- dataType: "arrayObject",
90
- conditionOptionsSetting: item.conditionOptionsSetting
91
- };
92
- });
86
+ return getGoodsSortChildFields(_this.type, _this.id);
93
87
  });
94
88
  _defineProperty(this, "renderClient", function (record) {
95
89
  var _record, _CONFIG_MAP$_this$typ, _this$componentConfig;
@@ -16,11 +16,18 @@ declare class PublicReissue implements ComponentInterface {
16
16
  canSort: boolean;
17
17
  children: ComponentInterface[];
18
18
  dataType: ComponentInterface["dataType"];
19
+ sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
19
20
  bsType: BsType;
20
21
  systemOrderNo: SystemOrderNo;
21
22
  systemOrderType?: SystemOrderType;
22
23
  goods: BsHeaderGood | CommonHeaderGoods;
23
24
  constructor(options: PickOption);
25
+ getSortChildFields: () => {
26
+ name: any;
27
+ key: string;
28
+ dataType: string;
29
+ conditionOptionsSetting: any;
30
+ }[];
24
31
  renderClient: (record: any) => React.JSX.Element | null;
25
32
  renderPc: () => null;
26
33
  renderLog: (r: Record) => React.JSX.Element;
@@ -18,6 +18,7 @@ import { BsGoodsTable } from "../../Common/index";
18
18
  import { BsType, SystemOrderNo } from "../../BS/common/index";
19
19
  import SystemOrderType from "../SystemOrderType";
20
20
  import CommonHeaderGoods from "../../CommonHeaderGood";
21
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
21
22
  var typeMap = {
22
23
  JST_REISSUE_GOODS: {
23
24
  key: "jstReissueGoods",
@@ -174,10 +175,14 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
174
175
  _defineProperty(this, "canSort", void 0);
175
176
  _defineProperty(this, "children", void 0);
176
177
  _defineProperty(this, "dataType", void 0);
178
+ _defineProperty(this, "sortChildField", void 0);
177
179
  _defineProperty(this, "bsType", void 0);
178
180
  _defineProperty(this, "systemOrderNo", void 0);
179
181
  _defineProperty(this, "systemOrderType", void 0);
180
182
  _defineProperty(this, "goods", void 0);
183
+ _defineProperty(this, "getSortChildFields", function () {
184
+ return getGoodsSortChildFields(_this.type, _this.id);
185
+ });
181
186
  _defineProperty(this, "renderClient", function (record) {
182
187
  var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
183
188
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.systemOrderNo.renderClient(record), _this.systemOrderType && _this.systemOrderType.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
@@ -331,5 +336,6 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
331
336
  }
332
337
  }];
333
338
  this.dataType = "object";
339
+ this.sortChildField = this.getSortChildFields();
334
340
  });
335
341
  export default PublicReissue;
@@ -26,7 +26,7 @@ declare class ReturnWarehouse implements ComponentInterface {
26
26
  renderPc: (value: any, record: Record) => React.JSX.Element;
27
27
  renderLog: (r: Record) => React.JSX.Element | null;
28
28
  getComponentValue: (r: Record) => any;
29
- renderExport: (value: any, record: any) => any;
29
+ renderExport: (value: any, record: any) => string;
30
30
  editRender: (p: any) => React.JSX.Element;
31
31
  filterConfig: (item: ColumnConfig) => ({
32
32
  searchDefaultConditions: "in";
@@ -106,6 +106,9 @@ var ReturnWarehouse = /*#__PURE__*/_createClass(function ReturnWarehouse(_option
106
106
  _defineProperty(this, "renderExport", function (value, record) {
107
107
  var _typeMap$_this$type6;
108
108
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
109
+ if (!Array.isArray(list)) {
110
+ return '';
111
+ }
109
112
  return (list || []).map(function (item) {
110
113
  return [item === null || item === void 0 ? void 0 : item.returnWarehouseId, SendDataCenter.getInstance(_this.type).getSendNameByCode(item === null || item === void 0 ? void 0 : item.returnWarehouseName)].join("/");
111
114
  }).join(",");
@@ -27,7 +27,7 @@ declare class Logistics implements ComponentInterface {
27
27
  renderPc: (value: any, record: Record) => React.JSX.Element;
28
28
  renderLog: (r: Record) => React.JSX.Element | null;
29
29
  getComponentValue: (r: Record) => any;
30
- renderExport: (value: any, record: any) => any;
30
+ renderExport: (value: any, record: any) => string;
31
31
  editRender: (p: any) => React.JSX.Element;
32
32
  filterConfig: (item: ColumnConfig) => ({
33
33
  searchDefaultConditions: "in";
@@ -110,6 +110,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
110
110
  _defineProperty(this, "renderExport", function (value, record) {
111
111
  var _typeMap$_this$type4;
112
112
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
113
+ if (!Array.isArray(list)) {
114
+ return '';
115
+ }
113
116
  return (list || []).map(function (item) {
114
117
  var _this$componentConfig3, _ref;
115
118
  return [["gy", "jy"].includes(((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.logistics) || "") ? (_ref = _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany, false) || (item === null || item === void 0 ? void 0 : item.logisticsCompanyName)) !== null && _ref !== void 0 ? _ref : "" : _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join("/");
@@ -17,9 +17,12 @@ declare class ERemark implements ComponentInterface {
17
17
  formField: string;
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
+ effects: ComponentInterface['effects'];
20
21
  dataType: ComponentInterface['dataType'];
21
22
  constructor(options: PickOption);
22
- render: (value: Value) => React.JSX.Element;
23
+ getShop: (record?: Record) => any;
24
+ isYouzan: (record?: Record) => boolean;
25
+ render: (value: Value, isYouzan?: boolean) => React.JSX.Element;
23
26
  renderClient: (record: Record) => React.JSX.Element | null;
24
27
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
25
28
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,4 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
3
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
4
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
5
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -6,7 +7,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
8
  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); }
8
9
  import React from 'react';
9
- import { Remark } from '@kmkf-fe-packages/basic-components';
10
+ import { Remark, YouzanStar } from '@kmkf-fe-packages/basic-components';
10
11
  import GetFormItem from "../GetFormItem";
11
12
  import trade0 from "./flag/trade-icon-flag-0.png";
12
13
  import trade1 from "./flag/trade-icon-flag-1.png";
@@ -16,7 +17,7 @@ import trade4 from "./flag/trade-icon-flag-4.png";
16
17
  import trade5 from "./flag/trade-icon-flag-5.png";
17
18
  import get from 'lodash/get';
18
19
  import ItemView from "../../commonComponents/ItemView";
19
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
20
+ import { isNull, filterFn as _filterFn, isYouzanShop, normalizeYouzanStar } from '@kmkf-fe-packages/kmkf-utils';
20
21
  import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
21
22
  var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
22
23
  var _this = this,
@@ -34,14 +35,30 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
34
35
  _defineProperty(this, "formField", void 0);
35
36
  _defineProperty(this, "canSort", void 0);
36
37
  _defineProperty(this, "children", void 0);
38
+ _defineProperty(this, "effects", void 0);
37
39
  _defineProperty(this, "dataType", void 0);
40
+ _defineProperty(this, "getShop", function (record) {
41
+ var _this$effects, _this$effects2, _this$effects2$form, _this$effects3, _this$effects3$shopLi;
42
+ var shopId = (record === null || record === void 0 ? void 0 : record.shopId) || ((_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId) || ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : (_this$effects2$form = _this$effects2.form) === null || _this$effects2$form === void 0 ? void 0 : _this$effects2$form.getFieldValue('shopId'));
43
+ return (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : (_this$effects3$shopLi = _this$effects3.shopList) === null || _this$effects3$shopLi === void 0 ? void 0 : _this$effects3$shopLi.find(function (shop) {
44
+ return shop.shopId === shopId;
45
+ });
46
+ });
47
+ _defineProperty(this, "isYouzan", function (record) {
48
+ return isYouzanShop(_this.getShop(record));
49
+ });
38
50
  _defineProperty(this, "render", function (value) {
51
+ var isYouzan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
39
52
  var index = get(value, 'flag');
40
53
  return /*#__PURE__*/React.createElement("div", {
41
54
  style: {
42
55
  display: 'inline-block'
43
56
  }
44
- }, index !== undefined && /*#__PURE__*/React.createElement("img", {
57
+ }, isYouzan ? normalizeYouzanStar(index) ? /*#__PURE__*/React.createElement(YouzanStar, {
58
+ compact: true,
59
+ disabled: true,
60
+ value: index
61
+ }) : null : index !== undefined && /*#__PURE__*/React.createElement("img", {
45
62
  src: _this.imgList[Number(index)]
46
63
  }), /*#__PURE__*/React.createElement("span", null, get(value, 'remark')));
47
64
  });
@@ -49,7 +66,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
49
66
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
50
67
  id: _this.id,
51
68
  label: _this.name,
52
- value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
69
+ value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id], _this.isYouzan(record))
53
70
  }) : null;
54
71
  });
55
72
  _defineProperty(this, "renderPc", function (value, record) {
@@ -57,11 +74,16 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
57
74
  return /*#__PURE__*/React.createElement("span", null, "--");
58
75
  }
59
76
  var index = get(record, "".concat(_this.id, "_flag"));
77
+ var isYouzan = _this.isYouzan(record);
60
78
  return /*#__PURE__*/React.createElement("div", {
61
79
  style: {
62
80
  display: 'inline-block'
63
81
  }
64
- }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? index !== undefined && /*#__PURE__*/React.createElement("img", {
82
+ }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? isYouzan ? normalizeYouzanStar(index) && /*#__PURE__*/React.createElement(YouzanStar, {
83
+ compact: true,
84
+ disabled: true,
85
+ value: index
86
+ }) : index !== undefined && /*#__PURE__*/React.createElement("img", {
65
87
  src: _this.imgList[Number(index)]
66
88
  }) :
67
89
  // <i
@@ -94,7 +116,9 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
94
116
  display: p === null || p === void 0 ? void 0 : p.display,
95
117
  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,
96
118
  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 : '',
97
- component: /*#__PURE__*/React.createElement(Remark, _this.componentConfig)
119
+ component: /*#__PURE__*/React.createElement(Remark, _extends({}, _this.componentConfig, {
120
+ isYouzan: _this.isYouzan()
121
+ }))
98
122
  });
99
123
  });
100
124
  _defineProperty(this, "filterConfig", function (item) {
@@ -170,6 +194,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
170
194
  this.formField = "".concat(options.id, "_remark");
171
195
  this.type = options.type;
172
196
  this.componentConfig = options.componentConfig;
197
+ this.effects = options.effects;
173
198
  this.dataType = 'object';
174
199
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
175
200
  validator: function validator(_, value) {
@@ -177,8 +202,11 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
177
202
  if (!(value !== null && value !== void 0 && value.remark)) {
178
203
  return Promise.reject(new Error('请输入备注'));
179
204
  }
180
- if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isShowFlag && !(value !== null && value !== void 0 && value.flag) && (value === null || value === void 0 ? void 0 : value.flag) !== 0) {
181
- return Promise.reject(new Error('请选择旗帜'));
205
+ if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isShowFlag) {
206
+ var flag = _this.isYouzan() ? normalizeYouzanStar(value === null || value === void 0 ? void 0 : value.flag) : value === null || value === void 0 ? void 0 : value.flag;
207
+ if (!flag && flag !== 0) {
208
+ return Promise.reject(new Error(_this.isYouzan() ? '请选择星标' : '请选择旗帜'));
209
+ }
182
210
  }
183
211
  return Promise.resolve();
184
212
  }
@@ -14,8 +14,15 @@ declare class SkxGoods implements ComponentInterface {
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
16
  dataType: ComponentInterface["dataType"];
17
+ sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
17
18
  skxGoods: CommonHeaderGoods;
18
19
  constructor(options: PickOption);
20
+ getSortChildFields: () => {
21
+ name: any;
22
+ key: string;
23
+ dataType: string;
24
+ conditionOptionsSetting: any;
25
+ }[];
19
26
  renderClient: (record: any) => React.JSX.Element | null;
20
27
  renderPc: () => null;
21
28
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -16,6 +16,7 @@ import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { SkxGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
18
  import { SYMBOL } from "../../../constant";
19
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
19
20
  var typeMap = {
20
21
  SKX_GOODS: {
21
22
  name: "[SKX]商品信息(ON)",
@@ -42,7 +43,11 @@ var SkxGoods = /*#__PURE__*/_createClass(function SkxGoods(options) {
42
43
  _defineProperty(this, "canSort", void 0);
43
44
  _defineProperty(this, "children", void 0);
44
45
  _defineProperty(this, "dataType", void 0);
46
+ _defineProperty(this, "sortChildField", void 0);
45
47
  _defineProperty(this, "skxGoods", void 0);
48
+ _defineProperty(this, "getSortChildFields", function () {
49
+ return getGoodsSortChildFields(_this.type, _this.id);
50
+ });
46
51
  _defineProperty(this, "renderClient", function (record) {
47
52
  var _record, _this$componentConfig;
48
53
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
@@ -131,5 +136,6 @@ var SkxGoods = /*#__PURE__*/_createClass(function SkxGoods(options) {
131
136
  }
132
137
  }] : [];
133
138
  this.dataType = "object";
139
+ this.sortChildField = this.getSortChildFields();
134
140
  });
135
141
  export default SkxGoods;
@@ -14,8 +14,15 @@ declare class WDTExchange implements ComponentInterface {
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
16
  dataType: ComponentInterface["dataType"];
17
+ sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
17
18
  returnGoods: CommonHeaderGoods;
18
19
  constructor(options: PickOption);
20
+ getSortChildFields: () => {
21
+ name: any;
22
+ key: string;
23
+ dataType: string;
24
+ conditionOptionsSetting: any;
25
+ }[];
19
26
  renderClient: (record: any) => React.JSX.Element | null;
20
27
  renderPc: () => null;
21
28
  renderLog: (r: Record) => React.JSX.Element;
@@ -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 { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
20
21
  var WDTExchange = /*#__PURE__*/_createClass(
21
22
  // wdtType: BsType;
22
23
  // wdtMemo: BsMemo;
@@ -39,7 +40,11 @@ function WDTExchange(options) {
39
40
  _defineProperty(this, "canSort", void 0);
40
41
  _defineProperty(this, "children", void 0);
41
42
  _defineProperty(this, "dataType", void 0);
43
+ _defineProperty(this, "sortChildField", void 0);
42
44
  _defineProperty(this, "returnGoods", void 0);
45
+ _defineProperty(this, "getSortChildFields", function () {
46
+ return getGoodsSortChildFields(_this.type, _this.id);
47
+ });
43
48
  _defineProperty(this, "renderClient", function (record) {
44
49
  var _this$componentConfig;
45
50
  var wdtExchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_wdtExchangeGoods")]) || "[]");
@@ -180,5 +185,6 @@ function WDTExchange(options) {
180
185
  },*/];
181
186
 
182
187
  this.dataType = "object";
188
+ this.sortChildField = this.getSortChildFields();
183
189
  });
184
190
  export default WDTExchange;
@@ -14,8 +14,15 @@ declare class WdtGoods implements ComponentInterface {
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
16
  dataType: ComponentInterface["dataType"];
17
+ sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
17
18
  wdtGoods: CommonHeaderGoods;
18
19
  constructor(options: PickOption);
20
+ getSortChildFields: () => {
21
+ name: any;
22
+ key: string;
23
+ dataType: string;
24
+ conditionOptionsSetting: any;
25
+ }[];
19
26
  renderClient: (record: any) => React.JSX.Element | null;
20
27
  renderPc: () => null;
21
28
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -16,6 +16,7 @@ import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
18
  import { SYMBOL } from "../../../constant";
19
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
19
20
  var WdtGoods = /*#__PURE__*/_createClass(function WdtGoods(options) {
20
21
  var _this = this,
21
22
  _this$componentConfig6;
@@ -32,7 +33,11 @@ var WdtGoods = /*#__PURE__*/_createClass(function WdtGoods(options) {
32
33
  _defineProperty(this, "canSort", void 0);
33
34
  _defineProperty(this, "children", void 0);
34
35
  _defineProperty(this, "dataType", void 0);
36
+ _defineProperty(this, "sortChildField", void 0);
35
37
  _defineProperty(this, "wdtGoods", void 0);
38
+ _defineProperty(this, "getSortChildFields", function () {
39
+ return getGoodsSortChildFields(_this.type, _this.id);
40
+ });
36
41
  _defineProperty(this, "renderClient", function (record) {
37
42
  var _record, _this$componentConfig;
38
43
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
@@ -119,5 +124,6 @@ var WdtGoods = /*#__PURE__*/_createClass(function WdtGoods(options) {
119
124
  }
120
125
  }] : [];
121
126
  this.dataType = "object";
127
+ this.sortChildField = this.getSortChildFields();
122
128
  });
123
129
  export default WdtGoods;
@@ -15,11 +15,18 @@ declare class WdtReissue implements ComponentInterface {
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
17
  dataType: ComponentInterface["dataType"];
18
+ sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
18
19
  bsType: BsType;
19
20
  bsMemo: BsMemo;
20
21
  systemOrderNo: SystemOrderNo;
21
22
  reissueGoods: BsHeaderGood | CommonHeaderGoods;
22
23
  constructor(options: PickOption);
24
+ getSortChildFields: () => {
25
+ name: any;
26
+ key: string;
27
+ dataType: string;
28
+ conditionOptionsSetting: any;
29
+ }[];
23
30
  renderClient: (record: any) => React.JSX.Element | null;
24
31
  renderPc: () => null;
25
32
  renderLog: (r: Record) => React.JSX.Element;
@@ -17,6 +17,7 @@ import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common/index";
18
18
  import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
19
19
  import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
20
21
  var typeMap = {
21
22
  WDT_REISSUE_GOODS: {
22
23
  key: "wdtReissueGoods",
@@ -56,10 +57,14 @@ var WdtReissue = /*#__PURE__*/_createClass(function WdtReissue(options) {
56
57
  _defineProperty(this, "canSort", void 0);
57
58
  _defineProperty(this, "children", void 0);
58
59
  _defineProperty(this, "dataType", void 0);
60
+ _defineProperty(this, "sortChildField", void 0);
59
61
  _defineProperty(this, "bsType", void 0);
60
62
  _defineProperty(this, "bsMemo", void 0);
61
63
  _defineProperty(this, "systemOrderNo", void 0);
62
64
  _defineProperty(this, "reissueGoods", void 0);
65
+ _defineProperty(this, "getSortChildFields", function () {
66
+ return getGoodsSortChildFields(_this.type, _this.id);
67
+ });
63
68
  _defineProperty(this, "renderClient", function (record) {
64
69
  var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
65
70
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
@@ -208,5 +213,6 @@ var WdtReissue = /*#__PURE__*/_createClass(function WdtReissue(options) {
208
213
  }
209
214
  }];
210
215
  this.dataType = "object";
216
+ this.sortChildField = this.getSortChildFields();
211
217
  });
212
218
  export default WdtReissue;
@@ -15,9 +15,16 @@ declare class WdtReturn implements ComponentInterface {
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
17
  dataType: ComponentInterface["dataType"];
18
+ sortChildField: NonNullable<ComponentInterface["sortChildField"]>;
18
19
  wdtType: BsType;
19
20
  reissueGoods: CommonHeaderGoods;
20
21
  constructor(options: PickOption);
22
+ getSortChildFields: () => {
23
+ name: any;
24
+ key: string;
25
+ dataType: string;
26
+ conditionOptionsSetting: any;
27
+ }[];
21
28
  renderClient: (record: any) => React.JSX.Element | null;
22
29
  renderPc: () => null;
23
30
  renderLog: (r: Record) => React.JSX.Element;