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

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 (58) hide show
  1. package/dist/esm/commonComponents/CopyText/index.d.ts +1 -1
  2. package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
  3. package/dist/esm/commonComponents/GlobalContext/index.js +5 -2
  4. package/dist/esm/components/BS/BsLogistics/index.js +8 -1
  5. package/dist/esm/components/BS/BsSystemOrder/index.js +6 -163
  6. package/dist/esm/components/BS/common/BsHeaderGood.js +13 -40
  7. package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
  8. package/dist/esm/components/BS/common/BsMemo.js +19 -18
  9. package/dist/esm/components/BS/common/BsType.d.ts +4 -4
  10. package/dist/esm/components/BS/common/BsType.js +17 -16
  11. package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
  12. package/dist/esm/components/BS/common/expressCode.js +4 -1
  13. package/dist/esm/components/BS/common/expressCompany.js +3 -0
  14. package/dist/esm/components/Common/constants/bs.d.ts +3 -0
  15. package/dist/esm/components/Common/constants/bs.js +90 -0
  16. package/dist/esm/components/Common/constants/bs_e3.d.ts +3 -0
  17. package/dist/esm/components/Common/constants/bs_e3.js +154 -0
  18. package/dist/esm/components/Common/constants/columnsBaseInfoMap.d.ts +5 -0
  19. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +26 -0
  20. package/dist/esm/components/Common/constants/defaultColumns.d.ts +3 -0
  21. package/dist/esm/components/Common/constants/defaultColumns.js +76 -0
  22. package/dist/esm/components/Common/constants/gy.d.ts +3 -0
  23. package/dist/esm/components/Common/constants/gy.js +153 -0
  24. package/dist/esm/components/Common/constants/system.d.ts +3 -0
  25. package/dist/esm/components/Common/constants/system.js +58 -0
  26. package/dist/esm/components/Common/constants/wdt.d.ts +3 -0
  27. package/dist/esm/components/Common/constants/wdt.js +280 -0
  28. package/dist/esm/components/Common/index.d.ts +10 -3
  29. package/dist/esm/components/Common/index.js +74 -822
  30. package/dist/esm/components/CommonHeaderGood/index.js +196 -0
  31. package/dist/esm/components/CommonSystemOrder/index.d.ts +4 -4
  32. package/dist/esm/components/CommonSystemOrder/index.js +25 -25
  33. package/dist/esm/components/EItemEnCode/index.d.ts +3 -1
  34. package/dist/esm/components/EItemEnCode/index.js +26 -29
  35. package/dist/esm/components/GY/GyGoods/index.d.ts +33 -0
  36. package/dist/esm/components/GY/GyGoods/index.js +123 -0
  37. package/dist/esm/components/GY/GyReissue/index.d.ts +58 -0
  38. package/dist/esm/components/GY/GyReissue/index.js +188 -0
  39. package/dist/esm/components/JST/JstSendGood/index.js +32 -16
  40. package/dist/esm/components/KmErpSendGood/index.js +11 -11
  41. package/dist/esm/components/MsgStatus/index.d.ts +5 -5
  42. package/dist/esm/components/MsgStatus/index.js +39 -48
  43. package/dist/esm/components/PostIng/index.js +3 -2
  44. package/dist/esm/components/ReceiverAddress/index.js +74 -8
  45. package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.d.ts +12 -3
  46. package/dist/esm/components/{JST/JstLogistics → Reissue/Logistics}/index.js +36 -13
  47. package/dist/esm/components/StatusSelect/index.d.ts +1 -1
  48. package/dist/esm/components/StatusSelect/index.js +1 -2
  49. package/dist/esm/factory.d.ts +2 -2
  50. package/dist/esm/factory.js +10 -4
  51. package/dist/esm/index.d.ts +3 -1
  52. package/dist/esm/index.js +3 -1
  53. package/dist/esm/service/api.d.ts +3 -0
  54. package/dist/esm/service/api.js +59 -38
  55. package/dist/esm/type.d.ts +1 -1
  56. package/package.json +4 -4
  57. package/dist/esm/components/CommonHeaderGood/index copy.d.ts +0 -27
  58. package/dist/esm/components/CommonHeaderGood/index copy.js +0 -659
