@kmkf-fe-packages/services-components 0.7.15-alpha.6 → 0.7.15-alpha.60

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 (80) hide show
  1. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -21
  2. package/dist/esm/commonComponents/ShopList/index.d.ts +1 -1
  3. package/dist/esm/commonComponents/ShopList/index.js +4 -2
  4. package/dist/esm/components/ActualPayment/index.d.ts +4 -4
  5. package/dist/esm/components/ActualPayment/index.js +24 -21
  6. package/dist/esm/components/BS/BsExchange/index.d.ts +14 -11
  7. package/dist/esm/components/BS/BsExchange/index.js +219 -126
  8. package/dist/esm/components/BS/BsGoods/index.d.ts +9 -9
  9. package/dist/esm/components/BS/BsGoods/index.js +82 -60
  10. package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -7
  11. package/dist/esm/components/BS/BsLogistics/index.js +14 -14
  12. package/dist/esm/components/BS/BsReissue/index.d.ts +16 -6
  13. package/dist/esm/components/BS/BsReissue/index.js +103 -54
  14. package/dist/esm/components/BS/common/{BsChildCode.d.ts → BsHeaderCode.d.ts} +5 -4
  15. package/dist/esm/components/BS/common/{BsChildCode.js → BsHeaderCode.js} +27 -11
  16. package/dist/esm/components/BS/common/{BsChildMoney.d.ts → BsHeaderMoney.d.ts} +5 -4
  17. package/dist/esm/components/BS/common/{BsChildMoney.js → BsHeaderMoney.js} +27 -11
  18. package/dist/esm/components/BS/common/{BsChildName.d.ts → BsHeaderName.d.ts} +5 -4
  19. package/dist/esm/components/BS/common/{BsChildName.js → BsHeaderName.js} +28 -11
  20. package/dist/esm/components/BS/common/{BsChildNumber.d.ts → BsHeaderNumber.d.ts} +5 -4
  21. package/dist/esm/components/BS/common/{BsChildNumber.js → BsHeaderNumber.js} +27 -11
  22. package/dist/esm/components/BS/common/{BsChildPic.d.ts → BsHeaderPic.d.ts} +5 -4
  23. package/dist/esm/components/BS/common/{BsChildPic.js → BsHeaderPic.js} +26 -10
  24. package/dist/esm/components/BS/common/{BsChildShare.d.ts → BsHeaderShare.d.ts} +5 -4
  25. package/dist/esm/components/BS/common/{BsChildShare.js → BsHeaderShare.js} +27 -11
  26. package/dist/esm/components/BS/common/{BsChildSku.d.ts → BsHeaderSku.d.ts} +5 -4
  27. package/dist/esm/components/BS/common/{BsChildSku.js → BsHeaderSku.js} +27 -11
  28. package/dist/esm/components/BS/common/{BsChildType.d.ts → BsHeaderType.d.ts} +5 -4
  29. package/dist/esm/components/BS/common/{BsChildType.js → BsHeaderType.js} +27 -11
  30. package/dist/esm/components/BS/common/BsMemo.d.ts +8 -7
  31. package/dist/esm/components/BS/common/BsMemo.js +55 -21
  32. package/dist/esm/components/BS/common/BsType.d.ts +8 -6
  33. package/dist/esm/components/BS/common/BsType.js +53 -17
  34. package/dist/esm/components/BS/common/index.d.ts +10 -10
  35. package/dist/esm/components/BS/common/index.js +8 -8
  36. package/dist/esm/components/Cascader/index.d.ts +1 -0
  37. package/dist/esm/components/Cascader/index.js +3 -1
  38. package/dist/esm/components/Common/index.d.ts +7 -2
  39. package/dist/esm/components/Common/index.js +175 -77
  40. package/dist/esm/components/DataTime/ApaasDate.d.ts +2 -2
  41. package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +2 -2
  42. package/dist/esm/components/EItemId/ItemId.d.ts +2 -2
  43. package/dist/esm/components/EItemSelect/ItemSelect.d.ts +2 -2
  44. package/dist/esm/components/ExpressCompany/index.d.ts +2 -2
  45. package/dist/esm/components/File/index.d.ts +4 -4
  46. package/dist/esm/components/File/index.js +29 -9
  47. package/dist/esm/components/FlowStatusSelect/index.d.ts +0 -1
  48. package/dist/esm/components/FlowStatusSelect/index.js +30 -24
  49. package/dist/esm/components/FlowWorkOrderId/index.d.ts +33 -0
  50. package/dist/esm/components/FlowWorkOrderId/index.js +107 -0
  51. package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -5
  52. package/dist/esm/components/JST/JstLogistics/index.js +49 -21
  53. package/dist/esm/components/JST/JstSendGood/index.d.ts +10 -4
  54. package/dist/esm/components/JST/JstSendGood/index.js +27 -17
  55. package/dist/esm/components/LogisticsTrajectory/index.d.ts +8 -9
  56. package/dist/esm/components/LogisticsTrajectory/index.js +12 -10
  57. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +6 -5
  58. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +6 -6
  59. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +8 -8
  60. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
  61. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +4 -10
  62. package/dist/esm/components/Payment/BuyerNick.js +1 -2
  63. package/dist/esm/components/Payment/index.d.ts +1 -0
  64. package/dist/esm/components/Payment/index.js +9 -6
  65. package/dist/esm/components/Popover/index.d.ts +2 -2
  66. package/dist/esm/components/PostIng/index.d.ts +6 -29
  67. package/dist/esm/components/PostIng/index.js +73 -77
  68. package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +2 -2
  69. package/dist/esm/components/TradeDateTime/index.d.ts +1 -9
  70. package/dist/esm/components/TradeDateTime/index.js +6 -1
  71. package/dist/esm/factory.d.ts +2 -2
  72. package/dist/esm/factory.js +6 -3
  73. package/dist/esm/index.d.ts +1 -0
  74. package/dist/esm/index.js +1 -0
  75. package/dist/esm/type.d.ts +22 -14
  76. package/package.json +4 -4
  77. package/dist/esm/components/BS/common/BsExchangeImage.d.ts +0 -31
  78. package/dist/esm/components/BS/common/BsExchangeImage.js +0 -126
  79. package/dist/esm/components/BS/common/BsGoodImage.d.ts +0 -31
  80. package/dist/esm/components/BS/common/BsGoodImage.js +0 -88
