@kmkf-fe-packages/services-components 2.0.54-beta.6 → 2.0.55

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 (33) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
  3. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
  4. package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
  5. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +12 -13
  6. package/dist/esm/components/BS/BsGoods/dist/index.js +113 -0
  7. package/dist/esm/components/BS/BsLogistics/index.js +0 -8
  8. package/dist/esm/components/BS/common/expressCode.js +0 -3
  9. package/dist/esm/components/BS/common/expressCompany.js +0 -3
  10. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -7
  11. package/dist/esm/components/Common/dist/index.js +1019 -0
  12. package/dist/esm/components/Common/index.d.ts +2 -2
  13. package/dist/esm/components/Common/index.js +152 -155
  14. package/dist/esm/components/CommonHeaderGood/index.js +95 -110
  15. package/dist/esm/components/GY/GyReissue/index.js +25 -11
  16. package/dist/esm/components/GY/GyReturn/index.js +25 -11
  17. package/dist/esm/components/JST/JstSendGood/index.js +1 -1
  18. package/dist/esm/components/MsgStatus/index.js +2 -7
  19. package/dist/esm/components/Payment/PaymentAmount.d.ts +1 -0
  20. package/dist/esm/components/Payment/PaymentAmount.js +4 -0
  21. package/dist/esm/components/PicturePro/PictureUrl.d.ts +1 -0
  22. package/dist/esm/components/PicturePro/PictureUrl.js +3 -0
  23. package/dist/esm/components/Public/ReissueGoods/index.d.ts +1 -1
  24. package/dist/esm/components/Public/ReissueGoods/index.js +60 -19
  25. package/dist/esm/components/Reissue/Logistics/index.d.ts +11 -1
  26. package/dist/esm/components/Reissue/Logistics/index.js +35 -15
  27. package/dist/esm/components/TradeDateTime/index.d.ts +5 -5
  28. package/dist/esm/components/TradeDateTime/index.js +27 -29
  29. package/dist/esm/factory.d.ts +1 -1
  30. package/dist/esm/factory.js +0 -2
  31. package/dist/esm/service/api.d.ts +0 -1
  32. package/dist/esm/service/api.js +0 -6
  33. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
2
  import React from "react";
3
3
  import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
4
- import SystemOrderType from "../SystemOrderType";
4
+ import SystemOrderType from '../SystemOrderType';
5
5
  import CommonHeaderGoods from "../../CommonHeaderGood";
