@kmkf-fe-packages/services-components 2.0.0-rc.0 → 2.0.0-rc.2

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 (35) hide show
  1. package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
  2. package/dist/esm/commonComponents/GlobalContext/index.js +3 -2
  3. package/dist/esm/components/ActualPayment/index.js +5 -3
  4. package/dist/esm/components/BS/BsLogistics/index.d.ts +1 -0
  5. package/dist/esm/components/BS/BsLogistics/index.js +23 -10
  6. package/dist/esm/components/BS/BsSystemOrder/index.js +139 -23
  7. package/dist/esm/components/BS/common/BsMemo.js +2 -1
  8. package/dist/esm/components/BS/common/BsType.js +2 -1
  9. package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
  10. package/dist/esm/components/BS/common/expressCode.js +3 -0
  11. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  12. package/dist/esm/components/BsE3/BsGoods/index.d.ts +33 -0
  13. package/dist/esm/components/BsE3/BsGoods/index.js +123 -0
  14. package/dist/esm/components/BsE3/BsReissueE3/index.d.ts +58 -0
  15. package/dist/esm/components/BsE3/BsReissueE3/index.js +191 -0
  16. package/dist/esm/components/BsE3/ReissueGift/index.d.ts +26 -0
  17. package/dist/esm/components/BsE3/ReissueGift/index.js +83 -0
  18. package/dist/esm/components/Cascader/index.d.ts +1 -1
  19. package/dist/esm/components/Cascader/index.js +34 -18
  20. package/dist/esm/components/Common/index.js +241 -6
  21. package/dist/esm/components/CommonHeaderGood/index.js +285 -1
  22. package/dist/esm/components/JST/JstSendGood/index.js +41 -31
  23. package/dist/esm/components/KmErpSendGood/index.js +7 -7
  24. package/dist/esm/components/Picture/index.d.ts +5 -5
  25. package/dist/esm/components/Picture/index.js +23 -22
  26. package/dist/esm/components/Select/index.d.ts +1 -0
  27. package/dist/esm/components/Select/index.js +22 -7
  28. package/dist/esm/factory.d.ts +2 -2
  29. package/dist/esm/factory.js +9 -1
  30. package/dist/esm/index.d.ts +2 -0
  31. package/dist/esm/index.js +2 -0
  32. package/dist/esm/service/api.d.ts +2 -1
  33. package/dist/esm/service/api.js +25 -5
  34. package/dist/esm/type.d.ts +5 -0
  35. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryBsE3LogisticsCompany" | "querySendData";
3
3
  declare const Global: ({ children, requestList, repeatRequestList, }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useEffect, useState } from "react";
17
17
  import { Skeleton, Button, Alert, Space } from "antd";
18
- import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
18
+ import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryBsE3LogisticsCompany, querySendData } from "../../service/api";
19
19
  import { servers } from "@kmkf-fe-packages/kmkf-utils";
20
20
  var Global = function Global(_ref) {
21
21
  var children = _ref.children,
@@ -43,7 +43,8 @@ var Global = function Global(_ref) {
43
43
  queryLabel: queryLabel,
44
44
  queryWdtAddressData: servers.queryWdtAddressData,
45
45
  queryWdtLogisticsCompany: queryWdtLogisticsCompany,
46
- queryWdtSendData: queryWdtSendData
46
+ queryBsE3LogisticsCompany: queryBsE3LogisticsCompany,
47
+ querySendData: querySendData
47
48
  };
48
49
  mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
49
50
  promises = [];
@@ -19,7 +19,8 @@ var typeMap = {
19
19
  ACTUAL_PAYMENT: 'actualPayment',
20
20
  BS_NET_RECEIPTS: 'bsNetReceipts',
21
21
  BS_DEPOSIT: 'bsDeposit',
22
- BS_PACKAGE_WEIGHT: 'bsPackageWeight'
22
+ BS_PACKAGE_WEIGHT: 'bsPackageWeight',
23
+ ACTUAL_RECEIPT_PAYMENT: 'actualReceiptPayment'
23
24
  };
24
25
  var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
25
26
  var _this = this;
@@ -162,7 +163,7 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
162
163
  this.canSort = true;
163
164
  this.children = [];
164
165
  this.componentConfig = options.componentConfig;
165
- this.rules = options.type === 'ACTUAL_PAYMENT' ? [{
166
+ this.rules = ['ACTUAL_PAYMENT', 'ACTUAL_RECEIPT_PAYMENT'].includes(options.type) ? [{
166
167
  pattern: /^\d+(\.\d{1,2})?$/,
167
168
  message: '字段为正数或最多两位小数'
168
169
  }] : [{
@@ -173,7 +174,8 @@ var ActualPayment = /*#__PURE__*/_createClass(function ActualPayment(options) {
173
174
  ACTUAL_PAYMENT: 'actualPayment',
174
175
  BS_NET_RECEIPTS: 'bsNetReceipts',
175
176
  BS_DEPOSIT: 'bsDeposit',
176
- BS_PACKAGE_WEIGHT: 'bsPackageWeight'
177
+ BS_PACKAGE_WEIGHT: 'bsPackageWeight',
178
+ ACTUAL_RECEIPT_PAYMENT: 'actualReceiptPayment'
177
179
  };
178
180
  });
179
181
  export default ActualPayment;
@@ -14,6 +14,7 @@ declare class BsLogistics implements ComponentInterface {
14
14
  [key: string]: any;
15
15
  }[];
16
16
  type: string;
17
+ platformType: string;
17
18
  rules: any[];
18
19
  componentConfig: ComponentInterface["componentConfig"];
19
20
  expressDateInstance: InstanceType<typeof ExpressData>;
@@ -23,19 +23,29 @@ var typeMap = {
23
23
  key: "bsLogisticsList",
24
24
  name: "bs",
25
25
  company: "bsLogisticsCompany",
26
- code: "bsLogisticsCode"
26
+ code: "bsLogisticsCode",
27
+ platformType: "default"
28
+ },
29
+ BS_E3_LOGISTICS: {
30
+ key: "bsE3LogisticsList",
31
+ name: "bsE3",
32
+ company: "bsE3LogisticsCompany",
33
+ code: "bsE3LogisticsCode",
34
+ platformType: "bsE3"
27
35
  },
28
36
  WLN_LOGISTICS: {
29
37
  key: "wlnLogisticsList",
30
38
  name: "万里牛",
31
39
  company: "wlnLogisticsCompany",
32
- code: "wlnLogisticsCode"
40
+ code: "wlnLogisticsCode",
41
+ platformType: "default"
33
42
  },
34
43
  WDT_LOGISTICS: {
35
44
  key: "wdtLogisticsList",
36
45
  name: "旺店通",
37
46
  company: "wdtLogisticsCompany",
38
- code: "wdtLogisticsCode"
47
+ code: "wdtLogisticsCode",
48
+ platformType: "wdt"
39
49
  }
40
50
  };
41
51
  var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
@@ -46,6 +56,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
46
56
  _typeMap$_options$typ4,
47
57
  _typeMap$_options$typ5,
48
58
  _typeMap$_options$typ6,
59
+ _typeMap$_options$typ7,
49
60
  _this$componentConfig5,
50
61
  _this$componentConfig7;
51
62
  _classCallCheck(this, BsLogistics);
@@ -54,6 +65,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
54
65
  _defineProperty(this, "sortField", void 0);
55
66
  _defineProperty(this, "sortChildField", void 0);
56
67
  _defineProperty(this, "type", void 0);
68
+ _defineProperty(this, "platformType", void 0);
57
69
  _defineProperty(this, "rules", void 0);
58
70
  _defineProperty(this, "componentConfig", void 0);
59
71
  _defineProperty(this, "expressDateInstance", void 0);
@@ -74,7 +86,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
74
86
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
75
87
  list: record === null || record === void 0 ? void 0 : record[_this.id],
76
88
  type: 1,
77
- platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
89
+ platformType: _this.platformType
78
90
  })
79
91
  }) : null;
80
92
  });
@@ -104,7 +116,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
104
116
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
105
117
  list: list,
106
118
  type: 1,
107
- platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
119
+ platformType: _this.platformType
108
120
  }));
109
121
  });
110
122
  _defineProperty(this, "renderLog", function (r) {
@@ -132,7 +144,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
132
144
  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 : '',
133
145
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
134
146
  type: 1,
135
- platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default',
147
+ platformType: _this.platformType,
136
148
  options: _this.expressDateInstance.getExpressData(),
137
149
  onChange: p === null || p === void 0 ? void 0 : p.onChange
138
150
  }))
@@ -151,20 +163,21 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
151
163
  this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
152
164
  this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
153
165
  this.type = _options.type;
166
+ this.platformType = (_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.platformType;
154
167
  this.componentConfig = _options.componentConfig;
155
168
  this.isCombinationComponent = true;
156
169
  this.canSort = false;
157
170
  this.expressCompany = new ExpressCompany(_objectSpread(_objectSpread({}, _options), {}, {
158
171
  name: "物流公司",
159
172
  parentName: this.name,
160
- id: "".concat(_options.id, "_").concat((_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.key, "_").concat((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.company),
173
+ id: "".concat(_options.id, "_").concat((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.key, "_").concat((_typeMap$_options$typ5 = typeMap[_options.type]) === null || _typeMap$_options$typ5 === void 0 ? void 0 : _typeMap$_options$typ5.company),
161
174
  width: 200,
162
- platformType: this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
175
+ platformType: this.platformType
163
176
  }));
164
177
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, _options), {}, {
165
178
  name: "物流单号",
166
179
  parentName: this.name,
167
- id: "".concat(_options.id, "_").concat((_typeMap$_options$typ5 = typeMap[_options.type]) === null || _typeMap$_options$typ5 === void 0 ? void 0 : _typeMap$_options$typ5.key, "_").concat((_typeMap$_options$typ6 = typeMap[_options.type]) === null || _typeMap$_options$typ6 === void 0 ? void 0 : _typeMap$_options$typ6.code),
180
+ id: "".concat(_options.id, "_").concat((_typeMap$_options$typ6 = typeMap[_options.type]) === null || _typeMap$_options$typ6 === void 0 ? void 0 : _typeMap$_options$typ6.key, "_").concat((_typeMap$_options$typ7 = typeMap[_options.type]) === null || _typeMap$_options$typ7 === void 0 ? void 0 : _typeMap$_options$typ7.code),
168
181
  width: 200
169
182
  }));
170
183
  this.children = [this.expressCompany, this.expressCode];
@@ -189,7 +202,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
189
202
  return Promise.resolve();
190
203
  }
191
204
  }] : [];
192
- this.expressDateInstance = ExpressData.getInstance(this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
205
+ this.expressDateInstance = ExpressData.getInstance(this.platformType);
193
206
  this.sortChildField = this.getSortChildFields(((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.showField) || "", _options);
194
207
  });
195
208
  export default BsLogistics;
@@ -11,7 +11,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
11
11
  import React from 'react';
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { isNull, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_ORDER_STATUS_MAP } from '@kmkf-fe-packages/kmkf-utils';
15
15
  import { BsSystemOrder as SystemOrder } from '@kmkf-fe-packages/basic-components';
16
16
  import { BsSystemOrderTable } from "../../Common";
17
17
  import { BsHeaderChild } from "../common/index";