@@ -6,29 +6,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
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); }
9
- import React from "react";
10
- import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
9
+ import React from 'react';
10
+ import { ApaasPosting } from '@kmkf-fe-packages/basic-components';
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
- import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
15
- import { SYMBOL } from "../../constant";
13
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { AddressData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
16
15
  var typeMap = {
17
16
  POSTING: {
18
- province: "postingProvince",
19
- city: "postingCity",
20
- district: "postingDistrict",
21
- detail: "postingDetail",
22
- name: "postingReceiverName",
23
- mobile: "postingReceiverMobile"
17
+ province: 'postingProvince',
18
+ city: 'postingCity',
19
+ district: 'postingDistrict',
20
+ detail: 'postingDetail',
21
+ name: 'postingReceiverName',
22
+ mobile: 'postingReceiverMobile'
24
23
  },
25
24
  BS_POSTING: {
26
- province: "bsPostingProvince",
27
- city: "bsPostingCity",
28
- district: "bsPostingDistrict",
29
- detail: "bsPostingDetail",
30
- name: "bsPostingReceiverName",
31
- mobile: "bsPostingReceiverMobile"
25
+ province: 'bsPostingProvince',
26
+ city: 'bsPostingCity',
27
+ district: 'bsPostingDistrict',
28
+ detail: 'bsPostingDetail',
29
+ name: 'bsPostingReceiverName',
30
+ mobile: 'bsPostingReceiverMobile'
32
31
  }
33
32
  };
34
33
  var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
@@ -60,7 +59,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
60
59
  }