@@ -0,0 +1,188 @@
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 ItemView from "../../../commonComponents/ItemView";
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { GyReissue as Reissue } from "@kmkf-fe-packages/basic-components";
16
+ import { SYMBOL } from "../../../constant";
17
+ import { BsGoodsTable } from "../../Common/index";
18
+ import { BsType, BsMemo, SystemOrderNo } from "../../BS/common/index";
19
+ import CommonHeaderGoods from "../../CommonHeaderGood";
20
+ var typeMap = {
21
+ GY_REISSUE_GOODS: {
22
+ key: "gyReissueGoods",
23
+ name: "管易",
24
+ typeName: "gyReissueType",
25
+ remark: "gyReissueType_memo",
26
+ systemOrderNo: "gySystemOrderNo",
27
+ errMsg: "请选择管易补发商品"
28
+ }
29
+ };
30
+ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
31
+ var _this = this,
32
+ _typeMap$options$type,
33
+ _typeMap$options$type2,
34
+ _typeMap$options$type3,
35
+ _typeMap$options$type4,
36
+ _this$componentConfig6;
37
+ _classCallCheck(this, GyReissue);
38
+ _defineProperty(this, "name", void 0);
39
+ _defineProperty(this, "id", void 0);
40
+ _defineProperty(this, "sortField", void 0);
41
+ _defineProperty(this, "type", void 0);
42
+ _defineProperty(this, "rules", void 0);
43
+ _defineProperty(this, "componentConfig", void 0);
44
+ _defineProperty(this, "effects", void 0);
45
+ _defineProperty(this, "isCombinationComponent", void 0);
46
+ _defineProperty(this, "formField", void 0);
47
+ _defineProperty(this, "canSort", void 0);
48
+ _defineProperty(this, "children", void 0);
49
+ _defineProperty(this, "dataType", void 0);
50
+ _defineProperty(this, "bsType", void 0);
51
+ _defineProperty(this, "bsMemo", void 0);
52
+ _defineProperty(this, "systemOrderNo", void 0);
53
+ _defineProperty(this, "reissueGoods", void 0);
54
+ _defineProperty(this, "renderClient", function (record) {
55
+ var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
56
+ return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
57
+ id: _this.id,
58
+ label: _this.name,
59
+ value: /*#__PURE__*/React.createElement(BsGoodsTable, {
60
+ list: (record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id)]) === null || _record2 === void 0 ? void 0 : _record2["".concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)]) || [],
61
+ showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || [],
62
+ type: _this.type
63
+ })
64
+ }) : null) : null;
65
+ });
66
+ _defineProperty(this, "renderPc", function () {
67
+ return null;
68
+ });
69
+ _defineProperty(this, "renderLog", function (r) {
70
+ var _r, _typeMap$_this$type3, _typeMap$_this$type4, _r2, _typeMap$_this$type5, _typeMap$_this$type6, _this$componentConfig2;
71
+ return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
72
+ list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) || [],
73
+ showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
74
+ type: _this.type
75
+ })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
76
+ });
77
+ _defineProperty(this, "getComponentValue", function (r) {
78
+ var _typeMap$_this$type7, _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type10, _typeMap$_this$type11, _typeMap$_this$type12;
79
+ var obj = {};
80
+ obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.typeName)] = 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.typeName)];
81
+ obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key)] = 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.key)];
82
+ obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.systemOrderNo)] = 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.systemOrderNo)];
83
+ return obj;
84
+ });
85
+ _defineProperty(this, "renderExport", function () {
86
+ return null;
87
+ });
88
+ _defineProperty(this, "editRender", function (p) {
89
+ var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
90
+ return /*#__PURE__*/React.createElement(GetFormItem, {
91
+ title: _this.name,
92
+ name: _this.id,
93
+ rules: _this.rules,
94
+ required: false,
95
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
96
+ display: p === null || p === void 0 ? void 0 : p.display,
97
+ 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 : "",
98
+ component: /*#__PURE__*/React.createElement(Reissue, _extends({}, _this.componentConfig, {
99
+ maxLength: ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.maxLength) || 20,
100
+ shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
101
+ shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
102
+ companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
103
+ width: "90%",
104
+ type: _this.type
105
+ }))
106
+ });
107
+ });
108
+ _defineProperty(this, "filterConfig", function (item) {
109
+ var _item$templateConfig;
110
+ return [{
111
+ searchDefaultConditions: SYMBOL.in,
112
+ type: item.type,
113
+ id: "".concat(item.id, "_").concat(typeMap[_this.type].typeName),
114
+ name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
115
+ filterComponentType: "Cascader",
116
+ props: {
117
+ options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
118
+ fieldNames: {
119
+ label: "label",
120
+ value: "value",
121
+ children: "children"
122
+ }
123
+ },
124
+ formatFilterValue: function formatFilterValue(val) {
125
+ if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
126
+ return [val[val.length - 1]];
127
+ }
128
+ },
129
+ filterFn: function filterFn(value) {
130
+ return function (i) {
131
+ var _typeMap$_this$type13;
132
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.typeName)), value);
133
+ };
134
+ }
135
+ }, {
136
+ searchDefaultConditions: SYMBOL.like,
137
+ type: item.type,
138
+ id: "".concat(item.id, "_").concat(typeMap[_this.type].systemOrderNo),
139
+ name: "".concat(item.name, "-\u8865\u53D1\u7CFB\u7EDF\u8BA2\u5355\u53F7"),
140
+ filterComponentType: "Input"
141
+ }, {
142
+ searchDefaultConditions: SYMBOL.like,
143
+ type: item.type,
144
+ id: "".concat(item.id, "_").concat(typeMap[_this.type].key),
145
+ name: "".concat(_this.name),
146
+ filterComponentType: "Input"
147
+ }];
148
+ });
149
+ this.name = options.name;
150
+ this.id = options.id;
151
+ this.sortField = "".concat(options.id);
152
+ this.formField = "".concat(options.id);
153
+ this.type = options.type;
154
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
155
+ this.isCombinationComponent = true;
156
+ this.canSort = false;
157
+ this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
158
+ id: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.typeName),
159
+ name: "补发类型"
160
+ }));
161
+ this.systemOrderNo = new SystemOrderNo(_objectSpread(_objectSpread({}, options), {}, {
162
+ id: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.systemOrderNo),
163
+ name: "补发系统订单号"
164
+ }));
165
+ this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
166
+ id: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.remark),
167
+ name: "补发备注"
168
+ }));
169
+ this.reissueGoods = new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
170
+ id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key),
171
+ name: "商品信息"
172
+ }));
173
+ this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.reissueGoods];
174
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
175
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
176
+ required: true,
177
+ validator: function validator(_, value) {
178
+ var _value, _typeMap$options$type5;
179
+ if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key)]) !== null && _value !== void 0 && _value.length)) {
180
+ var _typeMap$options$type6;
181
+ return Promise.reject(new Error("".concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.errMsg)));
182
+ }
183
+ return Promise.resolve();
184
+ }
185
+ }] : [];
186
+ this.dataType = "object";
187
+ });
188
+ export default GyReissue;
@@ -20,42 +20,56 @@ var typeMap = {
20
20
  name: "jst",
21
21
  sendId: "sendId",
22
22
  sendName: "sendName",
23
- platformType: 'default'
23
+ platformType: "default",
24
+ dataType: "arrayObject"
24
25
  },
25
26
  BS_SEND_GOOD: {
26
27
  key: "bsSendGood",
27
28
  name: "bs",
28
29
  sendId: "bsSendId",
29
30
  sendName: "bsSendName",
30
- platformType: 'default'
31
+ platformType: "default",
32
+ dataType: "arrayObject"
31
33
  },
32
34
  BS_E3_SEND_GOOD: {
33
35
  key: "bsE3SendGood",
34
36
  name: "bsE3",
35
37
  sendId: "bsE3SendId",
36
38
  sendName: "bsE3SendName",
37
- platformType: 'bsE3'
39
+ platformType: "bsE3",
40
+ dataType: "arrayObject"
38
41
  },
39
42
  WLN_SEND_GOOD: {
40
43
  key: "wlnSendGood",
41
44
  name: "wln",
42
45
  sendId: "wlnSendId",
43
46
  sendName: "wlnSendName",
44
- platformType: 'default'
47
+ platformType: "default",
48
+ dataType: "arrayObject"
45
49
  },
46
50
  KM_SEND_GOOD: {
47
51
  key: "kmSendGood",
48
52
  name: "km",
49
53
  sendId: "kmSendId",
50
54
  sendName: "kmSendName",
51
- platformType: 'km'
55
+ platformType: "km",
56
+ dataType: "weakenArray"
52
57
  },
53
58
  WDT_SEND_GOOD: {
54
59
  key: "wdtSendGood",
55
60
  name: "wdt",
56
61
  sendId: "wdtSendId",
57
62
  sendName: "wdtSendName",
58
- platformType: 'wdt'
63
+ platformType: "wdt",
64
+ dataType: "weakenArray"
65
+ },
66
+ GY_SEND_GOOD: {
67
+ key: "gySendGood",
68
+ name: "gy",
69
+ sendId: "gySendId",
70
+ sendName: "gySendName",
71
+ platformType: "gy",
72
+ dataType: "weakenArray"
59
73
  }
60
74
  };
61
75
  var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
@@ -63,6 +77,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
63
77
  _typeMap$_options$typ,
64
78
  _typeMap$_options$typ2,
65
79
  _this$componentConfig3,
80
+ _typeMap$_options$typ3,
66
81
  _this$componentConfig4;
67
82
  _classCallCheck(this, JstSendGood);
68
83
  _defineProperty(this, "name", void 0);
@@ -80,18 +95,18 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
80
95
  _defineProperty(this, "dataType", void 0);
81
96
  _defineProperty(this, "format", void 0);
82
97
  _defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
83
- var _typeMap$options$type, _typeMap$options$type2;
98
+ var _typeMap$options$type, _typeMap$options$type2, _typeMap$options$type3;
84
99
  var sendName = {
85
100
  name: "发货仓名称",
86
101
  key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
87
- dataType: "arrayObject",
88
- disabled: type === 'sendId'
102
+ dataType: (_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.dataType,
103
+ disabled: type === "sendId"
89
104
  };
90
105
  var sendId = {
91
106
  name: "发货仓编码",
92
- key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
107
+ key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.sendId),
93
108
  dataType: "arrayObject",
94
- disabled: type === 'sendName'
109
+ disabled: type === "sendName"
95
110
  };
96
111
  sendName.options = fieldType && SendDataCenter.getInstance(fieldType).getSendData();
97
112
  return [sendName, sendId];
@@ -151,16 +166,17 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
151
166
  required: false,
152
167
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
153
168
  display: p === null || p === void 0 ? void 0 : p.display,
154
- tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : '',
169
+ tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
155
170
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
156
171
  type: 3,
157
- platformType: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.platformType
172
+ platformType: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.platformType,
173
+ onlyShowFieldSelect: _this.componentConfig ? _this.componentConfig.showField === "sendName" : false
158
174
  }))
159
175
  });
160
176
  });
161
177
  _defineProperty(this, "filterConfig", function (item) {
162
178
  var _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type11;
163
- return [_this.type === 'WDT_SEND_GOOD' || _this.type === 'BS_E3_SEND_GOOD' ? {
179
+ return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
164
180
  searchDefaultConditions: SYMBOL.in,
165
181
  type: item.type,
166
182
  id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendName),
@@ -218,9 +234,9 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
218
234
  this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
219
235
  this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
220
236
  this.componentConfig = _options.componentConfig;
221
- this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
237
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options, _options.type);
222
238
  this.type = _options.type;
223
- this.dataType = "arrayObject";
239
+ this.dataType = (_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.dataType;
224
240
  this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
225
241
  required: true,
226
242
  validator: function validator(_, value) {
@@ -40,12 +40,12 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
40
40
  name: "发货仓名称",
41
41
  key: "".concat(options.id, "_").concat(_this.suffixSendName),
42
42
  dataType: "arrayObject",
43
- disabled: type === 'sendId'
43
+ disabled: type === "sendId"
44
44
  }, {
45
45
  name: "发货仓编码",
46
46
  key: "".concat(options.id, "_").concat(_this.suffixSendId),
47
47
  dataType: "arrayObject",
48
- disabled: type === 'sendName'
48
+ disabled: type === "sendName"
49
49
  }];
50
50
  });
51
51
  _defineProperty(this, "renderClient", function (record) {
@@ -58,7 +58,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
58
58
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
59
59
  list: record === null || record === void 0 ? void 0 : record[_this.id],
60
60
  type: 3,
61
- platformType: 'default'
61
+ platformType: "default"
62
62
  })
63
63
  }) : null;
64
64
  });
@@ -72,7 +72,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
72
72
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
73
73
  list: list,
74
74
  type: 3,
75
- platformType: 'default'
75
+ platformType: "default"
76
76
  }));
77
77
  });
78
78
  _defineProperty(this, "renderLog", function (r) {
@@ -98,15 +98,15 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
98
98
  required: false,
99
99
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
100
100
  display: p === null || p === void 0 ? void 0 : p.display,
101
- tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : '',
101
+ tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
102
102
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
103
103
  type: 3,
104
- platformType: 'default'
104
+ platformType: "default"
105
105
  }))
106
106
  });
107
107
  });
108
108
  _defineProperty(this, "filterConfig", function (item) {
109
- return [_this.type === 'WDT_SEND_GOOD' || _this.type === 'BS_E3_SEND_GOOD' ? {
109
+ return [["WDT_SEND_GOOD", "BS_E3_SEND_GOOD", "GY_SEND_GOOD"].includes(_this.type) ? {
110
110
  searchDefaultConditions: SYMBOL.in,
111
111
  type: item.type,
112
112
  id: "".concat(item.id, "_").concat(_this.suffixSendName),
@@ -161,13 +161,13 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
161
161
  });
162
162
  this.name = _options.name;
163
163
  this.id = _options.id;
164
- this.suffixKey = 'kmSendGood';
165
- this.suffixSendId = 'kmSendId';
166
- this.suffixSendName = 'kmSendName';
164
+ this.suffixKey = "kmSendGood";
165
+ this.suffixSendId = "kmSendId";
166
+ this.suffixSendName = "kmSendName";
167
167
  this.sortField = "".concat(_options.id, "_").concat(this.suffixKey);
168
168
  this.formField = "".concat(_options.id, "_").concat(this.suffixKey);
169
169
  this.componentConfig = _options.componentConfig;
170
- this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options);
170
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options);
171
171
  this.type = _options.type;
172
172
  this.dataType = "object";
173
173
  this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
@@ -1,19 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
3
  declare class MsgStatus implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  align: ALignType;
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
16
- options: ComponentInterface['options'];
15
+ dataType: ComponentInterface["dataType"];
16
+ options: ComponentInterface["options"];
17
17
  constructor(options: PickOption);
18
18
  renderClient: (record: any) => React.JSX.Element | null;
19
19
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -8,61 +8,52 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
- import React from 'react';
12
- import some from 'lodash/some';
11
+ import React from "react";
12
+ import some from "lodash/some";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import { MsgContent } from "../Common";
15
- import { MsgStatus as Status } from '@kmkf-fe-packages/basic-components';
15
+ import { MsgStatus as Status } from "@kmkf-fe-packages/basic-components";
16
16
  import ItemView from "../../commonComponents/ItemView";
17
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
+ import { isNull, filterFn as _filterFn, msgTypeCh } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { SYMBOL } from "../../constant";
19
19
  var typeMap = {
20
20
  MSG_STATUS: {
21
21
  options: [{
22
- oldValue: '发送成功',
23
- value: '执行成功',
24
- label: '执行成功',
25
- color: '#52c41a'
22
+ oldValue: "发送成功",
23
+ value: "执行成功",
24
+ label: "执行成功",
25
+ color: "#52c41a"
26
26
  }, {
27
- oldValue: '已发送',
28
- value: '执行中',
29
- label: '执行中',
30
- color: '#52c41a'
27
+ oldValue: "已发送",
28
+ value: "执行中",
29
+ label: "执行中",
30
+ color: "#52c41a"
31
31
  }, {
32
- oldValue: '发送失败',
33
- value: '执行失败',
34
- label: '执行失败',
35
- color: '#ff4d4f'
32
+ oldValue: "发送失败",
33
+ value: "执行失败",
34
+ label: "执行失败",
35
+ color: "#ff4d4f"
36
36
  }, {
37
- oldValue: '等待发送',
38
- value: '等待执行',
39
- label: '等待执行',
40
- color: '#e7780f'
37
+ oldValue: "等待发送",
38
+ value: "等待执行",
39
+ label: "等待执行",
40
+ color: "#e7780f"
41
41
  }, {
42
- oldValue: '等待发送',
43
- value: '不满足条件,无需执行',
44
- label: '不满足条件,无需执行',
45
- color: '#8A8A8A'
42
+ oldValue: "等待发送",
43
+ value: "不满足条件,无需执行",
44
+ label: "不满足条件,无需执行",
45
+ color: "#8A8A8A"
46
46
  }],
47
- key: 'msgStatusValues',
48
- code: 'msgStatus4Search',
49
- name: '任务状态',
47
+ key: "msgStatusValues",
48
+ code: "msgStatus4Search",
49
+ name: "任务状态",
50
50
  type: 1,
51
- valueKey: 'status',
52
- idKey: 'systemOrderId',
51
+ valueKey: "status",
52
+ idKey: "systemOrderId",
53
53
  // 添加 发送失败 是为了兼容老数据
54
- failValue: ['执行失败', '发送失败']
54
+ failValue: ["执行失败", "发送失败"]
55
55
  }
56
56
  };
57
- var msgTypeCh = {
58
- ding: '钉钉',
59
- wechat: '微信',
60
- qq: 'QQ',
61
- qywx: '企业微信',
62
- YZDKH: '邮政拦截',
63
- YT: '圆通拦截',
64
- feishu: "飞书"
65
- };
66
57
  var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
67
58
  var _this = this,
68
59
  _typeMap$options$type,
@@ -133,9 +124,9 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
133
124
  var _typeMap$_this$type14;
134
125
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
135
126
  });
136
- var key = item.msgType || 'ding';
137
- return "".concat(msgTypeCh[key], "-").concat(item.ruleName, ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || '');
138
- }).join(',');
127
+ var key = item.msgType || "ding";
128
+ return "".concat(msgTypeCh[key], "-").concat(item.ruleName, ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "");
129
+ }).join(",");
139
130
  });
140
131
  _defineProperty(this, "editRender", function (p) {
141
132
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type16;
@@ -146,7 +137,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
146
137
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
147
138
  display: p === null || p === void 0 ? void 0 : p.display,
148
139
  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,
149
- 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 : '',
140
+ 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 : "",
150
141
  component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
151
142
  type: (_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.type,
152
143
  failValue: typeMap[_this.type].failValue
@@ -160,12 +151,12 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
160
151
  type: item.type,
161
152
  id: "".concat(item.id, "_").concat((_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.code),
162
153
  name: "".concat(_this.name),
163
- filterComponentType: 'MultipleSelect',
154
+ filterComponentType: "MultipleSelect",
164
155
  props: {
165
156
  options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
166
157
  fieldNames: {
167
- label: 'label',
168
- value: 'value'
158
+ label: "label",
159
+ value: "value"
169
160
  }
170
161
  },
171
162
  filterFn: function filterFn(value) {
@@ -187,7 +178,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
187
178
  this.isCombinationComponent = false;
188
179
  this.canSort = false;
189
180
  this.children = [];
190
- this.dataType = 'weakenArray';
181
+ this.dataType = "weakenArray";
191
182
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
192
183
  required: true,
193
184
  validator: function validator(_, value) {
@@ -202,7 +193,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
202
193
  return Promise.resolve();
203
194
  }
204
195
  }] : [];
205
- this.align = 'left';
196
+ this.align = "left";
206
197
  this.options = (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.options;
207
198
  });
208
199
  export default MsgStatus;
@@ -13,7 +13,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
16
- import { AddressData, BsAddressData, WdtAddressData } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import Province from "../BS/BsPosting/components/Province";
18
18
  import City from "../BS/BsPosting/components//City";
19
19
  import District from "../BS/BsPosting/components//District";
@@ -169,7 +169,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
169
169
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
170
170
  display: p === null || p === void 0 ? void 0 : p.display,
171
171
  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,
172
- 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 : '',
172
+ 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 : "",
173
173
  component: /*#__PURE__*/React.createElement(ApaasPosting, _extends({}, _this.componentConfig, {
174
174
  type: _this.type === "BS_POSTING" ? "bs" : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField
175
175
  }))
@@ -191,6 +191,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
191
191
  var showField = (_options$componentCon2 = options.componentConfig) === null || _options$componentCon2 === void 0 ? void 0 : _options$componentCon2.showField;
192
192
  this.addressDateInstance = (showField && {
193
193
  bs: BsAddressData,
194
+ gy: GyAddressData,
194
195
  wdt: WdtAddressData,
195
196
  workOrder: AddressData
196
197
  }[showField] || AddressData).getInstance();