@@ -20,27 +20,149 @@ var typeMap = {
20
20
  BS_SYSTEM_ORDER: {
21
21
  key: 'bsSystemShowOrder',
22
22
  name: 'bs',
23
- typeName: '单据类型',
24
- tagName: '标签',
25
- selectId: 'bsSystemSelectIds'
23
+ selectId: 'bsSystemSelectIds',
24
+ columns: [{
25
+ title: "单据类型",
26
+ dataIndex: "billType",
27
+ width: 150
28
+ }, {
29
+ title: "系统订单号",
30
+ dataIndex: "billNo",
31
+ width: 150
32
+ }, {
33
+ title: "标签",
34
+ dataIndex: "billTag",
35
+ width: 150
36
+ }, {
37
+ title: '主播名称',
38
+ dataIndex: 'authorName',
39
+ width: 150
40
+ }, {
41
+ title: '主播ID',
42
+ dataIndex: 'authorId',
43
+ width: 150
44
+ }
45
+ // {
46
+ // title: '直播活动',
47
+ // dataIndex: 'liveActivites',
48
+ // width: 150,
49
+ // },
50
+ ]
26
51
  },
52
+
27
53
  WLN_SYSTEM_ORDER: {
28
54
  key: 'wlnSystemShowOrder',
29
55
  name: '万里牛',
30
- typeName: '订单类型',
31
- tagName: '标记',
32
- selectId: 'wlnSystemSelectIds'
56
+ selectId: 'wlnSystemSelectIds',
57
+ columns: [{
58
+ title: "订单类型",
59
+ dataIndex: "billType",
60
+ width: 150
61
+ }, {
62
+ title: "系统订单号",
63
+ dataIndex: "billNo",
64
+ width: 150
65
+ }, {
66
+ title: "标记",
67
+ dataIndex: "billTag",
68
+ width: 150
69
+ }]
33
70
  },
34
71
  WDT_SYSTEM_ORDER: {
35
72
  key: "wdtSystemShowOrder",
36
73
  name: "旺店通",
37
- typeName: "订单类型",
38
- tagName: "订单标签",
39
- selectId: "wdtSystemSelectIds"
74
+ selectId: "wdtSystemSelectIds",
75
+ columns: [{
76
+ title: "订单类型",
77
+ dataIndex: "billType",
78
+ width: 150
79
+ }, {
80
+ title: "系统订单号",
81
+ dataIndex: "billNo",
82
+ width: 150
83
+ }, {
84
+ title: "订单标签",
85
+ dataIndex: "billTag",
86
+ width: 150
87
+ }]
88
+ },
89
+ BS_E3_SYSTEM_ORDER: {
90
+ key: "bsE3SystemShowOrder",
91
+ name: "百胜",
92
+ selectId: "bsE3SystemSelectIds",
93
+ columns: [{
94
+ title: "系统订单号",
95
+ dataIndex: "orderSn",
96
+ width: 150,
97
+ ellipsis: true
98
+ }, {
99
+ title: "订单状态",
100
+ dataIndex: "orderStatus",
101
+ width: 100,
102
+ ellipsis: true,
103
+ render: function render(val) {
104
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_ORDER_STATUS_MAP[val] || val);
105
+ }
106
+ }, {
107
+ title: "是否被拆分",
108
+ dataIndex: "isSplit",
109
+ width: 100,
110
+ ellipsis: true,
111
+ render: function render(val) {
112
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
113
+ }
114
+ }, {
115
+ title: "是否拆分子单",
116
+ dataIndex: "isSplitNew",
117
+ width: 100,
118
+ ellipsis: true,
119
+ render: function render(val) {
120
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
121
+ }
122
+ }, {
123
+ title: "是否被合并",
124
+ dataIndex: "isCombine",
125
+ width: 100,
126
+ ellipsis: true,
127
+ render: function render(val) {
128
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
129
+ }
130
+ }, {
131
+ title: "是否合并新单",
132
+ dataIndex: "isCombineNew",
133
+ width: 100,
134
+ ellipsis: true,
135
+ render: function render(val) {
136
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
137
+ }
138
+ }, {
139
+ title: "是否复制单",
140
+ dataIndex: "isCopy",
141
+ width: 100,
142
+ ellipsis: true,
143
+ render: function render(val) {
144
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
145
+ }
146
+ }, {
147
+ title: "是否换货单",
148
+ dataIndex: "isExchangeOrder",
149
+ width: 100,
150
+ ellipsis: true,
151
+ render: function render(val) {
152
+ return /*#__PURE__*/React.createElement("span", null, BS_E3_BOOLEAN_STATUS_MAP[val] || val);
153
+ }
154
+ }, {
155
+ title: "订单备注",
156
+ dataIndex: "orderMsg",
157
+ width: 150,
158
+ ellipsis: true
159
+ }]
40
160
  }
41
161
  };
42
162
  var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
43
163
  var _this = this,
164
+ _typeMap$options$type,
165
+ _typeMap$options$type2,
44
166
  _this$componentConfig3;
45
167
  _classCallCheck(this, BsSystemOrder);
46
168
  _defineProperty(this, "name", void 0);
@@ -122,19 +244,13 @@ var BsSystemOrder = /*#__PURE__*/_createClass(function BsSystemOrder(options) {
122
244
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
123
245
  this.isCombinationComponent = true;
124
246
  this.canSort = false;
125
- this.children = [new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
126
- name: typeMap[options.type].typeName,
127
- id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billType"),
128
- width: 150
129
- })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
130
- name: '系统订单号',
131
- id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billNo"),
132
- width: 150
133
- })), new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
134
- name: typeMap[options.type].tagName,
135
- id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_billTag"),
136
- width: 150
137
- }))];
247
+ this.children = ((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : (_typeMap$options$type2 = _typeMap$options$type.columns) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.map(function (column) {
248
+ return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
249
+ name: column.title,
250
+ id: "".concat(options.id, "_").concat(typeMap[options.type].key, "_").concat(column.dataIndex),
251
+ width: column.width || 150
252
+ }));
253
+ })) || [];
138
254
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
139
255
  this.rules = this !== null && this !== void 0 && (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
140
256
  required: true,
@@ -19,7 +19,8 @@ var componentType = {
19
19
  BS_REISSUE_GOODS: 'bsReissueType',
20
20
  BS_RETURN_GOODS: 'bsReturnType',
21
21
  WDT_REISSUE_GOODS: 'wdtReissueType',
22
- WDT_RETURN_GOODS: 'wdtReturnType'
22
+ WDT_RETURN_GOODS: 'wdtReturnType',
23
+ BS_E3_REISSUE_GOODS: 'bsE3ReissueType'
23
24
  };
24
25
  var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
25
26
  var _this = this;
@@ -20,7 +20,8 @@ var componentType = {
20
20
  BS_REISSUE_GOODS: 'bsReissueType',
21
21
  BS_RETURN_GOODS: 'bsReturnType',
22
22
  WDT_REISSUE_GOODS: 'wdtReissueType',
23
- WDT_RETURN_GOODS: 'wdtReturnType'
23
+ WDT_RETURN_GOODS: 'wdtReturnType',
24
+ BS_E3_REISSUE_GOODS: 'bsE3ReissueType'
24
25
  };
25
26
  var BsType = /*#__PURE__*/_createClass(function BsType(options) {
26
27
  var _this = this;
@@ -15,7 +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
- WDT_REISSUE_GOODS: "wdtSystemOrderNo"
18
+ WDT_REISSUE_GOODS: "wdtSystemOrderNo",
19
+ BS_E3_REISSUE_GOODS: "bsE3SystemOrderNo"
19
20
  };
20
21
  var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
21
22
  var _this = this;
@@ -19,6 +19,9 @@ var typeMap = {
19
19
  BS_LOGISTICS: {
20
20
  key: "bsLogisticsItem"
21
21
  },
22
+ BS_E3_LOGISTICS: {
23
+ key: "bsE3LogisticsItem"
24
+ },
22
25
  WLN_LOGISTICS: {
23
26
  key: "wlnLogisticsItem"
24
27
  },
@@ -20,6 +20,9 @@ var typeMap = {
20
20
  BS_LOGISTICS: {
21
21
  key: "bsLogisticsItem"
22
22
  },
23
+ BS_E3_LOGISTICS: {
24
+ key: "bsE3LogisticsItem"
25
+ },
23
26
  WLN_LOGISTICS: {
24
27
  key: "wlnLogisticsItem"
25
28
  },
@@ -0,0 +1,33 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import CommonHeaderGoods from "../../CommonHeaderGood";
4
+ declare class BSE3Goods implements ComponentInterface {
5
+ name: string;
6
+ id: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
+ effects: ComponentInterface["effects"];
12
+ isCombinationComponent: boolean;
13
+ formField: string;
14
+ canSort: boolean;
15
+ children: ComponentInterface[];
16
+ dataType: ComponentInterface["dataType"];
17
+ bsE3Goods: CommonHeaderGoods;
18
+ constructor(options: PickOption);
19
+ renderClient: (record: any) => React.JSX.Element | null;
20
+ renderPc: () => null;
21
+ renderLog: (r: Record) => React.JSX.Element | null;
22
+ getComponentValue: (r: Record) => any;
23
+ renderExport: () => null;
24
+ editRender: (p: any) => React.JSX.Element;
25
+ filterConfig: (item: ColumnConfig) => {
26
+ searchDefaultConditions: "like";
27
+ type: string;
28
+ id: string;
29
+ name: string;
30
+ filterComponentType: "Input";
31
+ }[];
32
+ }
33
+ export default BSE3Goods;
@@ -0,0 +1,123 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ 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); }
5
+ 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); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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";
12
+ import GetFormItem from "../../GetFormItem";
13
+ import { BsGoodsTable } from "../../Common";
14
+ import CommonHeaderGoods from "../../CommonHeaderGood";
15
+ import ItemView from "../../../commonComponents/ItemView";
16
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
+ import { SYMBOL } from "../../../constant";
19
+ var BSE3Goods = /*#__PURE__*/_createClass(function BSE3Goods(options) {
20
+ var _this = this,
21
+ _this$componentConfig6;
22
+ _classCallCheck(this, BSE3Goods);
23
+ _defineProperty(this, "name", void 0);
24
+ _defineProperty(this, "id", void 0);
25
+ _defineProperty(this, "sortField", void 0);
26
+ _defineProperty(this, "type", void 0);
27
+ _defineProperty(this, "rules", void 0);
28
+ _defineProperty(this, "componentConfig", void 0);
29
+ _defineProperty(this, "effects", void 0);
30
+ _defineProperty(this, "isCombinationComponent", void 0);
31
+ _defineProperty(this, "formField", void 0);
32
+ _defineProperty(this, "canSort", void 0);
33
+ _defineProperty(this, "children", void 0);
34
+ _defineProperty(this, "dataType", void 0);
35
+ _defineProperty(this, "bsE3Goods", void 0);
36
+ _defineProperty(this, "renderClient", function (record) {
37
+ var _record, _this$componentConfig;
38
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
39
+ id: _this.id,
40
+ label: _this.name,
41
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
42
+ type: _this.type,
43
+ list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.bsE3Goods) || [],
44
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
45
+ })
46
+ })) : null;
47
+ });
48
+ _defineProperty(this, "renderPc", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "renderLog", function (r) {
52
+ var _this$componentConfig2;
53
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsE3Goods")])) return null;
54
+ return /*#__PURE__*/React.createElement(BsGoodsTable, {
55
+ type: _this.type,
56
+ list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsE3Goods")]) || [],
57
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
58
+ });
59
+ });
60
+ _defineProperty(this, "getComponentValue", function (r) {
61
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsE3Goods")];
62
+ });
63
+ _defineProperty(this, "renderExport", function () {
64
+ return null;
65
+ });
66
+ _defineProperty(this, "editRender", function (p) {
67
+ var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
68
+ return /*#__PURE__*/React.createElement(GetFormItem, {
69
+ title: _this.name,
70
+ name: _this.id,
71
+ rules: _this.rules,
72
+ required: false,
73
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
74
+ display: p === null || p === void 0 ? void 0 : p.display,
75
+ 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 : '',
76
+ component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
77
+ maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
78
+ shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
79
+ shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
80
+ companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
81
+ type: _this.type,
82
+ width: "90%"
83
+ }))
84
+ });
85
+ });
86
+ _defineProperty(this, "filterConfig", function (item) {
87
+ return [{
88
+ searchDefaultConditions: SYMBOL.like,
89
+ type: item.type,
90
+ id: "".concat(item.id, "_bsE3Goods"),
91
+ // 过滤组件id
92
+ name: item.name,
93
+ // 过滤组件名称
94
+ filterComponentType: "Input"
95
+ }];
96
+ });
97
+ this.name = options.name;
98
+ this.id = options.id;
99
+ this.sortField = "".concat(options.id, "_bsE3Goods");
100
+ this.formField = "".concat(options.id, "_bsE3Goods");
101
+ this.type = options.type;
102
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
103
+ this.isCombinationComponent = true;
104
+ this.canSort = false;
105
+ this.bsE3Goods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
106
+ id: "".concat(options.id, "_bsE3Goods"),
107
+ name: "商品信息"
108
+ }));
109
+ this.children = [this.bsE3Goods];
110
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
111
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
112
+ required: true,
113
+ validator: function validator(_, value) {
114
+ var _value$bsE3Goods;
115
+ if (!value || !(value !== null && value !== void 0 && (_value$bsE3Goods = value.bsE3Goods) !== null && _value$bsE3Goods !== void 0 && _value$bsE3Goods.length)) {
116
+ return Promise.reject(new Error("请选择百胜E3商品"));
117
+ }
118
+ return Promise.resolve();
119
+ }
120
+ }] : [];
121
+ this.dataType = "object";
122
+ });
123
+ export default BSE3Goods;
@@ -0,0 +1,58 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
+ import React from "react";
3
+ import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
4
+ import CommonHeaderGoods from "../../CommonHeaderGood";
5
+ declare class BsE3Reissue implements ComponentInterface {
6
+ name: string;
7
+ id: string;
8
+ sortField: string;
9
+ type: string;
10
+ rules: any[];
11
+ componentConfig: ComponentInterface["componentConfig"];
12
+ effects: ComponentInterface["effects"];
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface["dataType"];
18
+ bsType: BsType;
19
+ bsMemo: BsMemo;
20
+ systemOrderNo: SystemOrderNo;
21
+ reissueGoods: BsHeaderGood | CommonHeaderGoods;
22
+ constructor(options: PickOption);
23
+ renderClient: (record: any) => React.JSX.Element | null;
24
+ renderPc: () => null;
25
+ renderLog: (r: Record) => React.JSX.Element;
26
+ getComponentValue: (r: Record) => {
27
+ [key: string]: any;
28
+ };
29
+ renderExport: () => null;
30
+ editRender: (p: any) => React.JSX.Element;
31
+ filterConfig: (item: ColumnConfig) => ({
32
+ searchDefaultConditions: "in";
33
+ type: string;
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "Cascader";
37
+ props: {
38
+ options: any[] | undefined;
39
+ fieldNames: {
40
+ label: string;
41
+ value: string;
42
+ children: string;
43
+ };
44
+ };
45
+ formatFilterValue: (val: Array<string>) => string[] | undefined;
46
+ filterFn: (value: string) => (i: Record) => boolean;
47
+ } | {
48
+ searchDefaultConditions: "like";
49
+ type: string;
50
+ id: string;
51
+ name: string;
52
+ filterComponentType: "Input";
53
+ props?: undefined;
54
+ formatFilterValue?: undefined;
55
+ filterFn?: undefined;
56
+ })[];
57
+ }
58
+ export default BsE3Reissue;