6
6
  declare class PublicReissue implements ComponentInterface {
7
7
  name: string;
@@ -12,27 +12,53 @@ import React from "react";
12
12
  import GetFormItem from "../../GetFormItem";
13
13
  import ItemView from "../../../commonComponents/ItemView";
14
14
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
- import { PublicReissue as Reissue, erpFormValidator } from "@kmkf-fe-packages/basic-components";
15
+ import { PublicReissue as Reissue } from "@kmkf-fe-packages/basic-components";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  import { BsGoodsTable } from "../../Common/index";
18
18
  import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
19
19
  import SystemOrderType from "../SystemOrderType";
20
20
  import CommonHeaderGoods from "../../CommonHeaderGood";
21
+ function toNum(value) {
22
+ if (typeof value === "string") {
23
+ return value ? +value : void 0;
24
+ }
25
+ if (typeof value === "number") {
26
+ return value;
27
+ }
28
+ return void 0;
29
+ }
21
30
  var typeMap = {
22
31
  JST_REISSUE_GOODS: {
23
32
  key: "jstReissueGoods",
24
33
  typeName: "jstReissueType",
25
34
  remark: "jstReissueType_memo",
26
35
  systemOrderNo: "jstSystemOrderNo",
27
- systemOrderBillType: "jstSystemOrderBillType",
36
+ systemOrderBillType: 'jstSystemOrderBillType',
28
37
  errMsg: "请选择聚水潭补发商品",
29
38
  name: "聚水潭",
30
- compType: "补发",
31
- validator: function validator(_rule, value, type) {
39
+ compType: '补发',
40
+ validator: function validator(_rule, value) {
32
41
  if (!_rule.required) return Promise.resolve();
33
- var validatorFlag = erpFormValidator(_rule, value, type);
34
- if (validatorFlag) {
35
- return validatorFlag;
42
+ var goodsName = "";
43
+ if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
44
+ var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
45
+ var res = typeof qty === "number" ? qty < 1 : true;
46
+ if (res) {
47
+ goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
48
+ }
49
+ return res;
50
+ })) {
51
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
52
+ }
53
+ if (((value === null || value === void 0 ? void 0 : value.jstReissueGoods) || []).some(function (goods) {
54
+ var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
55
+ var res = typeof v === "number" ? v < 0 : true;
56
+ if (res) {
57
+ goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
58
+ }
59
+ return res;
60
+ })) {
61
+ return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
36
62
  }
37
63
  return Promise.resolve();
38
64
  }
@@ -42,15 +68,32 @@ var typeMap = {
42
68
  typeName: "jstReturnType",
43
69
  remark: "jstReturnType_memo",
44
70
  systemOrderNo: "jstSystemOrderNo",
45
- systemOrderBillType: "jstSystemOrderBillType",
71
+ systemOrderBillType: 'jstSystemOrderBillType',
46
72
  errMsg: "请选择聚水潭退货商品",
47
73
  name: "聚水潭",
48
- compType: "退货",
49
- validator: function validator(_rule, value, type) {
74
+ compType: '退货',
75
+ validator: function validator(_rule, value) {
50
76
  if (!_rule.required) return Promise.resolve();
51
- var validatorFlag = erpFormValidator(_rule, value, type);
52
- if (validatorFlag) {
53
- return validatorFlag;
77
+ var goodsName = "";
78
+ if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
79
+ var qty = toNum(goods === null || goods === void 0 ? void 0 : goods.qty);
80
+ var res = typeof qty === "number" ? qty < 1 : true;
81
+ if (res) {
82
+ goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
83
+ }
84
+ return res;
85
+ })) {
86
+ return Promise.reject("".concat(goodsName, "\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
87
+ }
88
+ if (((value === null || value === void 0 ? void 0 : value.jstReturnGoods) || []).some(function (goods) {
89
+ var v = toNum(goods === null || goods === void 0 ? void 0 : goods.salePrice);
90
+ var res = typeof v === "number" ? v < 0 : true;
91
+ if (res) {
92
+ goodsName = goods !== null && goods !== void 0 && goods.name ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.name, "]") : '';
93
+ }
94
+ return res;
95
+ })) {
96
+ return Promise.reject("".concat(goodsName, "\u5355\u4EF7\u4E3A\u5927\u4E8E\u7B49\u4E8E0\u7684\u6570"));
54
97
  }
55
98
  return Promise.resolve();
56
99
  }
@@ -70,7 +113,8 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
70
113
  _typeMap$options$type10,
71
114
  _typeMap$options$type11,
72
115
  _typeMap$options$type12,
73
- _this$componentConfig6;
116
+ _this$componentConfig6,
117
+ _typeMap$options$type15;
74
118
  _classCallCheck(this, PublicReissue);
75
119
  _defineProperty(this, "name", void 0);
76
120
  _defineProperty(this, "id", void 0);
@@ -228,11 +272,8 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
228
272
  }
229
273
  }, {
230
274
  required: isRequired,
231
- validator: function validator(_rule, value) {
232
- var _typeMap$options$type15, _typeMap$options$type16;
233
- return ((_typeMap$options$type15 = typeMap[options.type]) === null || _typeMap$options$type15 === void 0 ? void 0 : (_typeMap$options$type16 = _typeMap$options$type15.validator) === null || _typeMap$options$type16 === void 0 ? void 0 : _typeMap$options$type16.call(_typeMap$options$type15, _rule, value, options.type)) || function () {
234
- return Promise.resolve();
235
- };
275
+ validator: ((_typeMap$options$type15 = typeMap[options.type]) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.validator) || function () {
276
+ return Promise.resolve();
236
277
  }
237
278
  }];
238
279
  this.dataType = "object";
@@ -21,6 +21,7 @@ declare class Logistics implements ComponentInterface {
21
21
  canSort: boolean;
22
22
  children: ComponentInterface[];
23
23
  dataType: ComponentInterface["dataType"];
24
+ logisticsType: string;
24
25
  constructor(options: PickOption);
25
26
  getSortChildFields: (type: string, options: PickOption) => any;
26
27
  renderClient: (record: any) => React.JSX.Element | null;
@@ -30,6 +31,15 @@ declare class Logistics implements ComponentInterface {
30
31
  renderExport: (value: any, record: any) => any;
31
32
  editRender: (p: any) => React.JSX.Element;
32
33
  filterConfig: (item: ColumnConfig) => ({
34
+ searchDefaultConditions: "like";
35
+ type: string;
36
+ id: string;
37
+ name: string;
38
+ filterComponentType: "Input";
39
+ filterFn: (value: string) => (i: Record) => boolean;
40
+ formatFilterValue: (input: string) => string;
41
+ props?: undefined;
42
+ } | {
33
43
  searchDefaultConditions: "in";
34
44
  type: string;
35
45
  id: string;
@@ -56,8 +66,8 @@ declare class Logistics implements ComponentInterface {
56
66
  name: string;
57
67
  filterComponentType: "Input";
58
68
  filterFn: (value: string) => (i: Record) => boolean;
59
- props?: undefined;
60
69
  formatFilterValue?: undefined;
70
+ props?: undefined;
61
71
  })[];
62
72
  }
63
73
  export default Logistics;
@@ -37,7 +37,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
37
37
  _typeMap$_options$typ2,
38
38
  _this$componentConfig9,
39
39
  _this$componentConfig11,
40
- _this$componentConfig12;
40
+ _this$componentConfig12,
41
+ _this$componentConfig13;
41
42
  _classCallCheck(this, Logistics);
42
43
  _defineProperty(this, "name", void 0);
43
44
  _defineProperty(this, "id", void 0);
@@ -53,6 +54,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
53
54
  _defineProperty(this, "canSort", void 0);
54
55
  _defineProperty(this, "children", void 0);
55
56
  _defineProperty(this, "dataType", void 0);
57
+ _defineProperty(this, "logisticsType", void 0);
56
58
  _defineProperty(this, "getSortChildFields", function (type, options) {
57
59
  var _typeMap$options$type, _typeMap$options$type2;
58
60
  return [{
@@ -111,33 +113,50 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
111
113
  var _typeMap$_this$type4;
112
114
  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
115
  return (list || []).map(function (item) {
114
- var _this$componentConfig3, _ref;
115
- return [((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.logistics) === "gy" ? (_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("/");
116
+ var _item$logisticsCompan;
117
+ return [_this.logisticsType === "input" ? (_item$logisticsCompan = item === null || item === void 0 ? void 0 : item.logisticsCompanyName) !== null && _item$logisticsCompan !== void 0 ? _item$logisticsCompan : "" : _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join("/");
116
118
  }).join(",");
117
119
  });
118
120
  _defineProperty(this, "editRender", function (p) {
119
- var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7, _this$componentConfig8;
121
+ var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
120
122
  return /*#__PURE__*/React.createElement(GetFormItem, {
121
123
  title: _this.name,
122
124
  name: _this.id,
123
125
  rules: _this.rules,
124
126
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
125
127
  display: p === null || p === void 0 ? void 0 : p.display,
126
- required: (_this$componentConfig4 = (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required) !== null && _this$componentConfig4 !== void 0 ? _this$componentConfig4 : false,
127
- tooltip: (_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.showTooltip ? (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.tooltip : "",
128
+ required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
129
+ tooltip: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.showTooltip ? (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.tooltip : "",
128
130
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
129
131
  type: 1,
130
132
  options: _this.expressDateInstance.getExpressData(),
131
- platformType: (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.logistics
133
+ platformType: (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.logistics
132
134
  }))
133
135
  });
134
136
  });
135
137
  _defineProperty(this, "filterConfig", function (item) {
136
- var _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7;
137
- return [{
138
+ var _this$componentConfig8, _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type7, _typeMap$_this$type8;
139
+ var logisticsType = ((_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.logistics) === "gy" ? "input" : "select";
140
+ return [logisticsType === "input" ? {
141
+ searchDefaultConditions: SYMBOL.like,
142
+ type: item.type,
143
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key),
144
+ name: "".concat(_this.name, "\u7269\u6D41\u516C\u53F8"),
145
+ filterComponentType: "Input",
146
+ filterFn: function filterFn(value) {
147
+ return function (i) {
148
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
149
+ };
150
+ },
151
+ formatFilterValue: function formatFilterValue(input) {
152
+ var value = batchInput(input);
153
+ console.log("formatFilterValue---", value);
154
+ return value && Array.isArray(value) ? value.join("") : value;
155
+ }
156
+ } : {
138
157
  searchDefaultConditions: SYMBOL.in,
139
158
  type: item.type,
140
- id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.company),
159
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.company),
141
160
  name: "".concat(_this.name, "\u7269\u6D41\u516C\u53F8"),
142
161
  filterComponentType: "MultipleSelect",
143
162
  props: {
@@ -145,8 +164,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
145
164
  },
146
165
  filterFn: function filterFn(value) {
147
166
  return function (i) {
148
- var _ref2;
149
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
167
+ var _ref;
168
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
150
169
  var _String;
151
170
  var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
152
171
  return logisticsCompany;
@@ -156,7 +175,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
156
175
  }, _this.type === "REISSUE_LOGISTICS" ? {
157
176
  searchDefaultConditions: SYMBOL.in,
158
177
  type: item.type,
159
- id: "".concat(item.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.code),
178
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.code),
160
179
  name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
161
180
  filterComponentType: "Input",
162
181
  filterFn: function filterFn(value) {
@@ -170,7 +189,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
170
189
  } : {
171
190
  searchDefaultConditions: SYMBOL.like,
172
191
  type: item.type,
173
- id: "".concat(item.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.code),
192
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.code),
174
193
  name: "".concat(_this.name, "\u7269\u6D41\u5355\u53F7"),
175
194
  filterComponentType: "Input",
176
195
  filterFn: function filterFn(value) {
@@ -196,7 +215,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
196
215
  var hasNo = (value || []).some(function (item) {
197
216
  var _this$componentConfig10;
198
217
  if (((_this$componentConfig10 = _this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.logistics) === "gy") {
199
- return (item.logisticsCompany || item.logisticsCompanyName) && item.logisticsCode;
218
+ return item.logisticsCompanyName && item.logisticsCode;
200
219
  }
201
220
  return item.logisticsCompany && item.logisticsCode;
202
221
  });
@@ -209,5 +228,6 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
209
228
  this.align = "left";
210
229
  this.expressDateInstance = ExpressData.getInstance((_this$componentConfig11 = this.componentConfig) === null || _this$componentConfig11 === void 0 ? void 0 : _this$componentConfig11.logistics);
211
230
  this.sortChildField = this.getSortChildFields(((_this$componentConfig12 = this.componentConfig) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.showField) || "", _options);
231
+ this.logisticsType = ((_this$componentConfig13 = this.componentConfig) === null || _this$componentConfig13 === void 0 ? void 0 : _this$componentConfig13.logistics) === "gy" ? "input" : "select";
212
232
  });
213
233
  export default Logistics;
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type';
2
+ import React from 'react';
3
3
  declare type Value = string | string[] | undefined;
4
4
  declare class BasicDataTime implements ComponentInterface {
5
5
  name: string;
@@ -8,14 +8,14 @@ declare class BasicDataTime implements ComponentInterface {
8
8
  type: string;
9
9
  rules: any[];
10
10
  showContains: boolean;
11
- componentConfig: ComponentInterface["componentConfig"];
11
+ componentConfig: ComponentInterface['componentConfig'];
12
12
  isCombinationComponent: boolean;
13
13
  formField: string;
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
16
  dataMap: Record;
17
- dataType: ComponentInterface["dataType"];
18
- format: ComponentInterface["format"];
17
+ dataType: ComponentInterface['dataType'];
18
+ format: ComponentInterface['format'];
19
19
  constructor(options: PickOption);
20
20
  render: (value: Value) => React.JSX.Element;
21
21
  renderClient: (record: any) => React.JSX.Element | null;
@@ -6,22 +6,21 @@ 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 moment from "moment";
9
+ import React from 'react';
10
+ import moment from 'moment';
11
11
  import { DateTime } from "../DataTime";
12
12
  import GetFormItem from "../GetFormItem";
13
13
  import ItemView from "../../commonComponents/ItemView";
14
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
15
15
  import { SYMBOL } from "../../constant";
16
16
  var typeMap = {
17
- TRADE_CREATE_DATETIME: "tradeCreateDateTime",
18
- TRADE_PAYMENT_DATETIME: "tradePaymentDateTime",
19
- TRADE_DELIVERY_DATETIME: "tradeDeliveryDateTime",
20
- TRADE_CLOSING_DATETIME: "tradeClosingDateTime",
21
- TRADE_SIGNING_DATETIME: "tradeSigningDateTime",
22
- BS_SIGNING_TIME: "bsSigningTime",
23
- BS_SEND_TIME: "bsSendTime",
24
- BS_TRADE_PAYMENT_TIME: "bsTradePaymentTime"
17
+ TRADE_CREATE_DATETIME: 'tradeCreateDateTime',
18
+ TRADE_PAYMENT_DATETIME: 'tradePaymentDateTime',
19
+ TRADE_DELIVERY_DATETIME: 'tradeDeliveryDateTime',
20
+ TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
21
+ BS_SIGNING_TIME: 'bsSigningTime',
22
+ BS_SEND_TIME: 'bsSendTime',
23
+ BS_TRADE_PAYMENT_TIME: 'bsTradePaymentTime'
25
24
  };
26
25
  var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
27
26
  var _this = this;
@@ -41,7 +40,7 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
41
40
  _defineProperty(this, "dataType", void 0);
42
41
  _defineProperty(this, "format", void 0);
43
42
  _defineProperty(this, "render", function (value) {
44
- return /*#__PURE__*/React.createElement("span", null, Array.isArray(value) ? value.join("~") : /*#__PURE__*/React.createElement("span", null, value));
43
+ return /*#__PURE__*/React.createElement("span", null, Array.isArray(value) ? value.join('~') : /*#__PURE__*/React.createElement("span", null, value));
45
44
  });
46
45
  _defineProperty(this, "renderClient", function (record) {
47
46
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -53,7 +52,7 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
53
52
  _defineProperty(this, "renderPc", function (value, record) {
54
53
  var _record;
55
54
  var type = _this.type;
56
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.dataMap[type])]) !== null && _record !== void 0 ? _record : "--");
55
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(_this.dataMap[type])]) !== null && _record !== void 0 ? _record : '--');
57
56
  });
58
57
  _defineProperty(this, "renderLog", function (r) {
59
58
  var type = _this.type;
@@ -67,7 +66,7 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
67
66
  _defineProperty(this, "renderExport", function (value, record) {
68
67
  var _record2;
69
68
  var type = _this.type;
70
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : "--";
69
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
71
70
  });
72
71
  _defineProperty(this, "editRender", function (p) {
73
72
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
@@ -78,7 +77,7 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
78
77
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
79
78
  display: p === null || p === void 0 ? void 0 : p.display,
80
79
  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,
81
- 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 : "",
80
+ 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 : '',
82
81
  component: /*#__PURE__*/React.createElement(DateTime, _extends({}, _this.componentConfig, {
83
82
  dateType: "DATE_TIME"
84
83
  }))
@@ -97,7 +96,7 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
97
96
  // 过滤组件id
98
97
  name: item.name,
99
98
  // 过滤组件名称
100
- filterComponentType: "Date",
99
+ filterComponentType: 'Date',
101
100
  filterFn: function filterFn(value) {
102
101
  return function (i) {
103
102
  var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, key);
@@ -107,13 +106,13 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
107
106
  formatFilterValue: function formatFilterValue(val) {
108
107
  if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
109
108
  return val === null || val === void 0 ? void 0 : val.map(function (v) {
110
- return moment(v).startOf("second").valueOf();
109
+ return moment(v).startOf('second').valueOf();
111
110
  });
112
111
  }
113
112
  }
114
113
  };
115
- if ((_ref = ["BS_SIGNING_TIME", "BS_SEND_TIME", "BS_TRADE_PAYMENT_TIME"]) !== null && _ref !== void 0 && _ref.includes(item.type)) {
116
- params.componentDataType = "dateTime";
114
+ if ((_ref = ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME']) !== null && _ref !== void 0 && _ref.includes(item.type)) {
115
+ params.componentDataType = 'dateTime';
117
116
  }
118
117
  return params;
119
118
  });
@@ -123,22 +122,21 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
123
122
  this.formField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
124
123
  this.type = options.type;
125
124
  this.showContains = false;
126
- this.dataType = "string";
127
- this.format = "dateTime";
125
+ this.dataType = 'string';
126
+ this.format = 'dateTime';
128
127
  this.componentConfig = options.componentConfig;
129
128
  this.rules = [];
130
129
  this.isCombinationComponent = false;
131
130
  this.canSort = true;
132
131
  this.children = [];
133
132
  this.dataMap = {
134
- TRADE_CREATE_DATETIME: "tradeCreateDateTime",
135
- TRADE_PAYMENT_DATETIME: "tradePaymentDateTime",
136
- TRADE_DELIVERY_DATETIME: "tradeDeliveryDateTime",
137
- TRADE_CLOSING_DATETIME: "tradeClosingDateTime",
138
- TRADE_SIGNING_DATETIME: "tradeSigningDateTime",
139
- BS_SIGNING_TIME: "bsSigningTime",
140
- BS_SEND_TIME: "bsSendTime",
141
- BS_TRADE_PAYMENT_TIME: "bsTradePaymentTime"
133
+ TRADE_CREATE_DATETIME: 'tradeCreateDateTime',
134
+ TRADE_PAYMENT_DATETIME: 'tradePaymentDateTime',
135
+ TRADE_DELIVERY_DATETIME: 'tradeDeliveryDateTime',
136
+ TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
137
+ BS_SIGNING_TIME: 'bsSigningTime',
138
+ BS_SEND_TIME: 'bsSendTime',
139
+ BS_TRADE_PAYMENT_TIME: 'bsTradePaymentTime'
142
140
  };
143
141
  });
144
142
  export default BasicDataTime;
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsLogistics | GyReissue | GyReturn | JstSendGood | MsgStatus | BasicPicture | BasicPicturePro | BasicPosting | PublicExchange | PublicReissueGoods | BasicSelect | StatusSelect | BasicDataTime | TradeDateTime | TradeId | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicFile | SubForm | CommonDataTime | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods;
3
+ export declare const factory: (type: string, options: PickOption) => GyReissue | GyReturn | JstSendGood | MsgStatus | BasicPicture | BasicPicturePro | PublicExchange | PublicReissueGoods | ReissueLogistics | BasicSelect | StatusSelect | BasicDataTime | TradeDateTime | TradeId | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods;
@@ -70,7 +70,6 @@ export var factory = function factory(type, options) {
70
70
  case "TRADE_PAYMENT_DATETIME":
71
71
  case "TRADE_DELIVERY_DATETIME":
72
72
  case "TRADE_CLOSING_DATETIME":
73
- case "TRADE_SIGNING_DATETIME":
74
73
  case "BS_SIGNING_TIME":
75
74
  case "BS_SEND_TIME":
76
75
  case "BS_TRADE_PAYMENT_TIME":
@@ -195,7 +194,6 @@ export var factory = function factory(type, options) {
195
194
  case "WDT_LOGISTICS":
196
195
  case "JST_LOGISTICS":
197
196
  case "KM_LOGISTICS":
198
- case "GY_LOGISTICS":
199
197
  return new BsLogistics(options);
200
198
  case "FLOW_WORK_ORDER_ID_INPUT":
201
199
  return new FlowWorkOrderId(options);
@@ -9,7 +9,6 @@ export declare const queryAllLogisticsCompany: () => Promise<void>;
9
9
  export declare const queryWdtLogisticsCompany: () => Promise<void>;
10
10
  export declare const queryBsE3LogisticsCompany: () => Promise<void>;
11
11
  export declare const queryJSTLogisticsCompany: () => Promise<void>;
12
- export declare const queryGYLogisticsCompany: () => Promise<void>;
13
12
  export declare const queryWLNLogisticsCompany: () => Promise<void>;
14
13
  export declare const queryKMLogisticsCompany: () => Promise<void>;
15
14
  export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
@@ -269,12 +269,6 @@ export var queryJSTLogisticsCompany = function queryJSTLogisticsCompany() {
269
269
  instance.expressData = data;
270
270
  }).catch(console.log);
271
271
  };
272
- export var queryGYLogisticsCompany = function queryGYLogisticsCompany() {
273
- var instance = ExpressData.getInstance("gy");
274
- return servers.GY.getLogisticsDataAsync().then(function (data) {
275
- instance.expressData = data;
276
- }).catch(console.log);
277
- };
278
272
  export var queryWLNLogisticsCompany = function queryWLNLogisticsCompany() {
279
273
  var instance = ExpressData.getInstance("wln");
280
274
  return servers.WLN.getLogisticsDataAsync().then(function (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.0.54-beta.6",
3
+ "version": "2.0.55",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.0.54-beta.5",
25
- "@kmkf-fe-packages/kmkf-utils": "2.0.54-beta.5",
24
+ "@kmkf-fe-packages/basic-components": "2.0.55",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.0.55",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "bb8dd7ecf8c6f1448f5e67d64352ec68c3910c74",
44
+ "gitHead": "17280f003e2ecbdc5dd3316b1196c6b10d78c0f4",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }