@kmkf-fe-packages/services-components 2.10.9-beta.8 → 2.10.9-beta.81

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 (88) 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 +8 -4
  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/constants/wdt.js +13 -3
  26. package/dist/esm/components/Common/index.d.ts +1 -1
  27. package/dist/esm/components/Common/index.js +28 -9
  28. package/dist/esm/components/CommonHeaderGood/index.js +97 -42
  29. package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -1
  30. package/dist/esm/components/CommonMultiStatus/index.js +123 -6
  31. package/dist/esm/components/GY/GyGoods/index.d.ts +7 -0
  32. package/dist/esm/components/GY/GyGoods/index.js +6 -0
  33. package/dist/esm/components/GY/GyReissue/index.d.ts +7 -0
  34. package/dist/esm/components/GY/GyReissue/index.js +7 -3
  35. package/dist/esm/components/GY/GyReturn/index.d.ts +7 -0
  36. package/dist/esm/components/GY/GyReturn/index.js +7 -3
  37. package/dist/esm/components/JST/JstSendGood/index.d.ts +2 -1
  38. package/dist/esm/components/JST/JstSendGood/index.js +16 -2
  39. package/dist/esm/components/JST/JstSupply/index.d.ts +1 -1
  40. package/dist/esm/components/JST/JstSupply/index.js +3 -0
  41. package/dist/esm/components/KM/KmExchange/index.d.ts +7 -0
  42. package/dist/esm/components/KM/KmExchange/index.js +6 -0
  43. package/dist/esm/components/KmErpSendGood/index.d.ts +1 -1
  44. package/dist/esm/components/KmErpSendGood/index.js +3 -0
  45. package/dist/esm/components/LogisticsInterception/index.d.ts +3 -0
  46. package/dist/esm/components/LogisticsInterception/index.js +14 -7
  47. package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.d.ts +42 -0
  48. package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.js +102 -0
  49. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +2 -0
  50. package/dist/esm/components/LogisticsMoreInterception/index.js +19 -5
  51. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.d.ts +39 -0
  52. package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.js +101 -0
  53. package/dist/esm/components/MsgStatus/index.d.ts +1 -1
  54. package/dist/esm/components/MsgStatus/index.js +19 -12
  55. package/dist/esm/components/MultSelect/index.d.ts +1 -0
  56. package/dist/esm/components/MultSelect/index.js +17 -10
  57. package/dist/esm/components/Public/AsyncSelect/index.js +23 -22
  58. package/dist/esm/components/Public/Exchange/index.d.ts +14 -7
  59. package/dist/esm/components/Public/Exchange/index.js +19 -15
  60. package/dist/esm/components/Public/Goods/index.js +31 -18
  61. package/dist/esm/components/Public/ReissueGoods/index.d.ts +7 -0
  62. package/dist/esm/components/Public/ReissueGoods/index.js +7 -3
  63. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +1 -1
  64. package/dist/esm/components/Public/ReturnWarehouse/index.js +3 -0
  65. package/dist/esm/components/Reissue/Logistics/index.d.ts +1 -1
  66. package/dist/esm/components/Reissue/Logistics/index.js +3 -0
  67. package/dist/esm/components/Remark/index.d.ts +4 -1
  68. package/dist/esm/components/Remark/index.js +46 -9
  69. package/dist/esm/components/SKX/SkxGoods/index.d.ts +7 -0
  70. package/dist/esm/components/SKX/SkxGoods/index.js +6 -0
  71. package/dist/esm/components/Select/index.js +6 -0
  72. package/dist/esm/components/StatusSelect/index.d.ts +27 -1
  73. package/dist/esm/components/StatusSelect/index.js +44 -5
  74. package/dist/esm/components/WDT/WdtExchange/index.d.ts +7 -0
  75. package/dist/esm/components/WDT/WdtExchange/index.js +6 -0
  76. package/dist/esm/components/WDT/WdtGoods/index.d.ts +7 -0
  77. package/dist/esm/components/WDT/WdtGoods/index.js +6 -0
  78. package/dist/esm/components/WDT/WdtRessuie/index.d.ts +7 -0
  79. package/dist/esm/components/WDT/WdtRessuie/index.js +7 -3
  80. package/dist/esm/components/WDT/WdtReturn/index.d.ts +7 -0
  81. package/dist/esm/components/WDT/WdtReturn/index.js +6 -0
  82. package/dist/esm/constant.js +0 -3
  83. package/dist/esm/factory.d.ts +1 -1
  84. package/dist/esm/factory.js +17 -1
  85. package/dist/esm/service/api.d.ts +1 -0
  86. package/dist/esm/service/api.js +6 -0
  87. package/dist/esm/type.d.ts +2 -0
  88. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../../type';
2
- import React from 'react';
3
- import CommonHeaderGoods from '../../CommonHeaderGood';
4
- import type { FormInstance } from 'antd';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import CommonHeaderGoods from "../../CommonHeaderGood";
4
+ import type { FormInstance } from "antd";
5
5
  declare type ConfigType = {
6
6
  goodsKey: string;
7
7
  validator: any;
@@ -12,17 +12,24 @@ declare class Exchange implements ComponentInterface {
12
12
  sortField: string;
13
13
  type: string;
14
14
  rules: any[];
15
- componentConfig: ComponentInterface['componentConfig'];
16
- effects: ComponentInterface['effects'];
15
+ componentConfig: ComponentInterface["componentConfig"];
16
+ effects: ComponentInterface["effects"];
17
17
  isCombinationComponent: boolean;
18
18
  formField: string;
19
19
  canSort: boolean;
20
20
  children: ComponentInterface[];
21
- dataType: ComponentInterface['dataType'];
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;
@@ -8,28 +8,29 @@ 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';
11
+ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import { BsGoodsTable } from "../../Common";
14
14
  import ItemView from "../../../commonComponents/ItemView";
15
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
15
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  // import { BsType, BsMemo } from "../../Bs/common";
18
- import { CommonExchangeGoods } from '@kmkf-fe-packages/basic-components';
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
- if (typeof value === 'string') {
23
+ if (typeof value === "string") {
23
24
  return value ? +value : void 0;
24
25
  }
25
- if (typeof value === 'number') {
26
+ if (typeof value === "number") {
26
27
  return value;
27
28
  }
28
29
  return void 0;
29
30
  }
30
31
  var CONF_MAP = {
31
32
  JST_EXCHANGE_GOODS: {
32
- goodsKey: 'jstExchangeGoods',
33
+ goodsKey: "jstExchangeGoods",
33
34
  validator: function validator(_rule, value, type) {
34
35
  if (!_rule.required) return Promise.resolve();
35
36
  var validatorFlag = erpFormValidator(_rule, value, type);
@@ -58,12 +59,16 @@ 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
- var exchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || '[]');
71
+ var exchangeGoods = JSON.parse((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.config.goodsKey)]) || "[]");
67
72
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
68
73
  id: "".concat(_this.id, "-out"),
69
74
  label: "".concat(_this.name, "-\u6362\u51FA"),
@@ -100,7 +105,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
100
105
  required: false,
101
106
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
102
107
  display: p === null || p === void 0 ? void 0 : p.display,
103
- 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 : '',
108
+ 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 : "",
104
109
  component: /*#__PURE__*/React.createElement(CommonExchangeGoods, _extends({}, _this.componentConfig, {
105
110
  maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
106
111
  shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
@@ -118,7 +123,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
118
123
  type: item.type,
119
124
  id: "".concat(item.id, "_").concat(_this.config.goodsKey),
120
125
  name: "".concat(_this.name, "-\u6362\u51FA"),
121
- filterComponentType: 'Input'
126
+ filterComponentType: "Input"
122
127
  }];
123
128
  });
124
129
  this.name = options.name;
@@ -133,7 +138,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
133
138
  this.form = (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.form;
134
139
  this.returnGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
135
140
  id: "".concat(options.id, "_").concat(this.config.goodsKey),
136
- name: '商品信息'
141
+ name: "商品信息"
137
142
  }));
138
143
  this.children = [this.returnGoods];
139
144
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
@@ -142,7 +147,7 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
142
147
  validator: function validator(_, value) {
143
148
  var _this$componentConfig7, _value$_this$config$g;
144
149
  if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.required && !(value !== null && value !== void 0 && (_value$_this$config$g = value[_this.config.goodsKey]) !== null && _value$_this$config$g !== void 0 && _value$_this$config$g.length)) {
145
- return Promise.reject(new Error('请选择换货商品'));
150
+ return Promise.reject(new Error("请选择换货商品"));
146
151
  }
147
152
  return Promise.resolve();
148
153
  }