61
60
  var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
62
61
  return _this.addressDateInstance.getNameByCode(suffix);
63
- }).join("");
62
+ }).join('');
64
63
  return /*#__PURE__*/React.createElement("span", null, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile));
65
64
  });
66
65
  _defineProperty(this, "renderLog", function (r) {
@@ -77,7 +76,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
77
76
  })) return null;
78
77
  var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
79
78
  return _this.addressDateInstance.getNameByCode(suffix);
80
- }).join("");
79
+ }).join('');
81
80
  return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
82
81
  });
83
82
  _defineProperty(this, "getComponentValue", function (r) {
@@ -86,9 +85,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
86
85
  province: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.province)],
87
86
  city: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.city)],
88
87
  district: r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.district)],
89
- detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.detail)]) || "",
90
- name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.name)]) || "",
91
- mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.mobile)]) || ""
88
+ detail: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.detail)]) || '',
89
+ name: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.name)]) || '',
90
+ mobile: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.mobile)]) || ''
92
91
  };
93
92
  });
94
93
  _defineProperty(this, "renderExport", function (value, record) {
@@ -105,7 +104,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
105
104
  })) return null;
106
105
  var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
107
106
  return _this.addressDateInstance.getNameByCode(suffix);
108
- }).join("");
107
+ }).join('');
109
108
  return "".concat(addressText).concat(detail, " ").concat(name).concat(mobile);
110
109
  });
111
110
  _defineProperty(this, "renderClient", function (record) {
@@ -118,9 +117,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
118
117
  var mobile = record["".concat(_this.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.mobile)];
119
118
  var addressText = (_ref4 = [province, city, district]) === null || _ref4 === void 0 ? void 0 : _ref4.map(function (suffix) {
120
119
  return _this.addressDateInstance.getNameByCode(suffix);
121
- }).join("");
120
+ }).join('');
122
121
  var hasValue = addressText || detail || name || mobile;
123
- var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
122
+ var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join('/'), /*#__PURE__*/React.createElement("br", null), [name, mobile].join('/')) : null;
124
123
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
125
124
  id: _this.id,
126
125
  label: _this.name,
@@ -136,58 +135,55 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
136
135
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
137
136
  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,
138
137
  component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
139
- type: _this.type === "POSTING" ? "workOrder" : "bs"
138
+ type: _this.type === 'POSTING' ? 'workOrder' : 'bs'
140
139
  }))
141
140
  });
142
141
  });
143
142
  _defineProperty(this, "filterConfig", function (item) {
144
- var _typeMap$_this$type19, _typeMap$_this$type20, _typeMap$_this$type21, _typeMap$_this$type22;
145
- return [{
146
- searchDefaultConditions: SYMBOL.eq,
147
- type: item.type,
148
- id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.district),
149
- // 过滤组件id
150
- name: "".concat(item.name, "-\u7701\u5E02\u533A"),
151
- // 过滤组件名称
152
- filterComponentType: "Cascader",
153
- props: {
154
- options: _this.addressDateInstance.addressOptions || [],
155
- fieldNames: {
156
- label: "label",
157
- value: "value",
158
- children: "children"
159
- }
160
- },
161
- formatFilterValue: function formatFilterValue(val) {
162
- if ((val === null || val === void 0 ? void 0 : val.length) > 2) {
163
- return val === null || val === void 0 ? void 0 : val[2];
164
- }
165
- }
166
- }, {
167
- searchDefaultConditions: SYMBOL.like,
168
- type: item.type,
169
- id: "".concat(item.id, "_").concat((_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.detail),
170
- // 过滤组件id
171
- name: "".concat(item.name, "-\u8BE6\u7EC6\u5730\u5740"),
172
- // 过滤组件名称
173
- filterComponentType: "Input"
174
- }, {
175
- searchDefaultConditions: SYMBOL.like,
176
- type: item.type,
177
- id: "".concat(item.id, "_").concat((_typeMap$_this$type21 = typeMap[_this.type]) === null || _typeMap$_this$type21 === void 0 ? void 0 : _typeMap$_this$type21.name),
178
- // 过滤组件id
179
- name: "".concat(item.name, "-\u59D3\u540D"),
180
- // 过滤组件名称
181
- filterComponentType: "Input"
182
- }, {
183
- searchDefaultConditions: SYMBOL.like,
184
- type: item.type,
185
- id: "".concat(item.id, "_").concat((_typeMap$_this$type22 = typeMap[_this.type]) === null || _typeMap$_this$type22 === void 0 ? void 0 : _typeMap$_this$type22.mobile),
186
- // 过滤组件id
187
- name: "".concat(item.name, "-\u7535\u8BDD"),
188
- // 过滤组件名称
189
- filterComponentType: "Input"
190
- }];
143
+ return [];
144
+ // return [
145
+ // {
146
+ // searchDefaultConditions: SYMBOL.eq as "eq",
147
+ // type: item.type,
148
+ // id: `${item.id}_${typeMap[this.type]?.district}`, // 过滤组件id
149
+ // name: `${item.name}-省市区`, // 过滤组件名称
150
+ // filterComponentType: "Cascader" as const,
151
+ // props: {
152
+ // options: (this.addressDateInstance.addressOptions as any) || [],
153
+ // fieldNames: {
154
+ // label: "label",
155
+ // value: "value",
156
+ // children: "children",
157
+ // },
158
+ // },
159
+ // formatFilterValue: (val: Array<number>) => {
160
+ // if (val?.length > 2) {
161
+ // return val?.[2];
162
+ // }
163
+ // },
164
+ // },
165
+ // {
166
+ // searchDefaultConditions: SYMBOL.like as "like",
167
+ // type: item.type,
168
+ // id: `${item.id}_${typeMap[this.type]?.detail}`, // 过滤组件id
169
+ // name: `${item.name}-详细地址`, // 过滤组件名称
170
+ // filterComponentType: "Input" as const,
171
+ // },
172
+ // {
173
+ // searchDefaultConditions: SYMBOL.like as "like",
174
+ // type: item.type,
175
+ // id: `${item.id}_${typeMap[this.type]?.name}`, // 过滤组件id
176
+ // name: `${item.name}-姓名`, // 过滤组件名称
177
+ // filterComponentType: "Input" as const,
178
+ // },
179
+ // {
180
+ // searchDefaultConditions: SYMBOL.like as "like",
181
+ // type: item.type,
182
+ // id: `${item.id}_${typeMap[this.type]?.mobile}`, // 过滤组件id
183
+ // name: `${item.name}-电话`, // 过滤组件名称
184
+ // filterComponentType: "Input" as const,
185
+ // },
186
+ // ];
191
187
  });
192
188
  this.name = options.name;
193
189
  this.id = options.id;
@@ -196,15 +192,15 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
196
192
  this.type = options.type;
197
193
  this.componentConfig = options.componentConfig;
198
194
  this.isCombinationComponent = false;
199
- this.canSort = true;
195
+ this.canSort = false;
200
196
  this.children = [];
201
- this.dataType = "string";
202
- this.addressDateInstance = AddressData.getInstance();
197
+ this.dataType = 'string';
198
+ this.addressDateInstance = options.type === 'BS_POSTING' ? BsAddressData.getInstance() : AddressData.getInstance();
203
199
  this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
204
200
  validator: function validator(_, value) {
205
201
  var _value$postingAddress;
206
202
  if (!(value !== null && value !== void 0 && (_value$postingAddress = value.postingAddress) !== null && _value$postingAddress !== void 0 && _value$postingAddress.length) || !(value !== null && value !== void 0 && value.postingDetail) || !(value !== null && value !== void 0 && value.postingReceiverName) || !(value !== null && value !== void 0 && value.postingReceiverMobile)) {
207
- return Promise.reject(new Error("请填写地址"));
203
+ return Promise.reject(new Error('请填写地址'));
208
204
  }
209
205
  return Promise.resolve();
210
206
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
3
- declare const ItemEncode: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
3
+ declare const ItemEncode: (props: JSX.IntrinsicAttributes & GoodsProps) => React.JSX.Element;
4
4
  export default ItemEncode;
@@ -25,14 +25,6 @@ declare class BasicDataTime implements ComponentInterface {
25
25
  renderExport: (value: unknown, record: Record) => any;
26
26
  editRender: (p: any) => React.JSX.Element;
27
27
  getKeyByComponentType: (type: string) => any;
28
- filterConfig: (item: ColumnConfig) => {
29
- searchDefaultConditions: "between";
30
- type: string;
31
- id: string;
32
- name: string;
33
- filterComponentType: "Date";
34
- filterFn: (value: string[]) => (i: Record) => boolean;
35
- formatFilterValue: (val: Array<any>) => number[] | undefined;
36
- };
28
+ filterConfig: (item: ColumnConfig) => any;
37
29
  }
38
30
  export default BasicDataTime;
@@ -85,8 +85,9 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
85
85
  return typeMap[type];
86
86
  });
87
87
  _defineProperty(this, "filterConfig", function (item) {
88
+ var _ref;
88
89
  var key = _this.getKeyByComponentType(item.type);
89
- return {
90
+ var params = {
90
91
  searchDefaultConditions: SYMBOL.between,
91
92
  type: item.type,
92
93
  id: "".concat(item.id, "_").concat(key),
@@ -108,6 +109,10 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
108
109
  }
109
110
  }
110
111
  };
112
+ if ((_ref = ["BS_SIGNING_TIME", "BS_SEND_TIME", "BS_TRADE_PAYMENT_TIME"]) !== null && _ref !== void 0 && _ref.includes(item.type)) {
113
+ params.componentDataType = "dataTime";
114
+ }
115
+ return params;
111
116
  });
112
117
  this.name = options.name;
113
118
  this.id = options.id;