@@ -150,11 +155,10 @@ var Exchange = /*#__PURE__*/_createClass(function Exchange(options) {
150
155
  required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
151
156
  validator: function validator(_rule, value) {
152
157
  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
- };
158
+ 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)) || Promise.resolve();
156
159
  }
157
160
  }];
158
- this.dataType = 'object';
161
+ this.dataType = "object";
162
+ this.sortChildField = this.getSortChildFields();
159
163
  });
160
164
  export default Exchange;
@@ -14,8 +14,8 @@ import { BsGoodsTable } from "../../Common";
14
14
  import CommonHeaderGoods from "../../CommonHeaderGood";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
- import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
- import { getColumnsMap } from "../../Common/constants/columnsBaseInfoMap";
17
+ import { CommonGoods as Goods, erpFormValidator } from "@kmkf-fe-packages/basic-components";
18
+ import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
19
19
  import { SYMBOL } from "../../../constant";
20
20
  var CONFIG_MAP = {
21
21
  JST_GOODS: {
@@ -26,6 +26,10 @@ var CONFIG_MAP = {
26
26
  name: "快麦ERP",
27
27
  key: "kmGoods"
28
28
  },
29
+ KM_AFTERSALE_GOODS: {
30
+ name: "快麦ERP售后",
31
+ key: "kmAftersaleGoods"
32
+ },
29
33
  JY_GOODS: {
30
34
  name: "巨益",
31
35
  key: "jyGoods",
@@ -41,7 +45,19 @@ var CONFIG_MAP = {
41
45
  },
42
46
  DXD_SUPPLIERS: {
43
47
  name: "大希地供应商",
44
- key: "dxdSuppliers"
48
+ key: "dxdSuppliers",
49
+ validator: function validator(_rule, value, type, componentConfig) {
50
+ if (!_rule.required) return Promise.resolve();
51
+ var validatorResult = erpFormValidator(_rule, value, type, componentConfig);
52
+ if (validatorResult) {
53
+ return validatorResult;
54
+ }
55
+ return Promise.resolve();
56
+ }
57
+ },
58
+ TTX_GOODS: {
59
+ name: "通天晓",
60
+ key: "ttxGoods"
45
61
  },
46
62
  WDT_AFTERSALE_GOODS: {
47
63
  name: "旺店通售后",
@@ -79,17 +95,7 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
79
95
  _defineProperty(this, "standardDateType", void 0);
80
96
  _defineProperty(this, "sortChildField", void 0);
81
97
  _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
- });
98
+ return getGoodsSortChildFields(_this.type, _this.id);
93
99
  });
94
100
  _defineProperty(this, "renderClient", function (record) {
95
101
  var _record, _CONFIG_MAP$_this$typ, _this$componentConfig;
@@ -169,17 +175,24 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
169
175
  }));
170
176
  this.children = [this.headers];
171
177
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
172
- this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
173
- required: true,
178
+ var isRequired = !!(this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required);
179
+ this.rules = [{
180
+ required: isRequired,
174
181
  validator: function validator(_, value) {
175
182
  var _value$key;
176
- if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
183
+ if (isRequired && (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length))) {
177
184
  var _CONFIG_MAP$_this$typ6;
178
185
  return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat((_CONFIG_MAP$_this$typ6 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ6 === void 0 ? void 0 : _CONFIG_MAP$_this$typ6.name, "\u5546\u54C1")));
179
186
  }
180
187
  return Promise.resolve();
181
188
  }
182
- }] : [];
189
+ }, {
190
+ required: isRequired,
191
+ validator: function validator(_rule, value) {
192
+ var _CONFIG_MAP$_this$typ7, _CONFIG_MAP$_this$typ8;
193
+ return ((_CONFIG_MAP$_this$typ7 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ7 === void 0 ? void 0 : (_CONFIG_MAP$_this$typ8 = _CONFIG_MAP$_this$typ7.validator) === null || _CONFIG_MAP$_this$typ8 === void 0 ? void 0 : _CONFIG_MAP$_this$typ8.call(_CONFIG_MAP$_this$typ7, _rule, value, _this.type, _this.componentConfig)) || Promise.resolve();
194
+ }
195
+ }];
183
196
  this.dataType = "object";
184
197
  this.sortChildField = this.getSortChildFields();
185
198
  this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
@@ -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, {
@@ -325,11 +330,10 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
325
330
  required: isRequired,
326
331
  validator: function validator(_rule, value) {
327
332
  var _typeMap$options$type14, _typeMap$options$type15;
328
- return ((_typeMap$options$type14 = typeMap[options.type]) === null || _typeMap$options$type14 === void 0 ? void 0 : (_typeMap$options$type15 = _typeMap$options$type14.validator) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.call(_typeMap$options$type14, _rule, value, options.type, _this.componentConfig)) || function () {
329
- return Promise.resolve();
330
- };
333
+ return ((_typeMap$options$type14 = typeMap[options.type]) === null || _typeMap$options$type14 === void 0 ? void 0 : (_typeMap$options$type15 = _typeMap$options$type14.validator) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.call(_typeMap$options$type14, _rule, value, options.type, _this.componentConfig)) || Promise.resolve();
331
334
  }
332
335
  }];
333
336
  this.dataType = "object";
337
+ this.sortChildField = this.getSortChildFields();
334
338
  });
335
339
  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,11 @@
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
+ 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
9
  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
10
  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
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -6,7 +13,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
13
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
14
  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
15
  import React from 'react';
9
- import { Remark } from '@kmkf-fe-packages/basic-components';
16
+ import { Remark, YouzanStar } from '@kmkf-fe-packages/basic-components';
10
17
  import GetFormItem from "../GetFormItem";
11
18
  import trade0 from "./flag/trade-icon-flag-0.png";
12
19
  import trade1 from "./flag/trade-icon-flag-1.png";
@@ -16,7 +23,7 @@ import trade4 from "./flag/trade-icon-flag-4.png";
16
23
  import trade5 from "./flag/trade-icon-flag-5.png";
17
24
  import get from 'lodash/get';
18
25
  import ItemView from "../../commonComponents/ItemView";
19
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
26
+ import { isNull, filterFn as _filterFn, isYouzanShop, normalizeYouzanStar } from '@kmkf-fe-packages/kmkf-utils';
20
27
  import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
21
28
  var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
22
29
  var _this = this,
@@ -34,14 +41,30 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
34
41
  _defineProperty(this, "formField", void 0);
35
42
  _defineProperty(this, "canSort", void 0);
36
43
  _defineProperty(this, "children", void 0);
44
+ _defineProperty(this, "effects", void 0);
37
45
  _defineProperty(this, "dataType", void 0);
46
+ _defineProperty(this, "getShop", function (record) {
47
+ var _this$effects, _this$effects2, _this$effects2$form, _this$effects3, _this$effects3$shopLi;
48
+ 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'));
49
+ 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) {
50
+ return shop.shopId === shopId;
51
+ });
52
+ });
53
+ _defineProperty(this, "isYouzan", function (record) {
54
+ return isYouzanShop(_this.getShop(record));
55
+ });
38
56
  _defineProperty(this, "render", function (value) {
57
+ var isYouzan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
39
58
  var index = get(value, 'flag');
40
59
  return /*#__PURE__*/React.createElement("div", {
41
60
  style: {
42
61
  display: 'inline-block'
43
62
  }
44
- }, index !== undefined && /*#__PURE__*/React.createElement("img", {
63
+ }, isYouzan ? normalizeYouzanStar(index) ? /*#__PURE__*/React.createElement(YouzanStar, {
64
+ compact: true,
65
+ disabled: true,
66
+ value: index
67
+ }) : null : index !== undefined && /*#__PURE__*/React.createElement("img", {
45
68
  src: _this.imgList[Number(index)]
46
69
  }), /*#__PURE__*/React.createElement("span", null, get(value, 'remark')));
47
70
  });
@@ -49,7 +72,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
49
72
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
50
73
  id: _this.id,
51
74
  label: _this.name,
52
- value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id])
75
+ value: _this.render(record === null || record === void 0 ? void 0 : record[_this.id], _this.isYouzan(record))
53
76
  }) : null;
54
77
  });
55
78
  _defineProperty(this, "renderPc", function (value, record) {
@@ -57,11 +80,16 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
57
80
  return /*#__PURE__*/React.createElement("span", null, "--");
58
81
  }
59
82
  var index = get(record, "".concat(_this.id, "_flag"));
83
+ var isYouzan = _this.isYouzan(record);
60
84
  return /*#__PURE__*/React.createElement("div", {
61
85
  style: {
62
86
  display: 'inline-block'
63
87
  }
64
- }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? index !== undefined && /*#__PURE__*/React.createElement("img", {
88
+ }, !isNull(get(record, "".concat(_this.id, "_flag"))) ? isYouzan ? normalizeYouzanStar(index) && /*#__PURE__*/React.createElement(YouzanStar, {
89
+ compact: true,
90
+ disabled: true,
91
+ value: index
92
+ }) : index !== undefined && /*#__PURE__*/React.createElement("img", {
65
93
  src: _this.imgList[Number(index)]
66
94
  }) :
67
95
  // <i
@@ -94,7 +122,9 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
94
122
  display: p === null || p === void 0 ? void 0 : p.display,
95
123
  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
124
  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)
125
+ component: /*#__PURE__*/React.createElement(Remark, _extends({}, _this.componentConfig, {
126
+ isYouzan: _this.isYouzan()
127
+ }))
98
128
  });
99
129
  });
100
130
  _defineProperty(this, "filterConfig", function (item) {
@@ -111,7 +141,10 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
111
141
  // 过滤组件名称
112
142
  filterComponentType: 'SelectInput',
113
143
  props: {
114
- filterOptions: SEARCH_OPTIONS
144
+ filterOptions: [].concat(_toConsumableArray(SEARCH_OPTIONS), [{
145
+ label: "关键词不包含",
146
+ value: "nincludeLike"
147
+ }])
115
148
  },
116
149
  filterFn: function filterFn(value) {
117
150
  return function (i) {
@@ -170,6 +203,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
170
203
  this.formField = "".concat(options.id, "_remark");
171
204
  this.type = options.type;
172
205
  this.componentConfig = options.componentConfig;
206
+ this.effects = options.effects;
173
207
  this.dataType = 'object';
174
208
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
175
209
  validator: function validator(_, value) {
@@ -177,8 +211,11 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
177
211
  if (!(value !== null && value !== void 0 && value.remark)) {
178
212
  return Promise.reject(new Error('请输入备注'));
179
213
  }
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('请选择旗帜'));
214
+ if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.isShowFlag) {
215
+ var flag = _this.isYouzan() ? normalizeYouzanStar(value === null || value === void 0 ? void 0 : value.flag) : value === null || value === void 0 ? void 0 : value.flag;
216
+ if (!flag && flag !== 0) {
217
+ return Promise.reject(new Error(_this.isYouzan() ? '请选择星标' : '请选择旗帜'));
218
+ }
182
219
  }
183
220
  return Promise.resolve();
184
221
  }
@@ -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;
@@ -37,6 +37,12 @@ var typeMap = {
37
37
  },
38
38
  JST_OUTBOUND_STATUS: {
39
39
  key: "jstOutboundStatus"
40
+ },
41
+ PLATFORM_TRANSIT_FLAG: {
42
+ key: "platformTransitFlag"
43
+ },
44
+ PLATFORM_TRANSIT_TYPE: {
45
+ key: "platformTransitType"
40
46
  }
41
47
  };
42
48
  var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
@@ -11,6 +11,7 @@ declare class StatusSelect implements ComponentInterface {
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
+ sortChildField?: ComponentInterface["sortChildField"];
14
15
  dataType: ComponentInterface["dataType"];
15
16
  options: ComponentInterface["options"];
16
17
  constructor(options: PickOption);
@@ -34,6 +35,31 @@ declare class StatusSelect implements ComponentInterface {
34
35
  }[];
35
36
  };
36
37
  filterFn: (value: string) => (i: Record) => boolean;
37
- };
38
+ } | ({
39
+ searchDefaultConditions: "in";
40
+ type: string;
41
+ id: string;
42
+ name: string;
43
+ filterComponentType: "MultipleSelect";
44
+ props: {
45
+ options: {
46
+ value: string;
47
+ label: string;
48
+ color: string;
49
+ }[];
50
+ };
51
+ filterFn: (value: string) => (i: Record) => boolean;
52
+ } | {
53
+ searchDefaultConditions: "anylike";
54
+ type: string;
55
+ id: string;
56
+ name: string;
57
+ filterComponentType: "Input";
58
+ props: {
59
+ placeholder: string;
60
+ };
61
+ filterFn: (value: string) => (i: Record) => boolean;
62
+ formatFilterValue: (val: string) => string | string[];
63
+ })[];
38
64
  }
39
65
  export default StatusSelect;