@@ -1,3 +1,3 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, BsLogistics, BsGoods, BsExchange, BsReissue } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => ActualPayment | BsExchange | BsGoods | BsLogistics | BsReissue | BasicFile | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | LogisticsTrajectory | BasicPosting | BasicDataTime | TradeDateTime | BasicAddress | BasicCascader | BasicCheckbox | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | PlatForm | ShopInput | Submitter | Handler | CompletedUser;
3
+ export declare const factory: (type: string, options: PickOption) => ShopInput | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | Submitter | Handler | CompletedUser | FlowWorkOrderId;
@@ -1,4 +1,4 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, BsLogistics, BsGoods, BsExchange, BsReissue } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } from "./index";
2
2
  export var factory = function factory(type, options) {
3
3
  var _options$componentCon;
4
4
  switch (type) {
@@ -62,8 +62,6 @@ export var factory = function factory(type, options) {
62
62
  return new TradeDateTime(options);
63
63
  case "EXPRESS_LOGISTICS_SELECT":
64
64
  return new Logistics(options);
65
- case "BS_LOGISTICS":
66
- return new BsLogistics(options);
67
65
  case "RETURN_LOGISTICS_SELECT":
68
66
  return new ReturnLogistics(options);
69
67
  case "ACTUAL_PAYMENT":
@@ -106,6 +104,7 @@ export var factory = function factory(type, options) {
106
104
  case "TEMPLATE_ID_INPUT":
107
105
  return new TemplateSelect(options);
108
106
  case "JST_LOGISTICS":
107
+ case "BS_LOGISTICS":
109
108
  return new JstLogistics(options);
110
109
  case "JST_ITEM_SELECT_THIRD":
111
110
  return new JstItemSelect(options);
@@ -122,6 +121,10 @@ export var factory = function factory(type, options) {
122
121
  return new BsExchange(options);
123
122
  case "BS_REISSUE_GOODS":
124
123
  return new BsReissue(options);
124
+ case "FLOW_WORK_ORDER_ID_INPUT":
125
+ return new FlowWorkOrderId(options);
126
+ case "OUTER_WORK_ORDER_ID_INPUT":
127
+ return new FlowWorkOrderId(options);
125
128
  default:
126
129
  return new BasicInput(options);
127
130
  }
@@ -51,6 +51,7 @@ export { default as ShopInput } from "./components/ShopInput";
51
51
  export { default as Submitter } from "./components/Submitter";
52
52
  export { default as Handler } from "./components/Handler";
53
53
  export { default as CompletedUser } from "./components/CompletedUser";
54
+ export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
54
55
  export { factory } from "./factory";
55
56
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
56
57
  export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
package/dist/esm/index.js CHANGED
@@ -51,6 +51,7 @@ export { default as ShopInput } from "./components/ShopInput";
51
51
  export { default as Submitter } from "./components/Submitter";
52
52
  export { default as Handler } from "./components/Handler";
53
53
  export { default as CompletedUser } from "./components/CompletedUser";
54
+ export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
54
55
  export { factory } from "./factory";
55
56
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
56
57
  export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from "antd";
3
- import { SYMBOL } from "./constant";
4
- export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
- export declare type ALignType = "left" | "right" | "center";
2
+ import type { FormInstance } from 'antd';
3
+ import { SYMBOL } from './constant';
4
+ export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
+ export declare type ALignType = 'left' | 'right' | 'center';
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -18,10 +18,16 @@ export declare type FilterConfigType = {
18
18
  filterFn?: (p: any) => (r: Record) => unknown;
19
19
  formatFilterValue?: (p: any) => any;
20
20
  };
21
- export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate";
21
+ export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate';
22
22
  export interface ComponentInterface {
23
23
  id: string;
24
24
  sortField: string;
25
+ sortChildField?: {
26
+ name: string;
27
+ key: string;
28
+ dataType: string;
29
+ [key: string]: any;
30
+ }[];
25
31
  name: string;
26
32
  columnHeader?: string | JSX.Element;
27
33
  type: string;
@@ -32,8 +38,8 @@ export interface ComponentInterface {
32
38
  rules?: any[];
33
39
  width?: number;
34
40
  align?: ALignType;
35
- dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
36
- format?: "dateTime" | "date" | "time";
41
+ dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
42
+ format?: 'dateTime' | 'date' | 'time' | 'cascader';
37
43
  options?: Array<any>;
38
44
  /**
39
45
  * @description 组件下标
@@ -56,7 +62,7 @@ export interface ComponentInterface {
56
62
  /**
57
63
  * @description 显示字段名称
58
64
  */
59
- showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all";
65
+ showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all';
60
66
  /**
61
67
  * @description 是否选择SKU
62
68
  */
@@ -76,7 +82,7 @@ export interface ComponentInterface {
76
82
  /**
77
83
  * @description 备注状态
78
84
  */
79
- associatedType?: "APPEND";
85
+ associatedType?: 'APPEND';
80
86
  isAssociated?: boolean;
81
87
  isShowFlag?: boolean;
82
88
  /**
@@ -117,7 +123,7 @@ export interface ComponentInterface {
117
123
  * @description 时间初始值
118
124
  */
119
125
  dateTime?: string;
120
- dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
126
+ dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
121
127
  maxSize?: number;
122
128
  basicGrade?: number;
123
129
  range?: number;
@@ -137,13 +143,14 @@ export interface ComponentInterface {
137
143
  * @description 针对ERP的订单组件需要特殊展示,此处增加一个特殊标识
138
144
  */
139
145
  erpFlag?: boolean;
146
+ showHeader?: string[];
140
147
  reasonList?: any[];
148
+ disabled?: boolean;
141
149
  };
142
150
  effects?: {
143
151
  queryWorkOrderDetail?: (r: Record) => void;
144
152
  handleOpenRepeatList?: (r: Record) => void;
145
153
  handleOpenRepeatDetail?: (r: Record) => void;
146
- handleChangeSingleWorkOrderStatus?: (t: string, r: Record) => void;
147
154
  templateList?: any[];
148
155
  isEditing?: boolean;
149
156
  form?: FormInstance;
@@ -205,12 +212,13 @@ export interface ComponentInterface {
205
212
  getComponentValue: (r: Record) => any;
206
213
  formDataTransform?: (r: any) => any;
207
214
  }
208
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader">;
215
+ export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader'>;
209
216
  export declare type ColumnConfig = {
210
217
  id: string;
211
218
  name: string;
212
219
  type: string;
213
220
  subKey?: string;
214
- mode?: "multiple";
215
- config?: ComponentInterface["componentConfig"];
221
+ mode?: 'multiple';
222
+ config?: ComponentInterface['componentConfig'];
223
+ templateConfig?: ComponentInterface['componentConfig'];
216
224
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.6",
3
+ "version": "0.7.15-alpha.60",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.6",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.6"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.60",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.59"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "f7fe308c4008b1784399fdd777cc41375699d0aa"
43
+ "gitHead": "251c86791a81cf4bbf3d475341d482286e6179ae"
44
44
  }
@@ -1,31 +0,0 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
- import React from "react";
3
- declare class BsExchangeGoodImage implements ComponentInterface {
4
- name: string;
5
- id: string;
6
- sortField: string;
7
- type: string;
8
- componentConfig: ComponentInterface["componentConfig"];
9
- align: ALignType;
10
- width: number;
11
- isCombinationComponent: boolean;
12
- formField: string;
13
- canSort: boolean;
14
- children: ComponentInterface[];
15
- dataType: ComponentInterface["dataType"];
16
- constructor(options: PickOption);
17
- getComponentValue: () => null;
18
- renderClient: (record: any) => React.JSX.Element | null;
19
- renderPc: (value: unknown, record: Record) => React.JSX.Element;
20
- renderLog: (r: Record) => React.JSX.Element | null;
21
- renderExport: (value: string, record: Record) => null;
22
- editRender: () => null;
23
- filterConfig: (item: ColumnConfig) => {
24
- searchDefaultConditions: "like";
25
- type: string;
26
- id: string;
27
- name: string;
28
- filterComponentType: "Input";
29
- }[];
30
- }
31
- export default BsExchangeGoodImage;
@@ -1,126 +0,0 @@
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 { maxBy } from "lodash";
10
- import ItemView from "../../../commonComponents/ItemView";
11
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
12
- import { SYMBOL } from "../../../constant";
13
- import { BsGoodImage as BsGood, BsExchangeList } from "../../Common";
14
- var BsExchangeGoodImage = /*#__PURE__*/_createClass(function BsExchangeGoodImage(options) {
15
- var _this = this;
16
- _classCallCheck(this, BsExchangeGoodImage);
17
- _defineProperty(this, "name", void 0);
18
- _defineProperty(this, "id", void 0);
19
- _defineProperty(this, "sortField", void 0);
20
- _defineProperty(this, "type", void 0);
21
- _defineProperty(this, "componentConfig", void 0);
22
- _defineProperty(this, "align", void 0);
23
- _defineProperty(this, "width", void 0);
24
- _defineProperty(this, "isCombinationComponent", void 0);
25
- _defineProperty(this, "formField", void 0);
26
- _defineProperty(this, "canSort", void 0);
27
- _defineProperty(this, "children", void 0);
28
- _defineProperty(this, "dataType", void 0);
29
- _defineProperty(this, "getComponentValue", function () {
30
- return null;
31
- });
32
- _defineProperty(this, "renderClient", function (record) {
33
- return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
34
- id: _this.id,
35
- label: _this.name,
36
- value: _this.renderPc(undefined, record)
37
- }) : null;
38
- });
39
- _defineProperty(this, "renderPc", function (value, record) {
40
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
41
- return /*#__PURE__*/React.createElement("span", null, "--");
42
- }
43
- var type = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeType")];
44
- var returnGoods = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeReturnGoods")];
45
- var swapOutGoods = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeSwapOutGoods")];
46
- var giftGoods = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsExchangeGiftGoods")];
47
- var newReturnGoods = [];
48
- if (["1", "3"].includes(type === null || type === void 0 ? void 0 : type[0])) {
49
- newReturnGoods = returnGoods.reduce(function (prv, next) {
50
- prv.push({
51
- returnGood: next,
52
- swapGood: next
53
- });
54
- return prv;
55
- }, []);
56
- } else if (["2", "4"].includes(type === null || type === void 0 ? void 0 : type[0])) {
57
- var maxLen = maxBy(returnGoods, function (t) {
58
- return t.index;
59
- });
60
- var newGoods = Array(maxLen.index).fill({
61
- returnGood: [],
62
- swapGood: []
63
- });
64
- returnGoods.forEach(function (item) {
65
- newGoods[item.index].returnGood.push(item);
66
- });
67
- swapOutGoods.forEach(function (item) {
68
- newGoods[item.index].swapGood.push(item);
69
- });
70
- newReturnGoods = newGoods;
71
- }
72
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BsExchangeList, {
73
- list: newReturnGoods
74
- }), (giftGoods || []).map(function (item, index) {
75
- return /*#__PURE__*/React.createElement(BsGood, {
76
- item: item,
77
- index: index
78
- });
79
- }));
80
- });
81
- _defineProperty(this, "renderLog", function (r) {
82
- if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
83
- return _this.renderPc(undefined, r);
84
- });
85
- _defineProperty(this, "renderExport", function (value, record) {
86
- return null;
87
- });
88
- _defineProperty(this, "editRender", function () {
89
- return null;
90
- });
91
- _defineProperty(this, "filterConfig", function (item) {
92
- var subKey = item.subKey;
93
- return [{
94
- searchDefaultConditions: SYMBOL.like,
95
- type: item.type,
96
- id: "".concat(item.id, "_bsExchangeReturnGoods"),
97
- name: "".concat(_this.name, "-\u9000\u56DE\u5546\u54C1"),
98
- filterComponentType: "Input"
99
- }, {
100
- searchDefaultConditions: SYMBOL.like,
101
- type: item.type,
102
- id: "".concat(item.id, "_bsExchangeSwapOutGoods"),
103
- name: "".concat(_this.name, "-\u6362\u8D27\u5546\u54C1"),
104
- filterComponentType: "Input"
105
- }, {
106
- searchDefaultConditions: SYMBOL.like,
107
- type: item.type,
108
- id: "".concat(item.id, "_bsExchangeGiftGoods"),
109
- name: "".concat(_this.name, "-\u8D60\u54C1\u5546\u54C1"),
110
- filterComponentType: "Input"
111
- }];
112
- });
113
- this.name = options.name;
114
- this.id = options.id;
115
- this.sortField = options.id;
116
- this.formField = options.id;
117
- this.type = options.type;
118
- this.componentConfig = options.componentConfig;
119
- this.align = "left";
120
- this.width = 300;
121
- this.isCombinationComponent = false;
122
- this.canSort = true;
123
- this.dataType = "string";
124
- this.children = [];
125
- });
126
- export default BsExchangeGoodImage;